Oscar Invertiaweb Posted November 24, 2015 Share Posted November 24, 2015 Hi I've detected an issue about smarty cache and product compare. If smarty cache is OFF, all is right. If smarty cache is ON and the cache is clean, all is right, too. The problem begins when smarty cache is ON, and we try to add a product to compare. If you add a product and goes to compare list, the firs time it works. When you back to another product list and try to add another product you get this error message in the console: " ReferenceError: comparedProductsIds is not defined " The issue persistuntil the cache is cleaned. I found this fix in other posts and forums but doesn't works. {if isset($HOOK_HOME_TAB_CONTENT) && $HOOK_HOME_TAB_CONTENT|trim} {if isset($HOOK_HOME_TAB) && $HOOK_HOME_TAB|trim} <ul id="home-page-tabs" class="nav nav-tabs clearfix"> {$HOOK_HOME_TAB} </ul> {/if} <div class="tab-content">{$HOOK_HOME_TAB_CONTENT}</div> {/if} {if isset($HOOK_HOME) && $HOOK_HOME|trim} <div class="clearfix">{$HOOK_HOME}</div> {addJsDef comparedProductsIds=$compared_products} // <- this fix cache issues {/if} I added {addJsDef comparedProductsIds=$compared_products} in index.tpl, but doesn't works. Any suggestions? Thanks He encontrado algun foro donde propone como solución añadir {addJsDef comparedProductsIds=$compared_products} al archivo index.tpl, pero no me ha dado resultado. ¿Alguna sugerencia? Saludos Link to comment Share on other sites More sharing options...
comef Posted June 27, 2017 Share Posted June 27, 2017 Hello, I have the same problem. Any solution ?J'ai le même problème. Une solution ?Mille mercis Link to comment Share on other sites More sharing options...
Recommended Posts