Jump to content

error in header.tpl?


Recommended Posts

In my theme, the header.tpl file reads:
 

{*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!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}" />
{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}
{if isset($css_files)}
    {foreach from=$css_files key=css_uri item=media}
        <link rel="stylesheet" href="{$css_uri}" type="text/css" media="{$media}" />
    {/foreach}
{/if}
        {$HOOK_HEADER}

        <!--[if IE 8]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if $content_only} content_only{/if} lang_{$lang_iso}">
    {if !$content_only}
        {if isset($restricted_country_mode) && $restricted_country_mode}
            <div id="restricted-country">
                <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p>
            </div>
        {/if}
        <div id="page">
            <div class="header-container">
                <header id="header">
                    <div class="banner">
                        <div class="container">
                            <div class="row">
                                {hook h="displayBanner"}
                            </div>
                        </div>
                    </div>
                    <div class="nav">
                        <div class="container">
                            <div class="row">
                                <nav>{hook h="displayNav"}</nav>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div class="container">
                            <div class="row">
                                <div id="header_logo">
                                    <a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
                                        <img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if $logo_image_width} width="{$logo_image_width}"{/if}{if $logo_image_height} height="{$logo_image_height}"{/if}/>
                                    </a>
                                </div>
                                {if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
                            </div>
                        </div>
                    </div>
                </header>
            </div>
            <div class="columns-container">
                <div id="columns" class="container">
                    {if $page_name !='index' && $page_name !='pagenotfound'}
                        {include file="$tpl_dir./breadcrumb.tpl"}
                    {/if}
                    <div class="row">
                        <div id="top_column" class="center_column col-xs-12 col-sm-12">{hook h="displayTopColumn"}</div>
                    </div>
                    <div class="row">
                        {if isset($left_column_size) && !empty($left_column_size)}
                        <div id="left_column" class="column col-xs-12 col-sm-{$left_column_size|intval}">{$HOOK_LEFT_COLUMN}</div>
                        {/if}
                        <div id="center_column" class="center_column col-xs-12 col-sm-{12 - $left_column_size - $right_column_size}">
    {/if}

From line 46 to 51, the code allows the menu to open into submenus, but it effects the order.tpl in such a way, that the vouchers and trashbin behind the products in the order steps dissapear:

{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}

When i delete line 46 to 51, the vouchers and trashbins appear as they should in the order.tpl, but now my muenu won't open into submenus.

Please help. Thank you.

Edited by pandorrah (see edit history)
Link to comment
Share on other sites

I deleted line 46 and line 51, no change.

I also deleted line 46, white screen.
With the 4 remaing lines the problem remains: ór my menu won't change into submenu items, ór the voucher codes and trash icons dissapear on the order.tpl.

 

I have little to no php experience...

Link to comment
Share on other sites

No, don't say that code needs to be changed. He changed the code and that was the mistake. I was just showing him where the issue is.

thanks for clarification...so no push ups?

 

Fix is not working:

 

1. BO > Advanced > Load Javascipt at bottom YES, but no changes to problem.

 

not working covers a lot of area....

 

I would think you have some non-compliant menu or other .js issue non native.

 

It's best for community help to describe issue before making core changes...that is how to get best advice's.

Edited by El Patron (see edit history)
  • Like 1
Link to comment
Share on other sites

Would this be a missing javascript from the theme itself?

In DEV MODE i have no errors whatsoever. I don't know where to go from here.

 

 

post front office url where community can test, then we can use chrome tools for example to debug .js loading.

 

I suggest/recommend loading .js bottom....but detail each time what errors you are getting.....

Link to comment
Share on other sites

https://www.pandorrah.nl/comics/ site is not live for public, but settings are correct to go live. Just for this one little problem.

 

ok, I see shop, now .js loaded bottom....now give ndiaga and I idea how to recreate your issue.  Remember details details for each post so we dont' play 20 questions.   :)

 

also tell us where you got this theme...the link...

Edited by El Patron (see edit history)
Link to comment
Share on other sites

If you make an order (order some stuff from the website) and go to checkout:

in checkout screen i have the problem: not working submenus, ór not showing vouchers and trashbins behind items (in Firefox, not in Chrome, Microsoft Edge or Internet Explorer). Link for theme is: https://www.prestashop.com/forums/topic/334322-free-prestashop-16-theme-minimal/ in forumpost.

Thank you in advance for your time :)

Edited by pandorrah (see edit history)
Link to comment
Share on other sites

If you make an order (order some stuff from the website) and go to checkout:

 

in checkout screen i have the problem: not working submenus, ór not showing vouchers and trashbins behind items (in Firefox, not in Chrome). Link for theme is: https://www.prestashop.com/forums/topic/334322-free-prestashop-16-theme-minimal/ in forumpost.

 

Thank you in advance for your time :)

 

 

 

https://www.prestashop.com/forums/topic/334322-free-prestashop-16-theme-minimal/?p=2401709

 

there are similar questions in the theme posting you can try....but for me anyway....you need to wait for developer response.

 

best of luck

Link to comment
Share on other sites

I was just looking around to see if this had been solved, and when trying to add a product to the cart, I got this error message:

Impossible to add the product to the cart.
textStatus: 'parsererror'
errorThrown: 'SyntaxError: Unexpected token  in JSON at position 0'
responseText:
{"products":[{"id":3038,"link":"https:\/\/www.pandorrah.nl\/comics\/actie-figuren\/3038-guardians-of-the-galaxy-rocket-raccoon-met-blaster.html","quantity":1,"image":"https:\/\/www.pandorrah.nl\/comics\/3006-home_default\/guardians-of-the-galaxy-rocket-raccoon-met-blaster.jpg","image_cart":"https:\/\/www.pandorrah.nl\/comics\/3006-cart_default\/guardians-of-the-galaxy-rocket-raccoon-met-blaster.jpg","priceByLine":"\u20ac 20,00","name":"Guardians Of The Galaxy Rocket Raccoon Met Blaster","price":"\u20ac 20,00","price_float":16.53,"idCombination":0,"idAddressDelivery":0,"is_gift":false,"hasAttributes":false,"hasCustomizedDatas":false,"customizedDatas":[]}],"discounts":[],"shippingCost":"\u20ac 4,95","shippingCostFloat":4.95,"taxCost":"\u20ac 4,33","wrappingCost":"\u20ac 0,00","nbTotalProducts":1,"total":"\u20ac 24,95","productTotal":"\u20ac 20,00","freeShipping":"\u20ac 15,00","freeShippingFloat":15,"hasError":false,"crossSelling":""}

Are you aware of this? :)

Link to comment
Share on other sites

I second that. Sometimes I find that one of my clients might be hesitant at first to spend money on a theme, but when they see the sizable difference in features, support and quality, they are generally easily convinced.

 

It's an investment, much more so than a sunk cost!

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...