Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Product Attributes Help... Bug with OSC?


Recommended Posts

Hi Everyone,


I have noticed a bug with my store that I'm hoping someone will know the answer to. If you take an item with a stock level of 1, add it once to your basket with "Attribute A" selected (eg "Original Non-Painted"), then add it again with "Attribute B" selected (eg "Painted By Us"), it adds the product to the cart as two seperate products, even though the actual product is the same, and in stock just the once.


It will allow you to check out both items, and allocates the item twice, ending up with a stock level of -1. Do Not Allow Out of Stock Items to checkout is enabled, so we should never run into this situation. However products with attributes assigned seems to bypass this check.


I'm thinking its a standard bug with OSC? If not, it could well be my code... does anyone have any suggestions where to check -- what files do these checks?


Many thanks! :blink:

Link to comment
Share on other sites

I have done a bit more digging and I think the problem is coming from the way it inserts (and presumably checks stock) on attribute items added to the basket.


For instance, on my test item of pID 4252 instead of just inserting "4252" in osc_customers_basket under products_id, it is inserting 4252{2}5 and 4252{2}4 - the {2}5 part of it being the attribute.


If the subsequent checks on stock are looking at 4252{2}5, it isn't going to relate to the original product - however it must do at some point in the process to get back to allocating it down to -1.


Help would be most appreciated!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...