Reputation: 29
i got a problem with a magento extension(currently for 1.8.1):
I have products in my cart. Therefore I can choose a gift and add it for free into the cart (via observer the priced is set to 0)
BUT here the problem: if the gift is a configurable product i want to set the options. After editing the product the price is set to the original-price again.
How can i keep the gift-price?
greetz, Florian
Upvotes: 0
Views: 342
Reputation: 14182
Several ways to accomplish this, but the probably easiest (and cleanest) is via a custom total model. Here is a description, somewhat dated but should be enough to get you started. Just make sure your total model is calculated after the subtotal model so your quote item price adjustment sticks. You will also want to pay attention to whether or not you want your total model to be calculated before or after the tax total model.
How do I get quote totals before saving payment method?
Upvotes: 1