Pubilc Rebate Price in Basket
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: Pubilc Rebate Price in Basket
Well that's not very optimal.. I actually need the original rebate value when doing coupon calculations, since there will be product rebates, coupons, and discounts (for which I'm using coupons), and of all these, only one should be actually applied, the one which gives the greatest rebate, and the rebate must be set on the products themselves (for an XML that is to be sent elsewhere).
I could do this with the getRawValues function hack, but actually it's a bit messy, and if you're planning on adding something like this anyways, it's just gonna be more time to retool stuff. So yeah, I think I'm gonna wait for that getOriginalRebate method, and do something else in the meantime
I could do this with the getRawValues function hack, but actually it's a bit messy, and if you're planning on adding something like this anyways, it's just gonna be more time to retool stuff. So yeah, I think I'm gonna wait for that getOriginalRebate method, and do something else in the meantime
Re: Pubilc Rebate Price in Basket
If you want to apply rebates via a basket plugin, you have to fetch the product incl. prices from the database for your calculations. The calculated rebate amount must then be set with setRebate() in the price item of the ordered product if it's a product related rebate or in a rebate product if it's a common rebate.
The price checking plugin is a good reference how to retrieve products and their prices you should use for calculation:
https://github.com/aimeos/aimeos-core/b ... tPrice.php
The proposed getOriginalRebate() would be only valid for displaying the old product rebate in the basket but that's not the case in your situation.
The price checking plugin is a good reference how to retrieve products and their prices you should use for calculation:
https://github.com/aimeos/aimeos-core/b ... tPrice.php
The proposed getOriginalRebate() would be only valid for displaying the old product rebate in the basket but that's not the case in your situation.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star