Magento – Assign Configurable Product Image to Its Associated Product

simple-product

As you know, in current magento version, image of associated products could not be derived from the configurable product, thus we had to manually upload the product image again. Imagine that we are going to create hundreds or thousands simple products. This is very time consuming.

My question, is there any extension or good solution for this issue? Like say, while creating associate product, there an option for us to tick if we want to use configurable product image for the new associate product. Then if choosing yes follow by clicking on save button, system would store the same image path (record) into database for the new associated product.

Thank you for your kind attention.

Kind Regards.

Best Answer

I highly recommend a free extension called Simple Configurable Products (SCP). This extension allows you to show different images, descriptions, prices, etc depending on which attribute is selected. It also allows more advanced pricing and simpler adding of configurable products to the system. Overall, it saves time and makes the buying process easier...which is what eCommerce development is about!

More specific to your question, I believe the extension will default back to the simple product image if the child product doesn't have an image associated with it.

The only caveat with using this extension is that the extension has not been updated for a while, so you have to apply some patches for it to with with newer versions. These are easy updates. I have the extension working great with 1.8.1.

Install Process:

  1. Install Simple Configurable Products on Magento Connect:
  2. Fix indexing by replacing the file app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php contents with this: http://pastebin.com/spVj88T4
  3. Update the file app/code/community/OrganicInternet/SimpleConfigurableProducts/Checkout/Block/Cart/Item/Renderer.php with:

    class OrganicInternet_SimpleConfigurableProducts_Checkout_Block_Cart_Item_Renderer extends Mage_Checkout_Block_Cart_Item_Renderer
    {
        protected function getConfigurableProductParentId() //U PDATED
        {
            // FIX TO SHOW CORRECT IMAGE IN CART
            $parentIds = Mage::getResourceSingleton('catalog/product_type_configurable')->getParentIdsByChild($this->getItem()->getProductId());
            if($parentIds[0]) {
                return $parentIds[0];
            }
            return null;
        }
    
Related Topic