Deluxdeal.dk 0 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 Share this post Link to post Share on other sites
Turtle13 1 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! Share this post Link to post Share on other sites
BZZYBI 5 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? Share this post Link to post Share on other sites
haynesmw 0 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? Share this post Link to post Share on other sites
costispaps 2 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 Share this post Link to post Share on other sites
wokan09 2 Posted May 21, 2019 Thanks a lots!! Works! Share this post Link to post Share on other sites