Jump to content

[Solved] Stockmessage only showing on product page, not on product listing.


Recommended Posts

I just discovered that if i make a custom stock message only in the ...when out of stock: field that it is not showing on the product info page. After i add a custom message in ....when in stock: then the out of stock message will show up.

Is that a bug?

Also i'd like to see in the custom message in the product listing, couse now if it is out of stock, and ordering the product is allowed on the product-listing it show: in stock, while there is no stock! Bug?

Is there anyone who knows a code solution to show up the custom ...when out of stock: text in the product listing?

Thanks in advanced.

Marco

3735_grds7fqsSAj5cmJUk1tm_t

Link to comment
Share on other sites

  • 2 months later...

Hi there,

It seems to be more questions than answers on this topic. I have found several threads requesting this functionality and no answers. However it should not be that hard to find a solution. The nessesary code is already in the product details and it shouldn't be that much job to implement it into the product-list.tpl and homefeatured.

I would really appreciate if someone could help me on this one. I'm not that into coding (yet)...

//peej

Link to comment
Share on other sites

I just discovered that if i make a custom stock message only in the ...when out of stock: field that it is not showing on the product info page. After i add a custom message in ....when in stock: then the out of stock message will show up.

Is that a bug?

Also i'd like to see in the custom message in the product listing, couse now if it is out of stock, and ordering the product is allowed on the product-listing it show: in stock, while there is no stock! Bug?

Is there anyone who knows a code solution to show up the custom ...when out of stock: text in the product listing?

Thanks in advanced.

Marco


Hi Marco,

I think I managed to fix it. You will have to change the following code in product-list.tpl:

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



into:

{if $product.quantity > 0}{$product.available_now|escape:'quotes':'UTF-8'}{else}{if $product.allow_oosp}{$product.available_later|escape:'quotes':'UTF-8'}{else}{l s='Out of stock'}{/if}{/if}



//peej

Link to comment
Share on other sites

  • 10 months later...
  • 5 months later...
  • 2 weeks later...

Hi all,
This is how I've done it,
{if ($product.allow_oosp==0 OR $product.quantity > 0)}{l s='Available' mod='filtersearch'}{else}{l s='Back Order' mod='filtersearch'}{/if}

The code above shows "Available" when in stock and "Back Order" when there's 0 stock.
If your not using the filter search mod u need to delete mod='filtersearch' from the code.

What i would like to see is the available stock shown on the product list page, anyone know where the code is to pull the stock available.

Cheers
Andy

  • Like 1
Link to comment
Share on other sites

  • 1 year 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...