Inconsistent rebate value
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Inconsistent rebate value
I'm using Aimeos\MShop\Price\Item\Standard::getRebate() to get the rebate amount of a product. When there is only one single price, this works fine, it shows the rebate amount.
However, when I add a second price (say for a special sale that ends tomorrow), things are getting weird. On the product details page, getRebate() returns the correct amount for the sale. On the list page however, getRebate() returns 0 (probably the value of the first price, which has no rebate).
Any idea if this is a bug or a mistake on my side?
Also, ist it possible to get the rebate of a product that is already in the cart? getRebate() always returns 0 there.
However, when I add a second price (say for a special sale that ends tomorrow), things are getting weird. On the product details page, getRebate() returns the correct amount for the sale. On the list page however, getRebate() returns 0 (probably the value of the first price, which has no rebate).
Any idea if this is a bug or a mistake on my side?
Also, ist it possible to get the rebate of a product that is already in the cart? getRebate() always returns 0 there.
Re: Inconsistent rebate value
Did you clear the cache to make sure it's no cache problem?flomo wrote: ↑13 Nov 2020, 17:03 However, when I add a second price (say for a special sale that ends tomorrow), things are getting weird. On the product details page, getRebate() returns the correct amount for the sale. On the list page however, getRebate() returns 0 (probably the value of the first price, which has no rebate).
Code: Select all
php artisan aimeos:cache
No, in the basket the rebate fields are used for discounts granted by coupons or plugins and the value for displaying e.g. "-30%" is not available any more.
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
Re: Inconsistent rebate value
Did you meanphp artisan aimeos:cache
Code: Select all
php artisan aimeos:clear
I found out, that changing the order of the prices (first the temporary sale, that overwrites the normal price for a few days) works. But it still looks like a bug to me.
Re: Inconsistent rebate value
Can you please post some additional data or screenshots?
- Values of both prices
- Start/end date of the prices
- etc.
- Values of both prices
- Start/end date of the prices
- etc.
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
Re: Inconsistent rebate value
With this setting, the rebate is shown on the product detail page, but not on the list page. If I change the order or remove the first (regular) price, the rebate shows on both pages.
Re: Inconsistent rebate value
We've tried to reproduce your issue but the price in the list view is always the small price, regardless of the order of the prices in the backend. Can you debug a bit more and see again if it might be a caching issue nevertheless? You can disable caching in your ./config/shop.php file complete for testing.
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