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.
Representing Product Grid
Representing products are shown in Admin Panel page of the "original" product page:
In the example below, this
product is the original product itself and 2050
and 2051
are IDs of representing products.
ID of the original product is stored in mana_repr_product_id
attribute of representing products. This attribute is only used in representing products and is not assigned to the original product.
Pack Qty, Algorithm and Part/Percent columns are stored in mana_repr_pack_qty
, mana_repr_algorithm
and mana_repr_part
attributes, respectively.
Position of the product in the grid controlled in Admin panel with drag-and-drop of the first column, is stored in mana_repr_position
attribute.
That's all about editable grid settings.
Other Settings
Enable Multiple Representations of This Product and Override Existing Product Attributes toggles are stored in mana_repr_enable
and mana_repr_override
attributes of the original product, respectively. These attributes are only used in the original products and are not assigned to the representing products.
Calculated Represented Quantity
The extension uses all these settings to calculate represented qty whenever original qty changes (is imported or sale/refund of original or representing product happens). The calculated represented qty is stored in mana_repr_qty
and mana_repr_qty_text
attributes (same value, the only difference is that the former attribute is decimal and the latter is varchar
).
For easier use with M2E, our extension also internally saves the calculated represented qty into the standard product qty.
Don't try to assign represented qty manually. Otherwise the extension may "think" it is Magento trying to register some sale and it will count the qty difference into the original qty.
Instead, assign editable attributes mana_repr_product_id
, mana_repr_pack_qty
, mana_repr_algorithm
, mana_repr_part
, mana_repr_position
, mana_repr_enable
and mana_repr_override
attributes as described above and then call stored procedure to calculate represented qties passing the ID or the original product:
CALL mana_many_sku_calc_product(1)