gpt4 book ai didi

php - magento 1.9通过sql查询插入产品

转载 作者:行者123 更新时间:2023-11-29 16:59:32 27 4
gpt4 key购买 nike

我想直接使用sql插入产品,这些是我用相关查询填充的表,类别1是根,类别19已经存在:

INSERT INTO etpq_catalog_product_entity ( entity_type_id, attribute_set_id, type_id, sku, has_options, required_options, created_at, updated_at ) VALUES ( 4, 4, 'simple', 'SKUPRO', 0, 0, NOW(), NOW() );  

//category
INSERT INTO etpq_catalog_category_product ( category_id, product_id, position ) VALUES ( 1, 23425, 2 ), ( 19, 23425, 2 );

//quantity
INSERT INTO etpq_cataloginventory_stock_item ( product_id, stock_id, qty, is_in_stock, cfg_manage_stock, manage_stock, min_sale_qty, max_sale_qty ) VALUES ( 23425, 9, 1, 1, 1, 1, 1 );

INSERT INTO etpq_cataloginventoty_stock_status ( product_id, website_id, stock_id, qty, stock_status ) VALUES ( 23425, 1, 1, 9, 1 );

//name
INSERT INTO etpq_catalog_product_entity_varchar ( entity_type_id, attribute_id, store_id, entity_id, value ) VALUES( 4, 71, 4, 23425, :value );

//description
INSERT INTO etpq_catalog_product_entity_text ( entity_type_id, attribute_id, store_id, entity_id, value ) VALUES( 4, :attribute_id, 4, 23425,, :entity_id, :value );
//weight
INSERT INTO etpq_catalog_product_entity_decimal ( entity_type_id, attribute_id, store_id, entity_id, value ) VALUES( :entity_type_id, :attribute_id, :store_id, :entity_id, :value );


//price
INSERT INTO etpq_catalog_product_entity_decimal ( entity_type_id, attribute_id, store_id, entity_id, value ) VALUES( :entity_type_id, :attribute_id, :store_id, :entity_id, :value );


//visibility
INSERT INTO etpq_catalog_product_entity_int ( entity_type_id, attribute_id, store_id, entity_id, value ) VALUES( 4, 102, 4, 23425, 4 );

INSERT INTO etpq_catalog_product_website ( website_id, store_id ) ) VALUES( :website_id, :store_id );

该产品未列入magento的管理产品中,是否缺少某些内容?

最佳答案

此时,您只能在 magento 管理面板上看到该产品。如果您在catalog_category_product_index上插入值,那么您可以通过UI查看产品。

关于php - magento 1.9通过sql查询插入产品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52372498/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com