6

I have imported some products and for some items, I can see all the children linked in the associated tab but for some others, I can only see one or 2 of the options.

If I do

select * from catalog_product_super_link where parent_id = {my parent id}

Then it shows ALL the correct product ids linked. Is there another table which links the two?

1 Answer 1

21

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

  1. catalog_product_super_attribute - holds the configurable attributes
  2. catalog_product_super_attribute_label - holds the store view labels for the configurable attributes - this is not that important
  3. 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.
[EDIT]
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:

Mage::getResourceSingleton('catalog/product_relation')
    ->processRelations($mainProductId, $productIds);
4
  • Ok, catalog_product_relation has both items. catalog_product_super_attribute has the correct attribute_id associated. Anywhere else that could be breaking the link?
    – webnoob
    Commented Sep 19, 2013 at 14:38
  • This answers the question. My issue was the has_options and required_options being set to 1 against the children so they didn't show.
    – webnoob
    Commented Sep 19, 2013 at 15:07
  • p.s Many thanks Marius, useful information.
    – webnoob
    Commented Sep 19, 2013 at 15:07
  • 4
    Table catalog_product_relation is used by indexers. Simple associated attributes values are stored in table catalog_product_index_eav too. If the relations are missing in the first table than there won't be values in the second table for associated products. The result is no options to select for associated products in filter navigation (e.g. values of attributes like: color, size, ..). Commented Jul 14, 2014 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.