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.
source share