Jump to content

Java script çakışması yardım lütfen


Recommended Posts

Elimde html5 form mevcut ama bunu prestashop sisteminde çalıştırdığımda anasayfadaki ürünler kayboluyor. Ücreti ile yardım edebilecek kimse varsa yazabilirmi?
 
kod bu şekilde düzgün çalışıyor.
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
        <link href="agecheck.css" rel="stylesheet" />
        <script src="jquery.agecheck.min.js"></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>
 
</head>
 
<body>
</body>
</html>

Prestashop a bu şekilde ekliyince anasayfadaki ürünler kayboluyor. header.tpl dosyası

 

<!DOCTYPE HTML>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"><![endif]-->
<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"><![endif]-->
<html lang="{$lang_iso}">
<head>
<meta charset="utf-8" />
<title>{$meta_title|escape:'html':'UTF-8'}</title>
{if isset($meta_description) AND $meta_description}
<meta name="description" content="{$meta_description|escape:'html':'UTF-8'}" />
{/if}
{if isset($meta_keywords) AND $meta_keywords}
<meta name="keywords" content="{$meta_keywords|escape:'html':'UTF-8'}" />
{/if}
<meta name="generator" content="PrestaShop" />
<meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" />
<meta name="viewport" content="width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0" /> 
<meta name="apple-mobile-web-app-capable" content="yes" /> 
<link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" />
<link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
{if isset($css_files)}
{foreach from=$css_files key=css_uri item=media}
<link rel="stylesheet" href="{$css_uri|escape:'html':'UTF-8'}" type="text/css" media="{$media|escape:'html':'UTF-8'}" />
{/foreach}
{/if}
{if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)}
{$js_def}
{foreach from=$js_files item=js_uri}
<script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script>
{/foreach}
{/if}
{$HOOK_HEADER}
        <link href="agecheck.css" rel="stylesheet" />
        <script src="jquery.agecheck.min.js"></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>
<!--[if IE 8]>
<![endif]-->
</head>
Edited by muharremkomec (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...