Jump to content
Sign in to follow this  
fat_dog

Product Attributes

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 does anyone have any suggestions where to look -- what files actually do these checks?

 

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!

Share this post


Link to post
Share on other sites

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

 

I too would really appreciate some help with this. I'm sure there must be a way to fix it, but I'm no programmer. At the very least, could some code be written that would force a quantity warning to appear in the cart (in much the same way as it does when someone tries to change a product quantity to more than is currently stocked) and therefore prevent checkout? Something that would make the cart recognise that despite whether a product has any attributes or not, it's still the same single product with the same quantity limitation...

 

Sincere thanks in advance for any help you can offer!

 

Elaine

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
Sign in to follow this  

×