At first glance this seems like a pretty good approach.

On Sunday, November 16, 2014 9:56:11 PM UTC-7, Alex Hill wrote:
>
> Hi all,
>
> Currently discounts, tax and shipping are all dealt with in their own 
> separate handlers, and handled slightly differently from one another. I'd 
> like to unify these into a more flexible system of "cart processors", 
> objects which provide methods to modify the entire cart and each line item. 
> Whenever the cart is modified, the line items and cart totals are 
> recalculated by calling each of the cart processors in sequence. Think of 
> it like middleware for shopping carts.
>
> A new setting would be introduced to define the list of processors that 
> should be run.
>
> The main point of this is to make it easier to define your own discount 
> systems - cases like "free shipping for orders over $50" or "buy any two of 
> this group of products and get a third free" or "registered users get 10% 
> off" can't be implemented using the current discount system, and defining 
> your own is pretty messy. If tax and shipping can be implemented under a 
> system like this, it should simplify Cartridge's code in a few places as 
> well.
>
> django-shop implements this as "cart modifiers" – check out the API at 
> https://github.com/divio/django-shop/blob/master/shop/cart/cart_modifiers_base.py
> .
>
> Looking for general feedback, use cases, and any concerns or issues anyone 
> can see with a system like this.
>
> Cheers,
> Alex
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to