2

I added a discount function at payment step, and there is a button to call Ajax to controller.

The button is in the payment step.

The problem is how to change the total price after I click the button? For example, when I click this button, the total price will reduce $100.


I have created a custom gift card module and the card code will be auto generation when customer bought it. If I use the shopping price rules, how can it automatic make the card code to be the coupon code?

Also, is it any information to use multiple coupon codes at the same product?


But there is a different. There is a balance in gift card but coupon isn't. Also, the gift card can be reuse until its balance is $0.

Thank you!

2

1 Answer 1

2
  • You need to create a coupon which will provide discount off $100 from admin>promotion>Shopping price rules

On your custom controller you need apply discount programmatically.

by this code:

Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->setCollectShippingRates(true);
         Mage::getSingleton('checkout/session')->getQuote()->setCouponCode($YourCouponcode)
                ->collectTotals()
                ->save();
2
  • I have created a custom gift card module and the card code will be auto generation by customer bought it. If I use the shopping price rules, how can it automatic make the card code to be the coupon code? Commented Jun 15, 2015 at 10:27
  • But there is a different. there is a balance in gift card but coupon isn't. Also, the gift card can be reuse until its balance is $0. Commented Jun 15, 2015 at 10:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.