Jump to content

Stock availability on product-list


Niller

Recommended Posts

Hey Pascal.

Thanks for answer.

I want to show the text from

products->stock amount-> Text that appears when the product is available/ Text that appears when the product can pre-order:

Do you have any tips here :)

Best regards

Link to comment
Share on other sites

Product depeendent available- Text can be shown like this:

 

themes/<your theme folder>/product-list.tpl

 

Find this piece of code and add red code:

 

<div class="content_price">
  {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if}
  {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{*{l s='Available'}*}{$product.available_now}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>{/if}
</div>
 
 
By default, the product list never shows the "Displayed text when allowed to be back-ordered", only 'Available'/'out of stock'. Do you really need this as well, that we have to find out how to add this to the product-list.tpl file.
 
So let me know if you really need it.
 
pascal.
Link to comment
Share on other sites

OK, maybe try this:  

Edit file themes/<your theme folder>/product-list.tpl      again.     (Make backup first!)

Add red code:

 

 

<div class="content_price">

  {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if}

  {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp && $product.quantity lte 0)}{$product.available_later}{elseif ($product.allow_oosp || $product.quantity > 0)}{*{l s='Available'}*}{$product.available_now}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>{/if}

</div>

 

 

Give it a try,

pascal

  • Like 1
Link to comment
Share on other sites

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