I am created one manual order for a customer, which consists 100 products, how can I give 40% discount for total order value, how can I do that, individual order discount is not possible.

1 Answer 1


Have you tried to add a Shopping Cart Price Rule?






You can alter order amount with this script



$request = Mage::app()->getRequest();

$orderId = (int) $request->getParam('id', 0);
$discount = (int) $request->getParam('discount', 0);

if ($orderId && $discount) {
    // $order = Mage::getModel('sales/order')->load($orderId);
    $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);

    if ($order) {
        $discountAmmount = $order->getSubtotal() * $discount / 100;
        $grandTotal      = $order->getSubtotal() - $discountAmmount;


Note: this is not complete! You may also adjust tax amount and maybe item base prices. Also this is accessable for everybody, you should add an IP restriction. So I do not recommend to use it as it is!

  • This one also good, but every custom order count may vary, how can i edit total order value at the order creation.
    – user51361
    Jun 6, 2017 at 9:58
  • Mhhh ... if you create the order from backend you can manually set an individual price.
    – sv3n
    Jun 6, 2017 at 10:04
  • Every time individual price assigning takes more times, that's why I am searching time speed up.
    – user51361
    Jun 6, 2017 at 10:06
  • Updated answer to change discount programmatically ... if this is what you're looking for, i can complete this code later ...
    – sv3n
    Jun 6, 2017 at 11:06
  • there is no issue about tax, let me check in my localhost.
    – user51361
    Jun 6, 2017 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.