Adviced needed: discount on payment method

75 views
Skip to first unread message

Alessandro Reichert

unread,
Apr 10, 2014, 11:20:22 AM4/10/14
to django...@googlegroups.com
Hi guys,

In some countries this may not be useful but in Brazil we have a range from 0 to 20% of the order as a fiancial cost.
This bring a need to give a discount based on the payment method.

Someone has any idea on how this could be done?

Some requirements:
- This discount must be cumulative to other offers / discount coupons;
- In this case, it should be applied in the order total instead of in the individual products;
- It should be shown on the order details;

Any suggestion will be apreciated.

Best regards,
Alessandro.

David Winterbottom

unread,
Apr 11, 2014, 4:43:41 PM4/11/14
to django-oscar
This will be a little fiddly as your requirements conflict with how discounts are "normally" applied (at least in my experience). Oscar's offers aren't really designed to be used cumulatively - if a product has been discounted by one offer, it is normally unavailable for further discounts.

It also sounds unusual to not apply the discount to individual products. What if a product is returned for refund? It might be tricky to work out how much to refund.

to apply your custom discount to the basket once the payment method is known. I'm not 100% sure on the best way of applying a discount at this stage - you might be able to add a new result instance to basket.offer_applications.

Good luck.


--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-oscar/dee43513-9e02-46ce-a40a-dda26923106b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
David Winterbottom
Technical Director

Tangent Labs
84-86 Great Portland Street
London W1W 7NR
England, UK

nor...@1kdims.com

unread,
Apr 14, 2014, 1:21:53 PM4/14/14
to django...@googlegroups.com
Hi Alessandro,

I had somewhat similar requirements. As David suggested I also used the build_submission method. Also I extended my order model with a relation to a custom payment_option model. In the build_submission method you could use custom Calculators [0] to apply your payment discount logic. Extending the order model did quite a good job for me because I also needed all the information later for sending emails and other backoffice related stuff.

Cheers,
norman

Reply all
Reply to author
Forward
0 new messages