Wie füge ich eine 4. Spalte bei " Unsere Bestseller" ein?

blackgren

Gut bekanntes Mitglied
1. Februar 2011
370
21
AW: Wie füge ich eine 4. Spalte bei " Unsere Bestseller" ein?

Hallo,
Datei seite_startseite.tpl und das hier beachten http://developer.jtl-software.de/projects/template-dev/wiki/Anpassung_von_Tpl-Dateien
Code:
<li class="p[COLOR=#ff0000]33[/COLOR] tcenter {if $smarty.foreach.boxartikel.index % [COLOR=#ff0000]3 [/COLOR]== 0}clear{/if}">
ändern in
Code:
<li class="p[COLOR=#ff0000]25[/COLOR] tcenter {if $smarty.foreach.boxartikel.index % [COLOR=#ff0000]4[/COLOR] == 0}clear{/if}">
 

urmelimurlaub

Gut bekanntes Mitglied
14. August 2013
156
15
Leipzig
AW: Wie füge ich eine 4. Spalte bei " Unsere Bestseller" ein?

Nach der Anpassung in der seite_startseite.tpl ist der ganze Shop abgeschossen.
 

casim

Sehr aktives Mitglied
26. Juni 2012
5.934
10
AW: Wie füge ich eine 4. Spalte bei " Unsere Bestseller" ein?

Zeig deinen geänderten Code; dann hast du was falsch gemacht (oder 4 Spalten passen nicht in dein Layout)

@Lars

Urmel spricht doch von der Artikelauflistung im unteren Teil der Startseite; layoutmäßig kannst du da nichts einstellen
 

urmelimurlaub

Gut bekanntes Mitglied
14. August 2013
156
15
Leipzig
AW: Wie füge ich eine 4. Spalte bei " Unsere Bestseller" ein?

Ich war nur in der Seite.tpl

