Jump to content

Cart shows not available as available


Recommended Posts

No. This text is the only thing that is correct about what's in stock.

Stock salary for this product is -2. The text says "Not in stock" which is correct. If you go back to the category which this product is in it says Tillgänglig - Available which is wrong. If you add it to your cart and go look in your cart you will see a green icon next to this, indicating available which is wrong.

Link to comment
Share on other sites

Ok, will do that first thing monday.

 

I did some more testing. Maybe any of this will help.

I changed "when out of stock" from allow to deny.

Category shows "Out of stock"

 

If I set "when out of stock" to allow, add the product to my cart, set "when out of stock" to deny and then look in my cart the product is shown as unavailable.

 

EDIT:

Exactly the same error occurs on a fresh installation of prestashop on my laptop.

Link to comment
Share on other sites

I'm too tired to phrase a proper bug report at the moment. I went ahead and located the error in the code instead.

 

product-list.tpl

{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}

 

shopping-cart-product-line.tpl

{if $product.active AND ($product.allow_oosp OR ($product.quantity <= $product.stock_quantity)) AND $product.available_for_order AND !$PS_CATALOG_MODE}

 

What does $product.allow_oosp have to do with what's in stock and not?

I removed $product.allow_oosp from both files and the shop now behaves the way I expect it to. The whole idea with stock indication and allow order when out of stock is to give my customers the option to order something that they know is out of stock. That's my view as a merchant.

 

Do you still want me to file that bug report or can your development team take it from here?

 

Thanks alot for your time!

  • Like 1
Link to comment
Share on other sites

It's still best if you create the bug report so that we have a place to record all work on this issue, and therefore have information on it (including the solution) for anyone who may struggle with this in the future. If you aren't up for it right now, take your time and do it on your own time, but just let me know once you've posted it so that I can keep an eye on our progress!

-Mike

Link to comment
Share on other sites

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