1

Hi i have made a custom column in sales_flat_order table named final_shipping_amount. When i am loading order its showing my custom column in it. I am trying to add value in my custom column but its not adding value in it here is my code.

$final_shipping = "1.33"
$orderIid = $this->getRequest()->getParam('id');
$orderDataShip = Mage::getModel('sales/order')->load($orderIid);
$orderDataShip->setFinalShippingAmount($final_shipping);
$orderDataShip->save();

Its not saving value in it. i have also tried this way but also its not saving

$final_shipping = "1.33"
$orderIid = $this->getRequest()->getParam('id');
$orderDataShip = Mage::getModel('sales/order')->load($orderIid);
$orderDataShip->setData('final_shipping_amount' , $final_shipping);
$orderDataShip->save();

but its not working.

  • Make sure you are getting $orderIid and it loads a valid sales order entity. – Rajeev K Tomy Nov 2 '16 at 13:53
  • its a valid order id i have checked – OBAID Nov 2 '16 at 13:58
1

Try clearing the Magento cache (both the Magento cache and Storage cache)..or you can simply delete the files from var/cache.

|improve this answer|||||
  • yeah you are right when i delete these folders not its working – OBAID Nov 2 '16 at 14:00

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.