1

Currently after applying coupon code, discount is applied to selling price. but we want Discount to be applied for MRP and not for selling price.

Example :

MRP = 200   , Selling Price = 175  
Coupon code discount =  10% 

so how Default magento works is = > 10% for 175 [final price = 157.5 ],

but what i need is 10 % for 200. [final price = 180 ]

so i tried below code as mentioned in this link,

now what i am getting : 175- 20 = 155 as final price

but What i need is : 200- 10 = 180 as final price

is there any Module to achieve this or what code i need to change to get result?

    $item=$observer['item'];
    $rule=$observer['rule'];
    $rule->getDiscountAmount();
    $rulePercent = max(0, 100-$rule->getDiscountAmount());
    echo "<br>--pro id---".$item->getProductId();
    //echo "<pre>";
    //print_r($rule->getData());

    if($rule->getSimpleAction()=='by_percent')
    { 
        $disPer=$rule->getDiscountAmount();
        $product=Mage::getModel('catalog/product')->load($item->getProductId());

        //echo "<br>pro price----".$product->getPrice(); 

        $item->getDiscountAmount();

        $ratdisc=($product->getPrice()*$disPer)/100;
        $DiscountAmount=$ratdisc+$item->getDiscountAmount();
        $item->setBaseDiscountAmount();
        $BaseDiscountAmount=$ratdisc+$item->setBaseDiscountAmount();

        $result = $observer['result'];
        $result->setDiscountAmount($DiscountAmount);
        $result->setBaseDiscountAmount($BaseDiscountAmount);
    }
  • don't you think customers will confuse if it applied for MRP , instead don't you want to remove selling price.... – Baby in Magento Sep 8 '16 at 6:20
  • @Baby yes, I agree with you but it is marketing requirement. – jassi Sep 8 '16 at 6:28
  • is you guys have plan to give coupon code for some customers personally or you guys will publish officially ? – Baby in Magento Sep 8 '16 at 6:30
  • it will be published officially – jassi Sep 8 '16 at 6:43
  • @Baby - Is it possible to do? – jassi Sep 8 '16 at 7:57

Your Answer

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

Browse other questions tagged or ask your own question.