[symfony-users] Re: OO conceptual advice

2010-03-30 Thread Richtermeister
Hey Tom, I wrote the ecommerce part of www.skinmedica.com, which uses a quite complex promotions setup and took some iterations to get it right. I'd be happy to help. Our cart works similar to what Antoine said, where the shopping cart is distinct from the final order, and mostly responsible for

Re: [symfony-users] Re: OO conceptual advice

2010-03-30 Thread Tom Haskins-Vaughan
Thanks, guys! That's a great help. I will most probably take you up on your offer of help! :) In the meantime, I have a couple of follow on questions: 1. What do you see the benefits of having a separate cart and order objects? 2. The Promotion classes were the logic takes place, are they also

[symfony-users] Re: OO conceptual advice

2010-03-30 Thread Antoine S.
Hi, Cool Daniel, I am happy that you confirm this choice. For multi promotion, the weight is a good idea. I was thinking of a config file, to say if a promotion are combinable with the other (matrix). But in fact a matrix with weight would be perfect.. 1. First you need to store the cart in the

[symfony-users] Re: OO conceptual advice

2010-03-30 Thread Richtermeister
Hey Tom, any time. The reason to keep orders and the cart separate is an issue of separation of concerns, where we're trying to avoid having classes do too many things (for all the obvious reasons of maintainability, easier unit testing and future flexibility). In our system orders are

[symfony-users] Re: OO conceptual advice

2010-03-30 Thread Richtermeister
Hey Antoine, yeah, the weight is helpful, because it allows you to quickly declare certain promotions king.. for example, our subtotal promotion has a weight of 10, where other promotions range around 1-5 so far, so that it always gets applied last. As promotions get more similar, the weight

Re: [symfony-users] Re: OO conceptual advice

2010-03-30 Thread Tom Haskins-Vaughan
On Tue, Mar 30, 2010 at 8:10 PM, Richtermeister nex...@gmail.com wrote: Hey Tom, any time. The reason to keep orders and the cart separate is an issue of separation of concerns, where we're trying to avoid having classes do too many things (for all the obvious reasons of maintainability,

[symfony-users] Re: OO conceptual advice

2010-03-29 Thread Antoine S.
Hi, I am currently developing a promotion/voucher/discount system too. First, I have to calculate this in the shopping cart and not in the order. Even if the shopping cart is a reflect of a future order, for me they are distinct. I have many parameters in the shopping cart too like the delivery