Stock attribute combinations available to order that do not exist!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Either I'm missing a setting here or I've found a bug.

Managing stock via an items attributes: colour and size. I have, for example, black available in small and then medium and red in medium and large. It shouldn't be possible to add the the item in black and large to the cart - but for some reason I am able too.

I've tested this all the way through check out and it also allows me to place the order event though it technically does not exist.

Have a missed something in my configuration? Is this a bug? Is this by design?

This is in version 2.65 and version 2.8.
11 years ago
JaxUK wrote:
Either I'm missing a setting here or I've found a bug.

Managing stock via an items attributes: colour and size. I have, for example, black available in small and then medium and red in medium and large. It shouldn't be possible to add the the item in black and large to the cart - but for some reason I am able too.

I've tested this all the way through check out and it also allows me to place the order event though it technically does not exist.

Have a missed something in my configuration? Is this a bug? Is this by design?

This is in version 2.65 and version 2.8.

Check this example. Make sure that:
- In product variant info you have set Manage inventory method: Track inventory by product attributes
- In each of the PV attributes combinations "Allow out of stock" is unselected
11 years ago
That example has the same issue...

To demonstrate: for any combination set stock qty = 0 and allow out of stock = false.

The UI reports it is in stock and you can add it to the cart and order.
11 years ago
JaxUK wrote:
That example has the same issue...

To demonstrate: for any combination set stock qty = 0 and allow out of stock = false.

The UI reports it is in stock and you can add it to the cart and order.

The front and back end of the demo are independent. Whatever you set in the back end will not be reflected in the store demo
11 years ago
Ok, bad example...

But this problem still persists.

There is not postback made to the server to check if the attribute combination is in stock and the item can be added to the cart even though it A: Does not exist and never has done or B: is out of stock.
11 years ago
Please do not duplicate forum topic (deleted). Eduardo already answered you and his solution works just fine. There's no any issue.

Is your 'Manage inventory method' set to 'Track inventory by product attributes'?
11 years ago
Apologies for the duplication - There are some specifics to reproduce this issue, it's not about being able to order things which are out of stock - but things which never were in stock or existed in the first place.

"Manage inventory method:" is set to: "Track inventory by product attributes".

I will try to give a more thorough example.

Example:

Product has 2 attributes. Colour (Pink and Balck) and Size (Medium and Large).

Product has 2 attribute combinations: 1=Pink+Medium 2=Black+Large.

In this example there is no attribute combination of Black+Medium for the product.

However it is possible to order the product in Black+Medium even though it does not exist.

If I add the attribute combination Black+Medium and set it's stock level to zero it is not possible to order the item.
11 years ago
JaxUK wrote:
If I add the attribute combination Black+Medium and set it's stock level to zero it is not possible to order the item.

That is the correct solution Eduardo described. What exactly is wrong with it?
11 years ago
a.m. wrote:
That is the correct solution Eduardo described. What exactly is wrong with it?


I would not expect to be able to order something where the product attribute combination does not exist.

If items are being tracked by their attribute combinations and an attribute combination does not exist I would expect the system to prevent you from ordering it (assume no stock) OR that the admin interface prompts you that you have not accounted for all attribute combinations to prevent admins from making this mistake.
10 years ago
instead of entering qty "0" for attribute combinations is not some code that can check against the attribute if it does not exist to give "Out of Stock" when placing the order..

eg.else
{
    warnings.Add(LocalizationManager.GetLocaleResourceString("ShoppingCart.OutOfStock"));
}

This code is from 1.9 but where can this code be added in 2.8?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.