This is an annoying bug that is still an issue with the current version of Magento (v1.7.0.0 as of this writing).  I have opened Issue #27867 with Magento and am hoping that this can finally be resolved in the core code.  In the meantime, to fix this issue we need to make a tweak to Adminhtml/Model/Sales/Order/Create.php (don’t edit core code, of course, the methods below should be modified in your custom module)

Add this code above the line “if ($additionalOptions = $orderItem->getProductOptionByCode(‘additional_options’)) {” in the method… initFromOrderItem()

if (
    && $orderItem->getOriginalPrice() != $orderItem->getPrice()
) {

This will make it so your custom price sticks on order edits. For reorders it will use the original price. Should you want it to stick on reorders as well just remove the second line “!$this->getSession()->getReordered()”.

If your Magento version is earlier than v1.4.0.0, you might also have noticed that your coupon codes aren’t sticking either (Issue #15351).   To fix this, add the code below right before the line “if ($this->getQuote()->getCouponCode()) {” in the method… initFromOrder()

$orderCouponCode = $order->getCouponCode();
if ($orderCouponCode) {
0 0 votes
Article Rating
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
10 years ago

Thanks for this, quick and easy!

10 years ago

I tried implementing this and for some reason it’s not working. The custom item still switches back to $0.

I turned off the cache as well.

Any thoughts? I’ve tried it with the re-order and without and it’s not retaining the price.

Appreciate any hints you can offer.

HEre is what I have

$item = $this->getQuote()->addProduct($product, $buyRequest);
if (is_string($item)) {
return $item;
if ($orderItem->getOriginalPrice() != $orderItem->getPrice() )

if ($additionalOptions = $orderItem->getProductOptionByCode('additional_options')) {

9 years ago

you should also add
Otherwise it’s not working for me either…

9 years ago

This works for me:

(same position in code)

//fix for keeping custom price
if (Mage::app()->getRequest()->getControllerName() == ‘sales_order_edit’)
$quoteItem = Mage::getModel(‘sales/quote_item’)->load($orderItem->getQuoteItemId());
//end fix

Brother Mouzone
Brother Mouzone
8 years ago

For some reason my Magento install was also forgetting about coupon codes. Your 1.4 code added the coupon to the order, but the coupon code was only shown, not applied to the prices. Removing the coupon and reapplying it changed that so there was some issue collecting order totals.

My install also forgot about what shipping method to use on the edited order if the coupon was applied. I changed the collectTotals to have getShippingAddress before it and now it seems to work correctly:

if ($this->getQuote()->getCouponCode()) {
// old $this->getQuote()->collectTotals(); and new as follows:

7 years ago

Not working for me in Ver – We have it fine for edit orders as we also use and order edit extension.

I was trying to add this for reorders as custom pricing doesnt remain. Tried the above fix without the second line but just uses original price still.

Any ideas?

7 years ago

[…] found this: But it doesn’t seem to fix the problem for me, in Magento […]