Conditional Cart Modifier

25 views
Skip to first unread message

Bernhard Stähli

unread,
May 28, 2013, 5:41:40 AM5/28/13
to djang...@googlegroups.com
Hi all

I would like to remove the local tax if an order is not from the country where the shop is located. I've created a classic cart modifier, and I'm able to do everything as I want it - except the condition, so the "rebate" is only calculated when needed. I would need the current order in my modifier and check the country, but for this I need the request object, but I don't have it right there in the modifier...

any hints very welcome!

best
ben

 

Christopher Glass

unread,
May 28, 2013, 5:57:02 AM5/28/13
to djang...@googlegroups.com
Hi there,

The trunk version of the shop now passes request objects to cart modifiers, so this should be solved as soon as a new version of the shop comes around :)
I think I will try to release a new version "soon", there is one more pull request I'd like to merge in before, but since my wife and I just had a child it makes code at little harder to get into...

Cheers,

- Chris



 

--
You received this message because you are subscribed to the Google Groups "django-shop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-shop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bernhard Stähli

unread,
May 28, 2013, 7:07:00 AM5/28/13
to djang...@googlegroups.com
hi chris

thanks. so relying on the request, shopAPI etc. would be the way to go...I am using a modified __version__ = '0.0.11.dev0', so I will just hack it in myself, I think.

...and yes, I know that one situation...priorities will be set in auto mode, and "soon" get's another dimension, I guess :)

congrats!
ben

jrief

unread,
May 28, 2013, 9:07:29 AM5/28/13
to djang...@googlegroups.com
Hi Bernhard, Hi Chris,
This feature has been implemented in PR #217, which is still open. Or did I miss something?
- Jacob

Reply all
Reply to author
Forward
0 new messages