This issue is similar to that described in http://drupal.org/node/344430, but not the same.
Create a product kit and check the option: "As individual products. Customers may add or remove kit components at will." Add some items to the kit, and apply a discount. It doesn't matter whether the discount is positive or negative. The price of the items when displayed in the cart is the base value for each product; the discount is ignored.
Then edit the product kit, changing the option to "As a unit. Customers may only change how many kits they are buying. Do not list component products.". The cart now displays the kit, but the total price is correct. (It is correct - as long as the patch in 344430 has been applied to cater for positive "discount" values).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | mutable_kit_discount.patch | 2.62 KB | Island Usurper |
Comments
Comment #1
cha0s commentedIt appears that case is explicitly coded:
So since that's Lyle's baby, let's ask him why he did that...
Comment #2
Island Usurper commentedIt's done this way because customers can remove individual components from their cart.
Let's say you've got two products, A and B. By themselves, you sell A for $50 and B for $70. You also have a product kit with an A and a B, but you've set it to be worth $100. We'll say that in the kit, B only costs $50. If we made discounts work on mutable product kits, someone could add the kit to their cart and see that B now costs them $20 less than if they bought it on its own. They could then decide they don't really want A, and remove it from the cart. B is still considered part of the product kit, and it still has its discount.
Figuring out that all of a product kits items are in the cart is a lot of trouble, so I decided it was easier and just as effective to disable discounts on mutable kits. I guess that means it needs better documentation.
Comment #3
jamesoakleyThat makes a lot of sense.
However, I'm not sure it's just documentation that needs addressing. If you set the kit up with discounts, and then change it so that it is mutable, the price of the kit shows up based on the discounts. (E.g.,: Take two items priced at $10 each; put them in a kit with $2 discount on each item, and the kit price is $16. Change the kit price to mutable, the kit price still shows as $16). Then take a session where the cart is empty, add the forementioned kit to the cart, and you get (in my example) a cart price of $20. The customer has just added a kit priced at $16 to an empty cart to find they have $20 to pay.
I would think the displayed price of a kit should also ignore the discount if the kit is mutable. Displayed price and cart price should always line up, as it's always better to baffle the store admin than to baffle a prospective customer. (An on-screen message when the kit is saved could warn the store administrator that the kit price has been set to ignore the discounts because of the mutability.)
I'm putting this back to "Active" because (IMHO) the current code is going to confuse store customers. If you disagree, and think this is not a bug after all, it can be changed from a code-related issue to a documentation-related issue.
Comment #4
Island Usurper commentedOK, that's a problem, then. I can get the discounts to be saved, but not used pretty easily, so a message when the kit is updated seems like the best idea. I've also put a little more description for the mutable option on the node form.
Comment #5
rszrama commented