You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how to replicate this, in our installation we had swatches enabled for configurable products by size and upgraded to the newer version only to see that all swatches even for not-saleable products would show up in category display page, but when the user would click on any product, in the product display page he would see only the saleable products instead.
It turns out that the stock item is not properly loaded giving me a null value normally when used like this
Preconditions (*)
Steps to reproduce (*)
I'm not sure how to replicate this, in our installation we had swatches enabled for configurable products by size and upgraded to the newer version only to see that all swatches even for not-saleable products would show up in category display page, but when the user would click on any product, in the product display page he would see only the saleable products instead.
It turns out that the stock item is not properly loaded giving me a null value normally when used like this
$isInStock = $childProduct->getStockItem()->getIsInStock();
By switching to load the stock item properly it works perfectly fine
e.g.
Expected result (*)
Actual result (*)
CDP
PDP
The text was updated successfully, but these errors were encountered: