After migrating a bunch of orders and their related line-items, the order total field is reset to 0 after saving the order. This does not happen if a new order is created and saved. After some debugging I found the problem seems to be the absence of at least a base price component for the migrated line-items unit price fields. When the order total is calculated all the imported line items are skipped since they have no components attached (see commerce_order.module, line 1358 and commere_price.module, line 1074). This results in a 0 total.

CommentFileSizeAuthor
#1 cmuc-base_price-1700460-1.patch759 bytesplach

Comments

plach’s picture

Status: Active » Needs review
StatusFileSize
new759 bytes

The attached patch fixes the issue here.

bojanz’s picture

Project: Commerce Migrate » Commerce Migrate Ubercart

Moving to the appropriate queue.

bojanz’s picture

Status: Needs review » Fixed

This makes sense. Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.