1

In quote_item table we don't have a column original_price. So when and how sales_order_item table get the original_price value.

Post order we are seeing original_price as 0 in admin sales order view page. Unable to locate where the original price is set as 0 in the sales_order_item table.

Anybody have idea about this?

  • Did you find answer for this? I have the same problem – Alex Dec 17 '19 at 10:47
0

In our case we were overwriting the originalprice in an observer, which did not come through to the order item.

Setting a breakpoint in \Magento\Sales\Model\Order\Item::setOriginalPrice you find that it is called on order by \Magento\Quote\Model\Quote\Item\ToOrderItem::convert

The original price is already in the $item passed to that function.

In my case the original_price is taken from the base_original_price, which is set to the catalog price.

This is happening in \Magento\Quote\Model\Quote\Address\Total\Subtotal::_initItem which calls

        $finalPrice = $product->getFinalPrice($quoteItem->getQty());

An option would be to overwrite the \Magento\Quote\Model\Quote\Item\AbstractItem::getBaseOriginalPrice

and overwrite the original price with the custom original price.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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