I have a client who uses some Buy-X-Get-Y discounts, and he wants the "X" product page to display a message about the available "Y" products. I've got most of this working; now I need to write the part that finds out what the discounted price of "Y" will be if it goes in the basket. "X" is already in the basket at this time, since the message doesn't appear until the add-to-basket is done.
From some previous experience and a look at the LSK, I think that what my module needs to do is: first, call DiscountState_CreateFromBasket() to get a discount-state variable; and then call DiscountState_Predict_Product_Price() with the discount state and product. Is that correct? I'm hoping someone has done this before, and can give me some advice that will save me some trial-and-error time.
Thanks --
From some previous experience and a look at the LSK, I think that what my module needs to do is: first, call DiscountState_CreateFromBasket() to get a discount-state variable; and then call DiscountState_Predict_Product_Price() with the discount state and product. Is that correct? I'm hoping someone has done this before, and can give me some advice that will save me some trial-and-error time.
Thanks --