Jump to content

(Vyriešené) dostupnost v product-list.tpl


tozi

Recommended Posts

Ahojte mám malý problém alebo skôr otázku.

V súbore product-list.tpl som nahradil

túto časť

{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}



týmto

            <!-- availability -->

quantity == 0 && !$product->available_later) || (!$product->available_now && $display_qties != 1) } style="display:none;"{/if}>
{l s='Availability:'}

quantity == 0} class="warning-inline"{/if}>
                   {if $product->quantity == 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}



Ale nefunguje to. Vie mi niekto poradiť čo je zle?

Ďakujem za pomoc.


edit (riešenie):

<!-- availability -->




       {if $product.quantity == 0}{if $allow_oosp}{$product.available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product.available_now}{/if}

 

Link to comment
Share on other sites

Zdravim, taky by me toto zajimalo a hlavne bych rad, aby se to nekde dalo hramodne nastavit, jako napriklad (Skladem/Neni skladem) a jeste idealne barevne odlisit zelena/cervena)
Pokud nikdo nevite, tak to asi budu muset nejak vykoumat :o(, pac bez toho je shop naprd, aby vsude bylo skladem je nesmysl.
Predem diky.

Link to comment
Share on other sites

Takze ted jsem zjistil, kdyz smazu toto:

$allow_oosp &&

a jinak tam necham puvodni, co tam maji, tak to konecne ukazuje spravne, zda to skladem je ci neni. Jeste si pohraju s barvama a bude to super.
Vic jsem momentalne nechtel, tak je to pro me vyresene.

Link to comment
Share on other sites

<!-- availability -->

quantity == 0 && !$product->available_later) || (!$product->available_now && $display_qties != 1) } style="display:none;"{/if}>
{l s='Availability:'}

quantity == 0} class="warning-inline"{/if}>
                   {if $product->quantity == 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}

 



$allow_oosp && - toto jsem smazal v tom puvodnim kodu, co jsi psal, barvy jsem jeste neresil.
Mas to hnedka pred tim $product->quantity, ani jsem neresil, co to jinak dela, ale nechapu, nac to tam je, kdyz to pak ukazuje nesmysly.

Link to comment
Share on other sites

  • 5 months later...
  • 4 months later...

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