How Are Values for Bundle Product Stored in the Database

bundled-productdatabasemagento-1.9magento2

I wanted to know the flow which is being use while saving bundle product.
In database their are two main tables, catalog_product_bundle_option and catalog_product_bundle_option_value, which store data related to options of bundle item of product.

But how does Magento know when to store data in catalog_product_bundle_option and when in catalog_product_bundle_option_value?

It is not like static type of attribute which is used for saving EAV data.

Best Answer

I will try to explain brief about Bundle product. the below 3 tables important for bundle product

catalog_product_bundle_option

catalog_product_bundle_option_value

catalog_product_bundle_selection

Example :

Sprite Yoga Companion Kit consider as bundle product.

Sprite Stasis Ball : : consider as bundle associate bundle item title.

1) Sprite Stasis Ball 55 cm - This product as simple product want to display as radio button

2) Sprite Stasis Ball 65 cm - This product as simple product want to display as radio button

3) Sprite Stasis Ball 75 cm - This product as simple product want to display as radio button

enter image description here

How it will store in Table?

catalog_product_bundle_selection : associate bundle items and price are stored in this table.

catalog_product_bundle_option : How we want to display (Radio,Multiple select, dropdown,checkbox) is stored in this table. In this table "Type" is the colum as (Radio,Multiple select, dropdown,checkbox).

catalog_product_bundle_option_value : option type title stored in table. Title is the value of option. (Example : Sprite Stasis Ball)

Hope it will clear i think

Related Topic