I need to set a discount price to products only when payment method is cash.

I created a price attribute called discount_price and put it in the product attribute set. If customer is paying in cash I want the new discounted price to be set in cart.

I also created another yes/no attribute called has_discount. When has_discount is set to yes cart rule activate and for example I can get 10% of discount in products paid in cash. But what I want is set the price of the attribute discount_price.

Can anyone help me with this?


It's not possible as the Checkout process executed after your shopping cart is decided with the products, price, quantity, etc. And each step in Checkout section is dependent on previous steps, like, payment section is dependent on Shipping decisions, shipping is dependent on shipping address, like that way.

But from your requirement point of view, a solution could be like following:

  • Use a coupon code for giving discounts and show it to the customers that if they pay cash only (payment method), they can use that coupon and get discount of 10% or so.
  • Then, in back-end, create an observer to hide the other payment methods for customers who have used that coupon in your store.

Your Answer

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

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