Magento 1: What table links a simple product to a configurable product

The table catalog_product_super_link but the other tables that start with catalog_product_super_ are involved in the relation.

catalog_product_super_attribute - holds the configurable attributes
catalog_product_super_attribute_label - holds the store view labels for the configurable attributes - this is not that important
catalog_product_super_attribute_pricing - holds the price differences for the simple variations
There is also the table catalog_product_relation that seam to remember the configurable products relations.
After checking I confirm that the configurable products relations are remembered in 2 tables. This seams redundant but I'm sure there is a reason.
In the method Mage_Catalog_Model_Resource_Product_Type_Configurable::saveProducts() there is this that inserts the data in catalog_product_super_link :
 $this->_getWriteAdapter()->insertMultiple($this->getMainTable(), $data);
And after that there is this that saves the data in catalog_product_relation:
    ->processRelations($mainProductId, $productIds);

0 Bình luận

Trở về
  • HTML5 Canvas
  • HTML5 Canvas

     The <canvas> element is used to draw graphics, on the fly, on a web page. Draw a red rectangle, a gradient rectangle,...