0

I want to gather all my product from magento 1.9 database and upload on other site of magento 1.9 any one know how to do that ? Thanks

1
  • check my answer Commented Nov 5, 2020 at 6:51

2 Answers 2

0

you can fetch information this way ..

SELECT * FROM (
    SELECT 
        ce.sku,
        ea.attribute_id,
        ea.attribute_code,
        CASE ea.backend_type
           WHEN 'varchar' THEN ce_varchar.value
           WHEN 'int' THEN ce_int.value
           WHEN 'text' THEN ce_text.value
           WHEN 'decimal' THEN ce_decimal.value
           WHEN 'datetime' THEN ce_datetime.value
           ELSE ea.backend_type
        END AS value,
        ea.is_required AS required
    FROM catalog_product_entity AS ce
    LEFT JOIN eav_attribute AS ea 
        ON ce.entity_type_id = ea.entity_type_id
    LEFT JOIN catalog_product_entity_varchar AS ce_varchar 
        ON ce.entity_id = ce_varchar.entity_id 
        AND ea.attribute_id = ce_varchar.attribute_id 
        AND ea.backend_type = 'varchar'
    LEFT JOIN catalog_product_entity_int AS ce_int 
        ON ce.entity_id = ce_int.entity_id 
        AND ea.attribute_id = ce_int.attribute_id 
        AND ea.backend_type = 'int'
    LEFT JOIN catalog_product_entity_text AS ce_text 
        ON ce.entity_id = ce_text.entity_id 
        AND ea.attribute_id = ce_text.attribute_id 
        AND ea.backend_type = 'text'
    LEFT JOIN catalog_product_entity_decimal AS ce_decimal 
        ON ce.entity_id = ce_decimal.entity_id 
        AND ea.attribute_id = ce_decimal.attribute_id 
        AND ea.backend_type = 'decimal'
    LEFT JOIN catalog_product_entity_datetime AS ce_datetime 
        ON ce.entity_id = ce_datetime.entity_id 
        AND ea.attribute_id = ce_datetime.attribute_id 
        AND ea.backend_type = 'datetime'
    WHERE ce.sku = YOUR_SKU
  ) AS tab
  WHERE tab.value != "";
4
  • is image url will also be fetched? i need also product image. thanks for your reply Commented Nov 5, 2020 at 6:55
  • @SyzeDeveloper yes it show something like :C:\wamp\www\magento\media\catalog\product\ value Commented Nov 5, 2020 at 7:12
  • thanks bro! I am going to run above query and export as csv then import on new site database . is it correct way ? Commented Nov 5, 2020 at 7:18
  • #1054 - Unknown column 'YOUR_SKU' in 'where clause' i am getting this error Commented Nov 5, 2020 at 7:32
-1

follow this article http://blog.briteskies.com/blog/recover-your-magento-catalog-from-a-mysql-dump

Dump the catalog from the first store with mysqldump and then import into second store

mysqldump -u username -p password database_name catalog_category_anc_categs_index_idx catalog_category_anc_categs_index_tmp catalog_category_anc_products_index_idx catalog_category_anc_products_index_tmp catalog_category_entity catalog_category_entity_datetime catalog_category_entity_decimal catalog_category_entity_int catalog_category_entity_text catalog_category_entity_varchar catalog_category_flat_store_1 catalog_category_flat_store_2 catalog_category_flat_store_3 catalog_category_flat_store_4 catalog_category_flat_store_5 catalog_category_product catalog_category_product_index catalog_category_product_index_enbl_idx catalog_category_product_index_enbl_tmp catalog_category_product_index_idx catalog_category_product_index_tmp catalog_compare_item catalog_eav_attribute catalog_product_bundle_option catalog_product_bundle_option_value catalog_product_bundle_price_index catalog_product_bundle_selection catalog_product_bundle_selection_price catalog_product_bundle_stock_index catalog_product_enabled_index catalog_product_entity catalog_product_entity_datetime catalog_product_entity_decimal catalog_product_entity_gallery catalog_product_entity_group_price catalog_product_entity_int catalog_product_entity_media_gallery catalog_product_entity_media_gallery_value catalog_product_entity_text catalog_product_entity_tier_price catalog_product_entity_varchar catalog_product_flat_1 catalog_product_flat_2 catalog_product_flat_3 catalog_product_index_eav catalog_product_index_eav_decimal catalog_product_index_eav_decimal_idx catalog_product_index_eav_decimal_tmp catalog_product_index_eav_idx catalog_product_index_eav_tmp catalog_product_index_group_price catalog_product_index_price catalog_product_index_price_bundle_idx catalog_product_index_price_bundle_opt_idx catalog_product_index_price_bundle_opt_tmp catalog_product_index_price_bundle_sel_idx catalog_product_index_price_bundle_sel_tmp catalog_product_index_price_bundle_tmp catalog_product_index_price_cfg_opt_agr_idx catalog_product_index_price_cfg_opt_agr_tmp catalog_product_index_price_cfg_opt_idx catalog_product_index_price_cfg_opt_tmp catalog_product_index_price_downlod_idx catalog_product_index_price_downlod_tmp catalog_product_index_price_final_idx catalog_product_index_price_final_tmp catalog_product_index_price_idx catalog_product_index_price_opt_agr_idx catalog_product_index_price_opt_agr_tmp catalog_product_index_price_opt_idx catalog_product_index_price_opt_tmp catalog_product_index_price_tmp catalog_product_index_tier_price catalog_product_index_website catalog_product_link catalog_product_link_attribute catalog_product_link_attribute_decimal catalog_product_link_attribute_int catalog_product_link_attribute_varchar catalog_product_link_type catalog_product_option catalog_product_option_price catalog_product_option_title catalog_product_option_type_price catalog_product_option_type_title catalog_product_option_type_value catalog_product_relation catalog_product_super_attribute catalog_product_super_attribute_label catalog_product_super_attribute_pricing catalog_product_super_link catalog_product_website cataloginventory_stock cataloginventory_stock_item cataloginventory_stock_status cataloginventory_stock_status_idx cataloginventory_stock_status_tmp catalogrule catalogrule_affected_product catalogrule_customer_group catalogrule_group_website catalogrule_product catalogrule_product_price catalogrule_website catalogsearch_fulltext catalogsearch_query catalogsearch_report catalogsearch_result > catalog_export2.sql

2
  • will it delete all products of my previous store ? Commented Nov 5, 2020 at 7:07
  • No. It went delete anything
    – Haim
    Commented Nov 5, 2020 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.