Disabling or hiding configurable products on multi-store
Magento v. 126.96.36.199
The scenario is:
- multi-store (10+ countries)
- products for each store have their own stock (one or more warehouses)
What I do is go over every store and if there is no stock for any of the child products in any of the warehouses for that store I set the 'visibility' attribute on the configurable product for that store to 'not visible individually' (works the other way around also if stock goes up after sync from external system).
The desired result is that any product that is not in stock for that specific store is not available in catalog, search. I can't just disable the product because that is a global setting.
The code as far as inserting/updating 'visibility' attribute is working fine. But Magento still displays the product on the frontend even though it's set as 'not visible individually' (reindex & cache flush don't help).
it doesn't work even if I set everything manually so it is not a problem in my code as far as I can tell ...
Setting to 'not visible individually' should exclude the product from catalog, search ... right?
Pass Your CompTIA CASP Certification Exams In First Go
Which seems to calculate the total quantity available of the product in the required sources but fails to take into account the store view and the simple product (child of configurable in this case) status in the store view. If the Casp Exam Questions focus here is just to mark the salable quantity and then filter it out somewhere else I'm not sure where this would happen. However it seems that the isSalable function will look in the inventory_stock_X tables and if the product is salable it will appear in the lists even though it shouldn't.