Fast #magento reindex after product import with magmi

Importing products with magmi, a full reindex is needed to show the on the frontend. Even if Magmi has an on-fly reindexer, it seems to me not working properly, as I still not able to see products.

To avoid full reindexing that take ages on a big catalog, I simply disabled and the enabled latest products using the mass action functionality in the backend. After that, finally product are visible.

To reindex product attributes, as the filtered navigation doesn’t work anymore, I removed then added again products from a store view

Get configurable product attributes and products children #Magento

load configurable product
$product = Mage::getModel('catalog/product')->load($productId);

get simple produts’ ids
$childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product->getId());

get simple products
$childProducts = Mage::getModel('catalog/product_type_configurable')

get configurable options
$productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
$attributeOptions = array();
foreach ($productAttributeOptions as $productAttribute) {
foreach ($productAttribute['values'] as $attribute) {
$attributeOptions[$productAttribute['label']][$attribute['value_index']] = $attribute['store_label'];

Convert Simple Products to Configurable Products

Into the database. If you now go into your database, find the ‘catalog_product_entity’ table. You’ll see a column called ‘type_id’. Search for the entity_id as the product_id. This should largely be set to ‘simple’. This needs to be changed to ‘configurable’.

Back to the products. So, back in the Magento admin, if you find one of the products that you’ve just converted to configurable, it will ask you to ‘Select Configurable Attributes’. You’ll see all of the descriptions, images prices are still there.

Adding Simple Products. In the side tabs, select ‘Associated Products’. Here, you can use the quick add form to add the variants of your configurable product.