Formation Media Posted March 9, 2015 Share Posted March 9, 2015 Hi all hope you can assist me as I am struggling to source a solution... We are customizing a site that features the Block layered module on the product list. We need to display different options for each product featured in the list dependent on the customer default group i.e. add to cart button on hover for wholesalers only. So far we are able to do this via a smarty variable $this->context->smarty->assign('checkcustomer',$this->context->customer); However while this works perfectly fine when a option is selected via the Blocklayered module it seems the ajax is causing a error suggesting the above has not being defined. Notice: Undefined index: checkcustomer in /home/jomajewe/public_html/preview/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 162 Notice: Undefined index: checkcustomer in /home/jomajewe/public_html/preview/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 193 We have tried including the smarty variable in a number of places including the module it's self to see if this is the cause however the errors are still appear. Any advice/guidance will be most appreciated Kind regards Link to comment Share on other sites More sharing options...
Formation Media Posted March 10, 2015 Author Share Posted March 10, 2015 Any help with this would be most appreciated. Would this post be better viewed in the Development sub forum? Link to comment Share on other sites More sharing options...
rocky Posted March 14, 2015 Share Posted March 14, 2015 Make sure you added the variable in the $smarty->assign in the ajaxCall function in modules/blocklayered/blocklayered.php as well as the $smarty->assign in the generateFiltersBlock function. Link to comment Share on other sites More sharing options...
Formation Media Posted March 16, 2015 Author Share Posted March 16, 2015 Make sure you added the variable in the $smarty->assign in the ajaxCall function in modules/blocklayered/blocklayered.php as well as the $smarty->assign in the generateFiltersBlock function. This is bang on! Thank you so much for your help, much appreciated! 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