Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Template Audiohome: Smarty Fehler nach index.html Änderung

    metatron

    • Mitglied
    • Beiträge: 130
    • Geschlecht:
    Hallo,

    ich habe die "index.html" des Templates "TEMPLATE: Kostenloses Template "audiohome" auf Basis von "shop6"" angepasst. Wenn man den Shop aufruft, kommt es zu folgendem Fehler:

    Code: PHP  [Auswählen]
    Fatal error: Smarty error: [in audiohome/index.html line 73]: syntax error: unclosed tag \{else} (opened line 42). (Smarty_Compiler.class.php, line 317) in /kunden/xxxxx/xxxx/xxxx/includes/classes/Smarty_2.6.26/Smarty.class.php on line 1097

    Die von mir gemachte Änderung sind mit !!! hervorgehoben (in der Originaldatei sind die natürlich nicht vorhanden).

    Code: PHP  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="index"}

    <div id="wrap">
        <div id="header">
            <div id="logo"><a href="http://audio-home.de/Shop/index.php"><img src="{$tpl_path}img/logo.jpg" alt="{$store_name}" title="{$store_name}" /></a></div>
        </div>
        <div id="topmenuwrap">
            <ul id="topmenu">


                {if $account}
                <li><a href="{$account}">{#link_account#}</a></li>
               {/if}
                {if $smarty.session.customers_status.customers_status_id == '1'}
                <li><a href="{php}echo xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL');{/php}">{#new_customer#}</a></li>
               {/if}
                <li><a href="{$checkout}">{#link_checkout#}</a></li>
               {if $smarty.session.customer_id}
                <li><a href="{$logoff}">{#link_logoff#}</a></li>
               {else}
                <li><a href="{$login}">{#link_login#}</a></li>
               {/if}
            </ul>
            <div id="languages">{$box_SEARCH}</div>
        </div>
        <div id="breadcrumb">{$navtrail}{$box_LANGUAGES}</div>
    !!!!!! ANFANG <div id="contentwrap">
       
    {if $is_filtered && $filter_als_leiste}

        <div id="contentfilter">
        <div id="leftcol">
        {$PRODUCT_FILTER}
        <div style="clear: both"></div>
    {$box_CONTENT}
    </div>
    <div id="content" style="width: 720px">
            {$main_content}
        </div>
    </div>

            {else}

    {if !strstr ($smarty.server.PHP_SELF, 'checkout')} !!!!
            <div id="leftcol">{$box_CATEGORIES}{$box_LOGIN}{$box_BESTSELLERS}{$box_LAST_VIEWED}{$box_REVIEWS}{$box_SPECIALS}{$box_WHATSNEW}{$box_CONTENT}{$box_ADMIN}
                    </div>
            {/if}
            <div
                    {if !strstr ($smarty.server.PHP_SELF, 'checkout')}
                            id="content"
                    {else}
                            id="contentfull"
                    {/if}
                     >
            {$main_content}</div>
        {if !strstr ($smarty.server.PHP_SELF, 'checkout')}
        <div id="rightcol">{*$box_NEWSLETTER*}{*$box_INFOBOX*}{*$box_CURRENCIES*}{*$box_MANUFACTURERS_INFO*}{*$box_MANUFACTURERS*}</div>
        {/if} </div>
                <div class="banner">
                    {if strstr ($smarty.server.PHP_SELF, 'index')}
                {if $smarty.get.cPath==null and $smarty.get.manufacturers_id==''}
                     {if $BANNER}{$BANNER}{/if}
               {/if}
            {/if}
            </div>
            <div class="footer">

              </div>
            </div>
    </div>
    <div id="staticcart">
      <div id="staticcartinner">
           <div id="cart">{if !strstr ($smarty.server.PHP_SELF, 'checkout')}{$box_CART}{/if}</div>

      </div>
    </div>

    Jetzt weiß ich leider nicht was ich kaputt gemacht habe bzw. wie ich es repariere. Jemand einen Tipp?

    Linkback: https://www.modified-shop.org/forum/index.php?topic=17914.0
    Sämtliche meiner Beiträge und Hinweise zu rechtlichen Themen, erfolgen ausschließlich zur allgemeinen Information und nicht zur Rechtsberatung. Zur Lösung konkreter Rechtsfragen wenden Sie sich bitte an die dafür zugelassenen Berufsträger.

    franky_n

    • Experte
    • Beiträge: 4.950
    Re: Template Audiohome: Smarty Fehler nach index.html Änderung
    Antwort #1 am: 15. Januar 2012, 21:07:17
    Hallo metatron,

    wenn Du es so formatiert hättest wie ich hättest Du es gesehen! ;)
    Bitte immer dran denken so was zu formatieren wenn es hakt dann findet man so etwas schnell.
    Bei Dir hier ganz offensichtlich das ein {/if} irgendwo fehlt:

    Code: PHP  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="index"}
    <div id="wrap">
      <div id="header">
        <div id="logo">
          <a href="http://audio-home.de/Shop/index.php">
            <img src="{$tpl_path}img/logo.jpg" alt="{$store_name}" title="{$store_name}" />
          </a>
        </div>
      </div>
      <div id="topmenuwrap">
        <ul id="topmenu">
          {if $account}
            <li><a href="{$account}">{#link_account#}</a></li>
         {/if}
          {if $smarty.session.customers_status.customers_status_id == '1'}
            <li><a href="{php}echo xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL');{/php}">{#new_customer#}</a></li>
         {/if}
          <li><a href="{$checkout}">{#link_checkout#}</a></li>
         {if $smarty.session.customer_id}
            <li><a href="{$logoff}">{#link_logoff#}</a></li>
         {else}
            <li><a href="{$login}">{#link_login#}</a></li>
         {/if}
        </ul>
        <div id="languages">{$box_SEARCH}</div>
      </div>
      <div id="breadcrumb">{$navtrail}{$box_LANGUAGES}</div>
      !!!!!! ANFANG <div id="contentwrap">
      {if $is_filtered && $filter_als_leiste}
        <div id="contentfilter">
          <div id="leftcol">
            {$PRODUCT_FILTER}
            <div style="clear: both"></div>
            {$box_CONTENT}
          </div>
          <div id="content" style="width: 720px">
            {$main_content}
          </div>
        </div>
        {else}
          {if !strstr ($smarty.server.PHP_SELF, 'checkout')} !!!!
            <div id="leftcol">{$box_CATEGORIES}{$box_LOGIN}{$box_BESTSELLERS}{$box_LAST_VIEWED}{$box_REVIEWS}{$box_SPECIALS}{$box_WHATSNEW}{$box_CONTENT}{$box_ADMIN}
            </div>
          {/if}
          <div
            {if !strstr ($smarty.server.PHP_SELF, 'checkout')}
              id="content"
            {else}
              id="contentfull"
            {/if}
          >
            {$main_content}
          </div>
          {if !strstr ($smarty.server.PHP_SELF, 'checkout')}
            <div id="rightcol">{*$box_NEWSLETTER*}{*$box_INFOBOX*}{*$box_CURRENCIES*}{*$box_MANUFACTURERS_INFO*}{*$box_MANUFACTURERS*}</div>
          {/if}
        </div>
        <div class="banner">
          {if strstr ($smarty.server.PHP_SELF, 'index')}
            {if $smarty.get.cPath==null and $smarty.get.manufacturers_id==''}
              {if $BANNER}{$BANNER}{/if}
            {/if}
          {/if}
        </div>
        <div class="footer">
        </div>
      </div>
    </div>
    <div id="staticcart">
      <div id="staticcartinner">
        <div id="cart">
          {if !strstr ($smarty.server.PHP_SELF, 'checkout')}
            {$box_CART}
          {/if}
        </div>
      </div>
    </div>

    Viele Grüße

    Franky

    metatron

    • Mitglied
    • Beiträge: 130
    • Geschlecht:
    Re: Template Audiohome: Smarty Fehler nach index.html Änderung
    Antwort #2 am: 15. Januar 2012, 21:36:27
    Hmm, da hab ich wohl gepennt. Bei Zeile 55 und 56: </div> und {/if} entfernen. Stattdessen hinzufügen:

    Code: PHP  [Auswählen]
    {/if}
    {/if}
    </div>

    Vielen Dank!
    6 Antworten
    4120 Aufrufe
    11. Dezember 2012, 10:46:00 von xxhappyxx
    3 Antworten
    3292 Aufrufe
    24. März 2010, 22:55:34 von Tomcraft
               
    anything