Skip to content

Instantly share code, notes, and snippets.

@trabulium
Created July 8, 2013 23:47
Show Gist options
  • Save trabulium/5953464 to your computer and use it in GitHub Desktop.
Save trabulium/5953464 to your computer and use it in GitHub Desktop.
Magento: Export of Product Options to assist converting to configurables
SELECT DISTINCT `main_table`.*,
`product_option`.`product_id` AS `entity_id`,
`product_option`.`option_id` AS `option_id`,
`store_value_title`.`title` AS `store_title`,
`default_value_id`.`option_type_id` AS `default_value_type_id`,
`default_value_title`.`title` AS `default_title`
FROM `catalog_product_entity` AS `main_table`
INNER JOIN `catalog_product_option` AS `product_option`
ON product_option.product_id = main_table.entity_id
INNER JOIN `catalog_product_option_title` AS `store_value_title`
ON store_value_title.option_id = product_option.option_id
INNER JOIN `catalog_product_option_type_value` AS `default_value_id`
ON default_value_id.option_id = store_value_title.option_id
INNER JOIN `catalog_product_option_type_title` AS `default_value_title`
ON default_value_title.option_type_id = default_value_id.option_type_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment