Jump to content

$product.allow_oosp always returns 0 on Product List


Recommended Posts

Hi:

I'm trying to setup a custom message both in my product page and product list page for product backorders, but I'm having a bit of an issue. In the product page it works as intended. Shows In Stock when theres stock for the combination selected, returns Backorder message when $product.quantity =< 0 and $product.allow_oosp is set, and shows an Out of Stock message when There are no units left and $product.allow_oosp is not set. Search results and various modules (like featured products) work like they're supposed to, returning the original $category.allow_oosp value.

However in my product list (Category page) It returns In stock when $product.quantity_all_versions > 0 (as intended) and it ALWAYS defaults to out of stock when quantity for all combinations is 0 or lower, and what's more interesting, {$category.allow_oosp} value is ALWAYS 0.

Is it possible the loop isn't returning that variable at all on product list?

{if $product.quantity_all_versions > 0}
	<span class="stocklabel">{l s='In stock' d='Shop.Theme.Product'}</span>
{else}
	{if $product.allow_oosp}
		<span class="stocklabel backorder">{$product.available_later}</span>
	{else}
		<span class="stocklabel oos">{l s='Not available' d='Shop.Theme.Product'}</span>
	{/if}
{/if}

All help is appreciated. I'm quite a newb, as you may notice ­čśĽ┬á

Edited by Luis C
more info. (see edit history)

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More