Product Rebate on 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!
-
- Posts: 72
- Joined: 22 Mar 2021, 16:56
Product Rebate on Basket
Hello,
This question was asked in other threads, but its not to clear. eg.
- laravel-package-f18/unexpected-getrebat ... t1486.html
- help-f15/price-rebate-amount-t2913.html
- Product's Rebate price is zero on basket
- post13218.html#p13218
I was wondering why or what is the reason for resetting rebates when adding products to basket?
https://github.com/aimeos/ai-controller ... se.php#L70
I was expecting rebates to be calculated on the basket, but this above line removes this and is therefore absent when the following is executed in a template and when the line is stored in the database.
There was a comment
The object is to display the original price beit a total or individual price for a product for price items that have associated group discounts. ie. weve added a discount price item to a product specifically for users of a group. We wish to display the original price - which I assumed would have been actual price + rebate.
Thanks,
This question was asked in other threads, but its not to clear. eg.
- laravel-package-f18/unexpected-getrebat ... t1486.html
- help-f15/price-rebate-amount-t2913.html
- Product's Rebate price is zero on basket
- post13218.html#p13218
I was wondering why or what is the reason for resetting rebates when adding products to basket?
https://github.com/aimeos/ai-controller ... se.php#L70
I was expecting rebates to be calculated on the basket, but this above line removes this and is therefore absent when the following is executed in a template and when the line is stored in the database.
Code: Select all
$this->summaryBasket->getPrice()->getRebate()
If I was to follow the advice in one of the threads above, do I need to implement a new column on the order table, or the order lines? As presumably the existing rebate column on the order line is reserved for those created and applied by coupons?... when you add a product to the basket, the rebate value is cleared because the rebate field is then used by the coupon providers
The object is to display the original price beit a total or individual price for a product for price items that have associated group discounts. ie. weve added a discount price item to a product specifically for users of a group. We wish to display the original price - which I assumed would have been actual price + rebate.
Thanks,
Re: Product Rebate on Basket
Yes, if you want to display the original price in the basket, the e-mails and the account history, you have to add a new column to the mshop_order_base_product table and set it accordingly by overwriting this method:
https://github.com/aimeos/ai-controller ... se.php#L33
https://github.com/aimeos/ai-controller ... se.php#L33
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