Magento - Software added product with the package is not available for the basket / interface

I followed this answer, which works great: Magento - The software-added package product does not appear in the interface

I can generate a batch packet on the fly. Everything is working fine.

Only one problem: my batch product is saved correctly and I see it through the admin area. But, after this generation on the fly, I have to add this product directly to the basket. The system returns "product not found". Basically, I have to go into the admin area, just save it, and then I can add it to the cart.

I really suspect a problem with the index, but I cannot figure out what is going on.

I tried many solutions like:

Mage::getSingleton('index/indexer')->processEntityAction( $product, Mage_Catalog_Model_Product::ENTITY, Mage_Index_Model_Event::TYPE_SAVE ); 

But that still doesn't work. Any idea of ​​what code I should run after saving the method to index only this new product of the added package.

Thanks in advance.

+4
source share
1 answer

It seems that you are not creating a product with your product. Therefore, there is no stock, and you can not add it to your basket?

Take a look

 /app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php:672 /app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php:571 

where the product is created and stock data is cleared / installed with default data

0
source

Source: https://habr.com/ru/post/1411635/


All Articles