zencart 产品转 magento sql

7天成为Magento系统架构师,现在开始学习Magento全栈开发!

《Magento2.X企业级开发实战》

/*
/*
*Weicot 兔子自定义付款系统
*付款链接发送模块
*作者 ajiang-兔子 
*20150921
*1050653098@qq.com
*v0.1
*/
*/
truncate table export_magento;
insert into export_magento
select 'admin' as store
      ,'base' as websites
      ,'Common' as attribute_set
      ,'simple' as type
      ,p.products_model as sku
      ,pd.products_name as name
      ,pd.products_name as product_name
      ,'' as market_price
      ,p.products_price as price
      ,p.products_price          
      ,p.products_weight  as weight
      ,'Brand new, never refurbished, 100% compatible' as short_description
      ,pd.products_description as description
      ,pd.products_name as meta_title
      ,'' as meta_keyword
      ,pd.products_name as meta_description
      ,substring_index(p.products_image, ',', 1) as image
      ,substring_index(p.products_image, ',', 1) as small_image
      ,substring_index(p.products_image, ',', 1) as thumbnail
      ,replace(p.products_image, ',', ';') as gallery
      ,'Enabled' as status
      ,'None' as tax_class_id
      ,p.products_quantity as qty
      ,p.master_categories_id as category_ids
      ,1 as is_in_stock
      ,'Catalog, Search' as visibility
      ,date_format(now(),'%Y/%d/%c') as adddate
  from products p
          inner join products_description pd
    on p.products_id = pd.products_id
where pd.language_id = 1
   and p.master_categories_id in (10);
  
  
  
   
mysql> desc products;
+----------------------------------+---------------+------+-----+---------------------+----------------+
| Field                            | Type          | Null | Key | Default             | Extra          |
+----------------------------------+---------------+------+-----+---------------------+----------------+
| products_id                      | int(11)       | NO   | PRI | NULL                | auto_increment |
| products_type                    | int(11)       | NO   |     | 1                   |                |
| products_quantity                | float         | NO   |     | 0                   |                |
| products_model                   | varchar(256)  | YES  | MUL | NULL                |                |
| products_image                   | varchar(255)  | YES  |     | NULL                |                |
| products_price                   | decimal(15,4) | NO   |     | 0.0000              |                |
| products_virtual                 | tinyint(1)    | NO   |     | 0                   |                |
| products_date_added              | datetime      | NO   | MUL | 0001-01-01 00:00:00 |                |
| products_last_modified           | datetime      | YES  |     | NULL                |                |
| products_date_available          | datetime      | YES  | MUL | NULL                |                |
| products_weight                  | float         | NO   |     | 0                   |                |
| products_status                  | tinyint(1)    | NO   | MUL | 0                   |                |
| products_tax_class_id            | int(11)       | NO   |     | 0                   |                |
| manufacturers_id                 | int(11)       | YES  | MUL | NULL                |                |
| products_ordered                 | float         | NO   | MUL | 0                   |                |
| products_quantity_order_min      | float         | NO   |     | 1                   |                |
| products_quantity_order_units    | float         | NO   |     | 1                   |                |
| products_priced_by_attribute     | tinyint(1)    | NO   |     | 0                   |                |
| product_is_free                  | tinyint(1)    | NO   |     | 0                   |                |
| product_is_call                  | tinyint(1)    | NO   |     | 0                   |                |
| products_quantity_mixed          | tinyint(1)    | NO   |     | 0                   |                |
| product_is_always_free_shipping  | tinyint(1)    | NO   |     | 0                   |                |
| products_qty_box_status          | tinyint(1)    | NO   |     | 1                   |                |
| products_quantity_order_max      | float         | NO   |     | 0                   |                |
| products_sort_order              | int(11)       | NO   | MUL | 0                   |                |
| products_discount_type           | tinyint(1)    | NO   |     | 0                   |                |
| products_discount_type_from      | tinyint(1)    | NO   |     | 0                   |                |
| products_price_sorter            | decimal(15,4) | NO   | MUL | 0.0000              |                |
| master_categories_id             | int(11)       | NO   | MUL | 0                   |                |
| products_mixed_discount_quantity | tinyint(1)    | NO   |     | 1                   |                |
| metatags_title_status            | tinyint(1)    | NO   |     | 0                   |                |
| metatags_products_name_status    | tinyint(1)    | NO   |     | 0                   |                |
| metatags_model_status            | tinyint(1)    | NO   |     | 0                   |                |
| metatags_price_status            | tinyint(1)    | NO   |     | 0                   |                |
| metatags_title_tagline_status    | tinyint(1)    | NO   |     | 0                   |                |
+----------------------------------+---------------+------+-----+---------------------+----------------+
35 rows in set (0.16 sec)


   
   *************************** 6. row ***************************
            store: admin
         websites: base
    attribute_set: Common
             type: simple
              sku: DVD-DHWV
             name: Die Hard With A Vengeance Linked
     product_name: Die Hard With A Vengeance Linked
     market_price: 0.00
            price: 39.99
    special_price: 39.99
           weight: 7
short_description: Brand new, never refurbished, 100% compatible
      description: Regional Code: 2 (Japan, Europe, Middle East, South Africa).
       meta_title: Die Hard With A Vengeance Linked
     meta_keyword:
 meta_description: Die Hard With A Vengeance Linked
            image: dvd/die_hard_3.gif
      small_image: dvd/die_hard_3.gif
        thumbnail: dvd/die_hard_3.gif
          gallery: dvd/die_hard_3.gif
           status: Enabled
     tax_class_id: None
              qty: 9
     category_ids: 10
      is_in_stock: 1
       visibility: Catalog, Search
          adddate: 2015/24/9
		  

转载请注明:(●–●) Hello.My Weicot » zencart 产品转 magento sql

文章来源于互联网:zencart 产品转 magento sql

如无特殊说明或标注,任何个人或组织,复制、转载、采集本站内容请注明:
本文来源于:【Magento中文网】,并添加本文地址链接。
如未按上述操作复制或转载,本站有权追究法律责任。
若本站内容侵犯了原著者的合法权益,可联系我们进行处理。