Hey guys! I know there are a lot of topics like this, but I believe mine is different.
I have edited the carousel.tpl file and made the default size of the carousel smaller and hard-coded a html div with a static image. I want to put a php "if-else" statement that changes the img according to the selected language. How can I detect the language used in the carousel.tpl file?
I saw how to do it for the header file, but the same method is not working for the carousel. Could anyone help?
I'm using OC 2.2.
Thanks!!
You need to add this in catalog/controller/module/carousel.php after line 4 :
Then you can use it in carousel.tpl like you saw in header.tpl
Code: Select all
$data['lang'] = $this->language->get('code');
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
Who is online
Users browsing this forum: No registered users and 3 guests