Closed kate1zheng closed 5 years ago
when setting the stockstatus as 'force in stock', the response is: "stock" : { "stockLevelStatus" : "inStock" }, when setting the stock status as 'not specified', the response is: "stock" : { "stockLevel" : 22, "stockLevelStatus" : "inStock" },
however, in add-to-cart component, the stock logic is this.hasStock = product.stock && product.stock.stockLevelStatus !== 'outOfStock' && product.stock.stockLevel > 0; it doesn't consider the situation 'force in stock'
Investigate if it's a spartacus issue or if we need to request an update in the api.
+1 Besides, in SAP Commerce, if you don't associate any warehouse to the basestore, it will generate by default a stock with StockLevel == 0 (see de.hybris.platform.commercefacades.product.converters.populator.StockPopulator), so the condition on (product.stock.stockLevel > 0) fails.
Looks like it fixed:
QA:
When changing the stocks, it takes a while before it updates its in the backend. Wait ~45s and refresh the product page or navigate to it if you closed it.
Tested it on dev10 with hybris-commerce-suite-1905.6.zip (and develop branch of spartacussampledataaddon and commercewebservicesdata).
It is working like you describe it.
Environment Details
Steps to Reproduce
Observed Results
the product is shown as out of stock
Expected Results
should show 'available online' like on-premise
Repository Used
Offer to Fix
Additional Information