Price rules applied in catalog but not in basket

Help for integrating the Laravel package
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!
DmS
Posts: 55
Joined: 09 Aug 2021, 08:59

Price rules applied in catalog but not in basket

Post by DmS » 24 May 2022, 14:20

As the subject says, I've setup a price rule with -10% on a specific category.
I've added catalog to domains per the instructions here:
https://aimeos.org/docs/2021.x/manual/rule-decorators/

And the price is adjusted in lists and product detail page, exactly as advertized, but the price in the basket is the unchanged, standard price.

I've searched the forums and from earlier answers, tried turning off all plugins related to price, ProductPrice, TaxRates plus two custom plugins, no change.

The section client/html/catalog in my conf file looks like this:

Code: Select all

'catalog' => [
                'selection' => [
                    'type' => array('Vikt' => 'radio', 'Volym' => 'radio'),
                ],
                'lists' => [
                    'basket-add' => true,
                    'domains' => array('catalog', 'attribute', 'media', 'media/property', 'price', 'product', 'product/property', 'supplier' => array('text', 'media', 'supplier/address'), 'text'),
                    'pagination' => ['enable' => 1],
                    'size' => 100,
                    'sort' => 'relevance'
                ],
                'detail' => [
                    'basket-add' => false,
                ],
                'filter' => [
                    'attribute' => [
                        'types-option' => ['Varutyp'],
                    ],
                ],
                'stock' => [
                    'level' => [
                        'low' => 3
                    ]
                    ],
                #'domains' => array('catalog', 'media', 'media/property', 'price', 'text')
            ],
I know the docs say:
You need to add catalog to the client/html/catalog/domains configuration setting so the Category rule decorator is used, e.g. ['catalog', 'media', 'media/property', 'price', 'text'].
as the commented out line in conf, but if I use that line and don't have "catalog" under catalog/lists/domains it does not work at all.

What am I missing here?
Attachments
Screenshot 2022-05-24 at 15.42.14.png
Screenshot 2022-05-24 at 15.42.14.png (223.63 KiB) Viewed 114 times
_____________
Laravel 8 with Aimeos 2021.10 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

User avatar
aimeos
Administrator
Posts: 6197
Joined: 01 Jan 1970, 00:00

Re: Price rules applied in catalog but not in basket

Post by aimeos » 25 May 2022, 15:30

The referenced documentation is only for displaying the correct price but the source of the problem was in the basket/standard code which had missed the "catalog" domain when fetching products.

Can you please update and try again:

Code: Select all

composer req aimeos/ai-client-html:2021.10.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DmS
Posts: 55
Joined: 09 Aug 2021, 08:59

Re: Price rules applied in catalog but not in basket

Post by DmS » 27 May 2022, 07:47

I see.
Will try this and report back.
Thank you
_____________
Laravel 8 with Aimeos 2021.10 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

Post Reply