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);
}
coupon code
for some customers personally or you guys will publish officially ? – Baby in Magento Sep 8 '16 at 6:30