Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

set dicount on product in checkout
 
tarekchida
Jr. Member
 
Total Posts:  4
Joined:  2012-04-04
 

hi,
i\’m new on magento and i\’m working on a module that permt a user to choose and to have the gfit with the product that he purchase.
my question is, how can i set a discount on product in the checkout ?
i\’ve used :
i make the modification in the observer .

$_cart_products Mage::getModel("checkout/cart") -> getItems();

//foreache...
//if ...
$_cart_product->setDiscountAmount($realPrice-$giftPrice);
$_cart_product->setBaseDiscountAmount($realPrice-$giftPrice);
But it dosen\’t work
thank you for your help smile
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top