Magento:订购可配置产品后,由于缺货而被取消
我的问题是: 我有一个产品,里面有简单的产品。 (可能是 S-XL 码和某些颜色的 T 恤) 现在,如果我订购其中之一,则会通过订单确认电子邮件取消它。
我认为这是库存的问题,但我不知道。 每种商品有 99 种库存,全部已激活并准备发货。
有谁遇到过同样的问题吗?
my problem is:
i have a product with simple products as childs. (maybe tshirts whith size S-XL and some colors)
Now if i order one of this, it is canceled with the order-confirmation email.
I think its a problem with the stock but i dont know.
There are 99 items in stock of every kind and all are activated and ready to deliver.
Anybody who has had the same problem?
解决方案如下:
问题是订单表中的 id 交叉,因此 magento 混淆了所有项目。
通过截断所有订单表解决了这个问题:
TRUNCATE
sales_order
;截断
sales_order_datetime
;截断
sales_order_decimal
;截断
sales_order_entity
;截断
sales_order_entity_datetime
;截断
sales_order_entity_decimal
;截断
sales_order_entity_int
;截断
sales_order_entity_text
;截断
sales_order_entity_varchar
;截断
sales_order_int
;截断
sales_order_text
;截断
sales_order_tax
;截断
sales_order_varchar
;截断
sendfriend_log
;TRUNCATE
标签
;截断
tag_relation
;截断
tag_summary
;截断
愿望清单
;TRUNCATE
log_quote
;截断
report_event
;截断
sales_flat_quote
;截断
sales_flat_quote_address
;截断
sales_flat_quote_address_item
;截断
sales_flat_quote_item
;截断
sales_flat_quote_item_option
;截断
sales_flat_quote_ payment
;截断
sales_flat_quote_shipping_rate
;截断
sales_flat_order_item
;更改表
sales_order
AUTO_INCRMENT=1;更改表
sales_order_datetime
AUTO_INCRMENT=1;更改表
sales_order_decimal
AUTO_INCRMENT=1;更改表
sales_order_entity
AUTO_INCRMENT=1;更改表
sales_order_entity_datetime
AUTO_INCRMENT=1;更改表
sales_order_entity_decimal
AUTO_INCRMENT=1;更改表
sales_order_entity_int
AUTO_INCRMENT=1;更改表
sales_order_entity_text
AUTO_INCRMENT=1;更改表
sales_order_entity_varchar
AUTO_INCRMENT=1;更改表
sales_order_int
AUTO_INCRMENT=1;更改表
sales_order_text
AUTO_INCREMENT=1;更改表
sales_order_tax
AUTO_INCRMENT=1;更改表
sales_order_varchar
AUTO_INCRMENT=1;更改表
sendfriend_log
AUTO_INCRMENT=1;更改表
标签
AUTO_INCRMENT=1;更改表
tag_relation
AUTO_INCRMENT=1;更改表
tag_summary
AUTO_INCRMENT=1;更改表
愿望清单
AUTO_INCRMENT=1;更改表
log_quote
AUTO_INCRMENT=1;更改表
report_event
AUTO_INCRMENT=1;更改表
sales_flat_quote
AUTO_INCRMENT=1;更改表
sales_flat_quote_address
AUTO_INCRMENT=1;更改表
sales_flat_quote_address_item
AUTO_INCRMENT=1;更改表
sales_flat_quote_item
AUTO_INCRMENT=1;更改表
sales_flat_quote_item_option
AUTO_INCREMENT=1;更改表
sales_flat_quote_ payment
AUTO_INCRMENT=1;更改表
sales_flat_quote_shipping_rate
AUTO_INCRMENT=1;更改表
sales_flat_order_item
AUTO_INCRMENT=1;Here the Solution:
The problem was crossing ids in the order tables so magento mixed up all items.
Solved this with truncating all order tables:
TRUNCATE
sales_order
;TRUNCATE
sales_order_datetime
;TRUNCATE
sales_order_decimal
;TRUNCATE
sales_order_entity
;TRUNCATE
sales_order_entity_datetime
;TRUNCATE
sales_order_entity_decimal
;TRUNCATE
sales_order_entity_int
;TRUNCATE
sales_order_entity_text
;TRUNCATE
sales_order_entity_varchar
;TRUNCATE
sales_order_int
;TRUNCATE
sales_order_text
;TRUNCATE
sales_order_tax
;TRUNCATE
sales_order_varchar
;TRUNCATE
sendfriend_log
;TRUNCATE
tag
;TRUNCATE
tag_relation
;TRUNCATE
tag_summary
;TRUNCATE
wishlist
;TRUNCATE
log_quote
;TRUNCATE
report_event
;TRUNCATE
sales_flat_quote
;TRUNCATE
sales_flat_quote_address
;TRUNCATE
sales_flat_quote_address_item
;TRUNCATE
sales_flat_quote_item
;TRUNCATE
sales_flat_quote_item_option
;TRUNCATE
sales_flat_quote_payment
;TRUNCATE
sales_flat_quote_shipping_rate
;TRUNCATE
sales_flat_order_item
;ALTER TABLE
sales_order
AUTO_INCREMENT=1;ALTER TABLE
sales_order_datetime
AUTO_INCREMENT=1;ALTER TABLE
sales_order_decimal
AUTO_INCREMENT=1;ALTER TABLE
sales_order_entity
AUTO_INCREMENT=1;ALTER TABLE
sales_order_entity_datetime
AUTO_INCREMENT=1;ALTER TABLE
sales_order_entity_decimal
AUTO_INCREMENT=1;ALTER TABLE
sales_order_entity_int
AUTO_INCREMENT=1;ALTER TABLE
sales_order_entity_text
AUTO_INCREMENT=1;ALTER TABLE
sales_order_entity_varchar
AUTO_INCREMENT=1;ALTER TABLE
sales_order_int
AUTO_INCREMENT=1;ALTER TABLE
sales_order_text
AUTO_INCREMENT=1;ALTER TABLE
sales_order_tax
AUTO_INCREMENT=1;ALTER TABLE
sales_order_varchar
AUTO_INCREMENT=1;ALTER TABLE
sendfriend_log
AUTO_INCREMENT=1;ALTER TABLE
tag
AUTO_INCREMENT=1;ALTER TABLE
tag_relation
AUTO_INCREMENT=1;ALTER TABLE
tag_summary
AUTO_INCREMENT=1;ALTER TABLE
wishlist
AUTO_INCREMENT=1;ALTER TABLE
log_quote
AUTO_INCREMENT=1;ALTER TABLE
report_event
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_quote
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_quote_address
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_quote_address_item
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_quote_item
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_quote_item_option
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_quote_payment
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_quote_shipping_rate
AUTO_INCREMENT=1;ALTER TABLE
sales_flat_order_item
AUTO_INCREMENT=1;