Lieferstatus in Listenansicht / auf Startseite

Hallo zusammen,

standardmäßig wird der Lieferstatus (Rotes / grünes Kästchen) nicht in den Suchergebnissen oder der Startseite angezeigt. (PE 4.2)

Hat jemand schon mal versucht dies umzusetzen? Sodass die Kunden nicht immer erst in den Artikel klicken müssen, um den Lieferstatus zu sehen.

Ich freue mich auf Eure Rückmeldungen!

Gruß

Jan

Einfach den Code - Teil mit der Ampel aus den Artikeldetails ausschneiden und dort einbauen wo du ihn haben willst. Das klappt.

CYA

Hallo,

ich hab es nun so gelöst und so funktioniert es auch (inc/product.tpl, ab Zeile 38):

<div [{if $test_Cntr}]id=“test_cntr_[{$test_Cntr}]”[{/if}] class=“actions”>

  [{if $size=='small' || $size=='thin'}]
  
  &lt;div class="status"&gt;
  [{if $product-&gt;getStockStatus() == -1}]
  &lt;div class="flag red"&gt;&lt;/div&gt;
    [{ if $product-&gt;oxarticles__oxnostocktext-&gt;value  }]
        [{ $product-&gt;oxarticles__oxnostocktext-&gt;value  }]
    [{elseif $oViewConf-&gt;getStockOffDefaultMessage() }]
        &lt;p class="fs10" style="margin-top: 0px; margin-bottom: 5px; color: #5E5E5E; height: 26px;" &gt;[{ oxmultilang ident="DETAILS_NOTONSTOCK_SMALL" }]&lt;/p&gt;
    [{/if}]
  [{elseif $product-&gt;getStockStatus() == 1}]
  &lt;div class="flag orange"&gt;&lt;/div&gt;
  &lt;p class="fs10" style="margin-top: 0px; margin-bottom: 5px; color: #5E5E5E; height: 26px;"&gt;[{ oxmultilang ident="DETAILS_READYFORSHIPPING" }]&lt;/p&gt;
  [{elseif $product-&gt;getStockStatus() == 0}]
  &lt;div class="flag green"&gt;&lt;/div&gt;
  [{ if $product-&gt;oxarticles__oxstocktext-&gt;value  }]
    [{ $product-&gt;oxarticles__oxstocktext-&gt;value  }]
  [{elseif $oViewConf-&gt;getStockOnDefaultMessage() }]
    &lt;p class="fs10" style="margin-top: 0px; margin-bottom: 5px; color: #5E5E5E; height: 26px;"&gt;[{ oxmultilang ident="DETAILS_READYFORSHIPPING" }]&lt;/p&gt;
  [{/if}]
  [{/if}]
&lt;/div&gt;
  
[{else}]
&lt;div class="status"&gt;
  [{if $product-&gt;getStockStatus() == -1}]
  &lt;div class="flag red"&gt;&lt;/div&gt;
    [{ if $product-&gt;oxarticles__oxnostocktext-&gt;value  }]
        [{ $product-&gt;oxarticles__oxnostocktext-&gt;value  }]
    [{elseif $oViewConf-&gt;getStockOffDefaultMessage() }]
        &lt;p class="fs10" style="margin-top: 0px; margin-bottom: 5px; color: #5E5E5E; height: 26px;" &gt;[{ oxmultilang ident="DETAILS_NOTONSTOCK" }]&lt;/p&gt;
    [{/if}]
  [{elseif $product-&gt;getStockStatus() == 1}]
  &lt;div class="flag orange"&gt;&lt;/div&gt;
  &lt;p class="fs10" style="margin-top: 0px; margin-bottom: 5px; color: #5E5E5E; height: 26px;"&gt;[{ oxmultilang ident="DETAILS_LOWSTOCK" }]&lt;/p&gt;
  [{elseif $product-&gt;getStockStatus() == 0}]
  &lt;div class="flag green"&gt;&lt;/div&gt;
  [{ if $product-&gt;oxarticles__oxstocktext-&gt;value  }]
    [{ $product-&gt;oxarticles__oxstocktext-&gt;value  }]
  [{elseif $oViewConf-&gt;getStockOnDefaultMessage() }]
    &lt;p class="fs10" style="margin-top: 0px; margin-bottom: 5px; color: #5E5E5E; height: 26px;"&gt;[{ oxmultilang ident="DETAILS_READYFORSHIPPING" }]&lt;/p&gt;
  [{/if}]
  [{/if}]
