Jump to content

Product Availability(status from Product) on product-list


Recommended Posts

Dear Friends,

 

I have wanted and tried to make an modification of product-list.tpl template, that this template would show current availability status from product.tpl template.

In other words i would like to get product-list.tpl with information "Available" or "Available for order only".

 

So I have copied a line from product.tpl

 

<!-- availability -->
  <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
   <span id="availability_label">{l s='Status:'}</span>
   <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>
   {if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='Available for order Only!'}{/if}{else}{$product->available_now}{/if}
   </span>
  </p>

 

 

After puting it below "Add to cart" button(on product-list.tpl), it didn't appear, What am I doing wrong?

May i ask you for help?

 

Thank you very much in avance

 

Best Regards

Adey

Link to comment
Share on other sites

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

Dear Friends,

 

I have wanted and tried to make an modification of product-list.tpl template, that this template would show current availability status from product.tpl template.

In other words i would like to get product-list.tpl with information "Available" or "Available for order only".

 

So I have copied a line from product.tpl

 

<!-- availability -->
   <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
    <span id="availability_label">{l s='Status:'}</span>
    <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>
    {if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='Available for order Only!'}{/if}{else}{$product->available_now}{/if}
    </span>
   </p>

After puting it below "Add to cart" button(on product-list.tpl), it didn't appear, What am I doing wrong?

May i ask you for help?

 

Thank you very much in avance

 

Best Regards

Adey

 

 

++Bumpty bump!

 

looking for the same thing, have you figure it out?

 

Tanks

Link to comment
Share on other sites

  • 4 months later...

++Bumpty bump!

 

looking for the same thing, have you figure it out?

 

Tanks

Maybe it helps u or other:

 

I have idea to add icon where customer could see available date on product - list. This is my code and it works on 1.5 presta.

{if $product.quantity >= 1}
<span class="fast_delivery_icon" title="{l s='Fast shipping'}"></span>

{elseif $product.available_date > $smarty.now|date_format:'%Y-%m-%d'}

<span class="pre-order_icon" title="{l s='Available shipping date:'} {$product.available_date}"</span>
Link to comment
Share on other sites

×
×
  • Create New...