Jump to content

Product level "when out of stock" setting does not work on category pages.


Recommended Posts

Hi,

 

We just noticed this on our product-list pages.

 

So, in the product preferences we have set the global "Allow ordering of out of stock products" to YES.

 

We want customers to be able to order out of stock items by default for most of our items, as we can acquire them with very little down time.

 

However, we have a few items that are discontinued/clearance items. For these items we need to set the exact inventory and not allow any orders beyond the available quantity. So, for those specific products we set the "When out of stock:" settings to "Deny Order" on the specific product quantity edit page.

 

Here is the issue...

 

When these items are listed in the product-list pages, the available items should show the "Add to Cart" button. But products that have been set to Deny Order (product specific setting) and have a quantity of 0, should disable the "Add to Cart" button (we have customized ours to say "Out of Stock" via if-else statement).

 

However, this is not the case... for some reason PS ignores the product specific out of stock ordering settings and only honors the global settings. So ALL products have the "Add to Cart" button enabled even if they are out of stock and have deny order settings.

 

The ODD thing is that this only appears to be happening on CATEGORY pages. The settings work properly on other product-list pages... such as, search result pages (doing a search), manufacturer product-list pages, etc. They all work fine.

 

But when we click on a category list page... all items show as available. This is only for the product-list pages as product pages function as they should.

 

We are using 1.5.4.1 and have tested on mutliple installs.

 

Anybody else had this experience? Any known fixes?

 

Thanks!

Edited by mytheory. (see edit history)
Link to comment
Share on other sites

OK...

 

So after a lot of testing over several test sites and new installs...

 

I am fairly confident this issue was occurring when the Layered Navigation module was enabled and setup.

 

Not sure what the reason is (I will open a bug report)... but this module is primary to be used on category pages. So on category pages we had these issues, but also with the AJAX add to cart function. The AJAX pagnation works nicely and a very cool feature, but the module breaks these pages by ignoring product specific settings, and teh add to cart breaks the AJAX function... by this I mean the product is not add to the product with the image transfer, but rather the product is added the old fashioned way... the customer is redirected to the checkout page where the newly added product is listed.

 

So far (still testing)... we have disabeld the module and cleared our cache and everything seems to be working as before. Nice module but still buggy.

 

We are still testing so I will report back if I find a fix or if the bug report proves to be fruitful.

 

Thanks!

Link to comment
Share on other sites

  • 1 month later...

When these items are listed in the product-list pages, the available items should show the "Add to Cart" button. But products that have been set to Deny Order (product specific setting) and have a quantity of 0, should disable the "Add to Cart" button (we have customized ours to say "Out of Stock" via if-else statement).

 

I have all products to deny, so I don't know the solution to your problem. Though I would really like to know what you changed to show "Out of Stock" in category listing.

Thanks

Link to comment
Share on other sites

Hi,

 

You can change that in the /themes/yourtheme/product-list.tpl file.

 

Near the bottom, you can see where the if-else statements are for the "add to cart" buttons. You just have to change the second one to say something else (ie. out of stock) or you can add another elseif statement.

 

HTH!

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