&lt;/div&gt;
[{/if}]
  
    &lt;a id="test_details_[{$testid}]" href="[{ $_productLink }]"[{if $oView-&gt;noIndex() }] rel="nofollow"[{/if}]&gt;[{ oxmultilang ident="INC_PRODUCTITEM_MOREINFO2" }]&lt;/a&gt;
    [{if $isfiltering }]
        [{oxid_include_dynamic file="dyn/compare_links.tpl" testid="_`$testid`" type="compare" aid=$product-&gt;oxarticles__oxid-&gt;value anid=$altproduct in_list=$product-&gt;blIsOnComparisonList page=$pageNavigation-&gt;actPage-1 text_to_id="INC_PRODUCTITEM_COMPARE2" text_from_id="INC_PRODUCTITEM_REMOVEFROMCOMPARELIST2"}]
    [{/if}]
&lt;/div&gt;
&lt;form name="tobasket.[{$testid}]" action="[{ $oViewConf-&gt;getSelfActionLink() }]" method="post"&gt;

Nutzung natürlich auf eigene Gefahr. Ich bin wirklich nur ein Trial and Error Coder, wie mancheiner erkennen wird :wink:

Ich kann nur empfehlen dies so oder ähnlich umzusetzen, da m.E. das schnelle Erkennen des Lagerstatus eine wichtige Rolle für den Kunden spielen dürfte.

Gruß

Jan

…nur falls jemand nach einer Lösung für die aktuelle CE 4.5.4 Azure sucht. Einfach diesen Code zum Beispiel in die tpl/widget/product/listitem_infogrid.tpl (für “Galerie zweispaltig”) an die gewünschte Stelle einfügen:


        [{block name="details_productmain_stockstatus"}]
            <div class="stockstatusBox">
                [{if  $product->getStockStatus() == -1}]
                    <span class="stockFlag notOnStock" itemprop="availability" href="http://schema.org/OutOfStock">
                        [{if  $product->oxarticles__oxnostocktext->value}]
                            [{ $product->oxarticles__oxnostocktext->value}]
                        [{elseif $oViewConf->getStockOffDefaultMessage()}]
                            [{oxmultilang ident="DETAILS_NOTONSTOCK"}]
                        [{/if}]
                        [{if  $product->getDeliveryDate()}]
                            [{oxmultilang ident="DETAILS_AVAILABLEON"}] [{$oDetailsProduct->getDeliveryDate()}]
                        [{/if}]
                    </span>
                [{elseif  $product->getStockStatus() == 1}]
                    <span class="stockFlag lowStock" itemprop="availability" href="http://schema.org/InStock">[{oxmultilang ident="DETAILS_LOWSTOCK"}]</span>
                [{elseif $product->getStockStatus() == 0}]
                    <span class="stockFlag" itemprop="availability" href="http://schema.org/InStock">
                        [{if $product->oxarticles__oxstocktext->value}]
                            [{ $product->oxarticles__oxstocktext->value}]
                        [{elseif $oViewConf->getStockOnDefaultMessage()}]
                            [{oxmultilang ident="DETAILS_READYFORSHIPPING"}]
                        [{/if}]
                    </span>
                [{/if}]
            </div>
        [{/block}]

Für die “Galerie” wäre es die “listitem_grid.tpl”, für “Liste” wäre es “listitem_line.tpl”.

Beste Grüße
Sebastian

wenn ich diesen Code einfüge, wird die “Flag” hinter den Text eingefügt, d.h. der Text ist über den grünen gelben oder roten punkt,
mache ich was falsch?