Magento Forum

   
cart_coupon.add doesn’t work: Coupon is not valid
 
idumneanu
Jr. Member
 
Total Posts:  4
Joined:  2012-05-06
 

cart_coupon.add doesn’t work properly. 
I’m using a coupon code that is working correct from frontend but when I’m trying to use it with core api cart_coupon.add I’m getting “Coupon is not valid.” anytime.

I set a couple of logs and found that it (coupon code) is set to ‘ ‘ in Quote::_validateCouponCode() function because there’s no address with coupon code.

Question:
What are the pre-conditions for cart_coupon.add ?
What’s the difference btw coupon use: frontend vs core api ?
How is coupon code reletaed to address?
How could I see/set coupon<->address over frontend?
Could you provide a tested sample to folow?

My flow of action over core api is:
1. cart.create
2. cart_customer.set
3. cart_customer.addresses
4. cart_product.add
5. cart_payment.set
6. cart_coupon.add (stuck here!!!)
7. cart.order

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top