Amazing Support!
The team behind the extension is probably the best magento certified developers out there, who will simply solve any problem - respo ... Read more

Jan 15, 2015 Dr George A.

Certified Magento Enterprise developer Certified Magento developer Certified Magento theme developer Certified Magento specialist

Manadev is certified extension and theme
developer for Magento

How To Make The Associations In The Database

You can import representing products just like any other ordinary products and after they are imported you can create a script which "links" corresponding representing products together. Our extension doesn't provide any out-of-the-box import script for linking represented products.

Links are stored in EAV format in catalog_product_link and related tables. Below is demonstration from our demo.

Representing products in Admin Panel look like this:

Representing Products

In database, the information from this grid is stored in several tables. First of all in catalog_product_link table products IDS of related products are stored:

DB table CATALOG_PRODUCT_LINK

Columns described:

  • product_id – ID of main product
  • linked_product_id – ID of representing (child product)
  • link_type_id – 6 means "representing product relationship". It is always the same number, most often 6. Exact number can be found in catalog_product_link_type table.

Then please check catalog_product_link_attribute table. You won't need to import anything into it, but there are important IDs of link attributes and in which table attribute is stored:

DB table CATALOG_PRODUCT_LINK_ATTRIBUTE

As you can see 5 attributes are stored for each representing product link:

  • m_parts – value from "Parts" column in the Admin Panel grid
  • m_unit – value from "Unit of measure" column in the Admin Panel grid
  • m_External_id – reserved
  • position – value from "Position" column in the Admin Panel grid
  • m_pack_qty – value from "Pack Qty" column in the Admin Panel grid
  • data_type columns states in which table each attribute is stored. You can see that there are 3 additional tables used. Below these tables are listed and data for our sample product is also provided:

    1) catalog_product_link_decimal:

    DB table CATALOG_PRODUCT_LINK_DECIMAL

    2) catalog_product_link_varchar:

    DB table CATALOG_PRODUCT_LINK_VARCHAR

    3) catalog_product_link_int:

    DB table CATALOG_PRODUCT_LINK_INT

We Accept: PayPal Visa MasterCard American Express Discover