Code:
{**  * @copyright (c) 2006-2010 JTL-Software-GmbH, all rights reserved  * @author JTL-Software-GmbH (www.jtl-software.de)  *  * use is subject to license terms  * http://jtl-software.de/jtlshop3license.html  *}   {if isset($nFullscreenTemplate) && $nFullscreenTemplate == 1}    {include file="$cPluginTemplate"} {else}    {include file='tpl_inc/header.tpl'}    <div id="content">       {include file='tpl_inc/inc_breadcrumb.tpl'}              {if $Link->Sprache->cTitle|@count_characters > 0}          <h1>{$Link->Sprache->cTitle}</h1>       {/if}              {include file="tpl_inc/inc_extension.tpl"}              {if $Link->Sprache->cContent|@count_characters > 0}          <div class="custom_content">{$Link->Sprache->cContent}</div>       {/if}              {if $Link->nLinkart == 11}          <div class="custom_content">          {if $AGB->cAGBContentHtml}             {$AGB->cAGBContentHtml}          {elseif $AGB->cAGBContentText}             {$AGB->cAGBContentText|nl2br}          {/if}          </div>       {elseif $Link->nLinkart == 24}          <div class="custom_content">          {if $WRB->cWRBContentHtml}             {$WRB->cWRBContentHtml}          {elseif $WRB->cWRBContentText}             {$WRB->cWRBContentText|nl2br}          {/if}          </div>       {elseif $Link->nLinkart == 5}          {include file='tpl_inc/seite_startseite.tpl'}       {elseif $Link->nLinkart == 6}           {include file='tpl_inc/seite_versand.tpl'}       {elseif $Link->nLinkart == 14}          {include file='tpl_inc/seite_tagging.tpl'}       {elseif $Link->nLinkart == 15}          {include file='tpl_inc/seite_livesuche.tpl'}       {elseif $Link->nLinkart == 16}          {include file='tpl_inc/seite_hersteller.tpl'}       {elseif $Link->nLinkart == 18}          {include file='tpl_inc/seite_newsletterarchiv.tpl'}       {elseif $Link->nLinkart == 20}          {include file='tpl_inc/seite_newsarchiv.tpl'}       {elseif $Link->nLinkart == 21}          {include file='tpl_inc/seite_sitemap.tpl'}       {elseif $Link->nLinkart == 23}          {include file='tpl_inc/seite_gratisgeschenk.tpl'}       {elseif $Link->nLinkart == 25 && $nFullscreenTemplate == 0}          {include file="$cPluginTemplate"}       {elseif $Link->nLinkart == 26}          {include file='auswahlassistent.tpl'}       {elseif $Link->nLinkart == 29}          {include file='tpl_inc/seite_404.tpl'}       {/if}       {include file='tpl_inc/inc_seite.tpl' print=$Link->cDruckButton}    </div>    {include file='tpl_inc/footer.tpl'} {/if}

und der Seite_Startseite.tpl

Code:
{**  * @copyright (c) 2006-2010 JTL-Software-GmbH, all rights reserved  * @author JTL-Software-GmbH (www.jtl-software.de)  *  * use is subject to license terms  * http://jtl-software.de/jtlshop3license.html  *}   {if isset($cFehler) && $cFehler|count_characters > 0}     <p class="box_error">{$cFehler}</p> {/if}  {include file="auswahlassistent.tpl"}  {if isset($StartseiteBoxen) && $StartseiteBoxen|@count > 0}    {foreach name=startboxen from=$StartseiteBoxen item=Box}       {if isset($Box->Artikel->elemente) && count($Box->Artikel->elemente)>0}          <div class="container">          {if $Box->name=="TopAngebot"}             <h1 class="underline">{lang key="topOffer" section="global"}</h1>          {elseif $Box->name=="Sonderangebote"}             <h1 class="underline">{lang key="specialOffer" section="global"}</h1>          {elseif $Box->name=="NeuImSortiment"}             <h1 class="underline">{lang key="newProducts" section="global"}</h1>          {elseif $Box->name=="Bestseller"}             <h1 class="underline">{lang key="bestsellers" section="global"}</h1>          {/if}                       <ul class="hlist articles">          {foreach name=boxartikel from=$Box->Artikel->elemente item=Artikel}             {counter assign=imgcounter print=0}             <li class="p33 tcenter {if $smarty.foreach.boxartikel.index % 3 == 0}clear{/if}">                <div>                <p>                {if $Box->name=="Bestseller"}                   <a href="{$Artikel->cURL}">                      {if isset($oSuchspecialoverlay_arr.bestseller->cBildPfad) && $oSuchspecialoverlay_arr.bestseller->cBildPfad|count_characters > 0 && $oSuchspecialoverlay_arr.bestseller->nAktiv > 0}                         <img src="{$Artikel->cVorschaubild}" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" class="image" id="overlay{$Artikel->kArtikel}_{$imgcounter}" />                                           <script type="text/javascript">                            set_overlay('#overlay{$Artikel->kArtikel}_{$imgcounter}', '{$Artikel->oSuchspecialBild->nPosition}', '{$Artikel->oSuchspecialBild->nMargin}', '{$Artikel->oSuchspecialBild->cPfadKlein}');                         </script>                      {else}                         <img src="{$Artikel->cVorschaubild}" class="image" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" />                      {/if}                    </a>                {/if}                                               {if $Box->name=="TopAngebot"}                   <a href="{$Artikel->cURL}">                      {if isset($oSuchspecialoverlay_arr.topangebote->cPfadNormal) && $oSuchspecialoverlay_arr.topangebote->cPfadNormal|count_characters > 0 && $oSuchspecialoverlay_arr.topangebote->nAktiv > 0}                         <img src="{$Artikel->cVorschaubild}" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" class="image" id="overlay{$Artikel->kArtikel}_{$imgcounter}" />                         <script type="text/javascript">                            set_overlay('#overlay{$Artikel->kArtikel}_{$imgcounter}', '{$Artikel->oSuchspecialBild->nPosition}', '{$Artikel->oSuchspecialBild->nMargin}', '{$Artikel->oSuchspecialBild->cPfadKlein}');                         </script>                      {else}                         <img src="{$Artikel->cVorschaubild}" title="{$Artikel->cName}" class="image" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" />                      {/if}                   </a>                {/if}                                                {if $Box->name=="Sonderangebote"}                   <a href="{$Artikel->cURL}">                      {if isset($oSuchspecialoverlay_arr.sonderangebote->cBildPfad) && $oSuchspecialoverlay_arr.sonderangebote->cBildPfad|count_characters > 0 && $oSuchspecialoverlay_arr.sonderangebote->nAktiv > 0}                         <img src="{$Artikel->cVorschaubild}" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" class="image" id="overlay{$Artikel->kArtikel}_{$imgcounter}" />                         <script type="text/javascript">                            set_overlay('#overlay{$Artikel->kArtikel}_{$imgcounter}', '{$Artikel->oSuchspecialBild->nPosition}', '{$Artikel->oSuchspecialBild->nMargin}', '{$Artikel->oSuchspecialBild->cPfadKlein}');                         </script>                      {else}                         <img src="{$Artikel->cVorschaubild}" class="image" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" />                      {/if}                   </a>                {/if}                                {if $Box->name=="NeuImSortiment"}                   <a href="{$Artikel->cURL}">                      {if isset($oSuchspecialoverlay_arr.neuimsortiment->cBildPfad) && $oSuchspecialoverlay_arr.neuimsortiment->cBildPfad|count_characters > 0 && $oSuchspecialoverlay_arr.neuimsortiment->nAktiv > 0}                         <img src="{$Artikel->cVorschaubild}" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" class="image" id="overlay{$Artikel->kArtikel}_{$imgcounter}" />                         <script type="text/javascript">                            set_overlay('#overlay{$Artikel->kArtikel}_{$imgcounter}', '{$Artikel->oSuchspecialBild->nPosition}', '{$Artikel->oSuchspecialBild->nMargin}', '{$Artikel->oSuchspecialBild->cPfadKlein}');                         </script>                      {else}                         <img src="{$Artikel->cVorschaubild}" class="image" alt="{$Artikel->cName|strip_tags|escape:"quotes"|truncate:60}" />                      {/if}                   </a>                {/if}                </p>                <p><a href="{$Artikel->cURL}">{$Artikel->cName}</a></p>                 {if $Box->name=="TopAngebot"}                   {assign var="price_image" value=$Artikel->Preise->strPreisGrafik_TopboxStartseite}                {elseif $Box->name=="NeuImSortiment"}                   {assign var="price_image" value=$Artikel->Preise->strPreisGrafik_NeuboxStartseite}                {elseif $Box->name=="Sonderangebote"}                   {assign var="price_image" value=$Artikel->Preise->strPreisGrafik_SonderboxStartseite}                {elseif $Box->name=="Bestseller"}                   {assign var="price_image" value=$Artikel->Preise->strPreisGrafik_BestsellerboxStartseite}                {/if}                                {include file="tpl_inc/artikel_preis.tpl" scope="content"}                                </div>             </li>          {/foreach}          </ul>          </div>       {/if}    {/foreach} {/if}  {if isset($oNews_arr) && $oNews_arr|@count > 0} <div class="container news_list">    <h1 class="underline">{lang key="news" section="news" alt_section="global,"}</h1>    {foreach name=news from=$oNews_arr item=oNews}        <div class="newsitem">                          <h2><a href="{$oNews->cURL}">{$oNews->cBetreff}</a></h2>           {$oNews->dErstellt_de}{if isset($Einstellungen.news.news_kommentare_nutzen) && $Einstellungen.news.news_kommentare_nutzen == "Y"} | <a href="{$oNews->cURL}#comments" title="{lang key="readComments" section="news"}">{$oNews->nNewsKommentarAnzahl} {if $oNews->nNewsKommentarAnzahl == 1}{lang key="newsComment" section="news"}{else}{lang key="newsComments" section="news"}{/if}{/if}</a>           <div class="custom_content">              {if $oNews->cVorschauText|count_characters > 0}                 {$oNews->cVorschauText}                     {$oNews->cMehrURL}              {elseif $oNews->cText|strip_tags|count_characters > 200}                 {$oNews->cText|strip_tags|truncate:200:""} {$oNews->cMehrURL}              {else}                 {$oNews->cText}              {/if}           </div>        </div>    {/foreach} </div> {/if}
 

casim

Sehr aktives Mitglied
26. Juni 2012
5.934
10
AW: Wie füge ich eine 4. Spalte bei " Unsere Bestseller" ein?

blackgren hat dir doch auch einen Link gepostet, hast du dir den durchgelesen?
 

martinwolf

Offizieller Service Partner
SPBanner
6. September 2012
3.716
355
AW: Wie füge ich eine 4. Spalte bei " Unsere Bestseller" ein?

@Urmel: Könntest du mal bitte nur die Änderungen posten die du gemacht hast und nicht den gesamten Quellcode der Templatedatei als Einzeiler? Was meinst du mit Shop ist offline, ist die Seite weiß? Dann liegt es an einem Template Fehler der nicht interpretiert werden kann.

Im Grund müsste aber deine einzige Änderung in der seite_startseite_custom.tpl folgende sein:

Code:
<li class="p[B][COLOR=#ff0000]25[/COLOR][/B] tcenter {if $smarty.foreach.boxartikel.index % [B][COLOR=#ff0000]4[/COLOR][/B] == 0}clear{/if}">
 
Zuletzt bearbeitet:

Ähnliche Themen