Skip to main content

Why is the Relation Between a Configurable Product and a Simple Product Stored Twice?


Deep dive on the Magento internals here, not looking for a solution to a concrete problem, just trying to understand some implementation details.



When you create a Configurable Product in Magento, and then create child Simple Products to implement things like shirt size, color, etc., Magento stores this relationship in two separate tables.




catalog_product_relation
catalog_product_superlink_table



Why are these relationships stored twice?



Is this legacy code, or is there a semantic distinction between a product relation link and a product "superlink" link?



Does the system expect these to be the same, or is it a valid object state to have these tables representing different parent/child relationships?


Source: Tips4allCCNA FINAL EXAM

Comments

  1. Why is great question. The catalog_product_super_link table only contains data related to configurable products. catalog_product_relation also contains the relation information for bundled and grouped products, in addition to the configurable relations.

    All the business logic revolving around configurable products refers to the catalog_product_super_*tables, e.g. finding the configurable attributes and price updates for a configurable product.

    The catalog_product_relation table in contrast is used by classes not specific to configurable products, like the abstract catalog product indexer classes.

    It seems that the Magento core team wanted to separate the logically distinct functionality not only into separate PHP classes, but also into separate database tables. Possible advantages? I guess theoretically it is easier this way to change the configurable product implementation without disrupting the indexer implementation.

    This is just a guess - I haven't confirmed that or spoken with someone who "knows" (mental-note-for-imagine)

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

CCNA 3 Final Exam => latest version

1 . Which security protocol or measure would provide the greatest protection for a wireless LAN? WPA2 cloaking SSIDs shared WEP key MAC address filtering   2 . Refer to the exhibit. All trunk links are operational and all VLANs are allowed on all trunk links. An ARP request is sent by computer 5. Which device or devices will receive this message? only computer 4 computer 3 and RTR-A computer 4 and RTR-A computer 1, computer 2, computer 4, and RTR-A computer 1, computer 2, computer 3, computer 4, and RTR-A all of the computers and the router   3 . Refer to the exhibit. Hosts A and B, connected to hub HB1, attempt to transmit a frame at the same time but a collision occurs. Which hosts will receive the collision jamming signal? only hosts A and B only hosts A, B, and C only hosts A, B, C, and D only hosts A, B, C, and E   4 . Refer to the exhibit. Router RA receives a packet with a source address of 192.168.1.65 and a destination address of 192.168.1.161...