Deluxdeal.dk Posted January 8, 2016 Share Posted January 8, 2016 When i press "USE THEME" i get this following error code: Fatal error: Redefinition of parameter $id_shop in /var/www/deluxdeal.dk/public_html/modules/tmmegamenu/classes/MegaMenu.php on line 124 What is the problem? Best regards Junez Link to comment Share on other sites More sharing options...
Turtle13 Posted March 25, 2016 Share Posted March 25, 2016 Hi ... public function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false, $id_shop2 = false, $is_list = false){$id_shop = ($id_shop !== false) ? (int)$id_shop : (int)Context::getContext()->shop->id;$id_shop = ($id_shop2 !== false) ? (int)$id_shop2 : (int)Context::getContext()->shop->id; ... Have a nice day! Link to comment Share on other sites More sharing options...
BZZYBI Posted September 10, 2016 Share Posted September 10, 2016 Hi ... public function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false, $id_shop2 = false, $is_list = false) { $id_shop = ($id_shop !== false) ? (int)$id_shop : (int)Context::getContext()->shop->id; $id_shop = ($id_shop2 !== false) ? (int)$id_shop2 : (int)Context::getContext()->shop->id; ... Have a nice day! I had the same problem after updating to php7.0 I applied this fix and all worked fine. Can I ask what is happening in the above code. why is it after doing this change it all started working? Link to comment Share on other sites More sharing options...
haynesmw Posted November 19, 2016 Share Posted November 19, 2016 I'm getting the same error as the OP. How do I use that code to fix it? Where to I use the command? Link to comment Share on other sites More sharing options...
costispaps Posted November 20, 2016 Share Posted November 20, 2016 (edited) I'm getting the same error as the OP. How do I use that code to fix it? Where to I use the command? I tried the code mentioned and it works. You should use an ftp file manager like Filezilla and navigate to /modules/tmmegamenu/classes/MegaMenu.php . You can edit the file with a code editor. I am using Adobe Edge Code editor. If you don't know how to do these and you want more detailed description, reply and I will post some tutorials. On line 126 replace: public function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false, $id_shop = false, $is_list = false) { $id_shop = ($id_shop !== false) ? (int)$id_shop : (int)Context::getContext()->shop->id; $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; With public function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false, $id_shop2 = false, $is_list = false) { $id_shop = ($id_shop !== false) ? (int)$id_shop : (int)Context::getContext()->shop->id; $id_shop = ($id_shop2 !== false) ? (int)$id_shop2 : (int)Context::getContext()->shop->id; That worked for me. I don't know if Template Monster knows about it. I will speak with them in the morning. Edited November 20, 2016 by costispaps (see edit history) 1 Link to comment Share on other sites More sharing options...
wokan09 Posted May 21, 2019 Share Posted May 21, 2019 Thanks a lots!! Works! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now