kod bu şekilde düzgün çalışıyor.
Untitled Document
<script></script>
<script></script>
<script>
$(document).ready(function(){
var minAge = $('select').val();
$('select').on('change', function(){
minAge = $(this).val();
});
$('button').on('click', function(){
sessionStorage.clear();
$.ageCheck({minAge: minAge});
});
$.ageCheck({minAge: minAge});
});
</script>
Prestashop a bu şekilde ekliyince anasayfadaki ürünler kayboluyor.
{$meta_title|escape:'html':'UTF-8'}
{if isset($meta_description) AND $meta_description}
{/if}
{if isset($meta_keywords) AND $meta_keywords}
{/if}
{if isset($css_files)}
{foreach from=$css_files key=css_uri item=media}
{/foreach}
{/if}
{if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)}
{$js_def}
{foreach from=$js_files item=js_uri}
<script></script>
{/foreach}
{/if}
{$HOOK_HEADER}
<script></script>
<script></script>
<script>
{literal}
$(document).ready(function(){
var minAge = $('select').val();
$('select').on('change', function(){
minAge = $(this).val();
});
$('button').on('click', function(){
sessionStorage.clear();
$.ageCheck({minAge: minAge});
});
$.ageCheck({minAge: minAge});
});
{/literal}
</script>
{$geolocation_country|escape:'html':'UTF-8'}