Determine subpart inside a Price Rule Provider

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Determine subpart inside a Price Rule Provider

Post by boettner » 23 Dec 2021, 08:06

Good morning,

I want to exclude my Price Rule calculations from the mini basket subpart. How can I detect that the current price the Provider is working on comes from the basket and not the catalog?

Best
Robert.

https://aimeos.org/docs/latest/providers/rules/

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

Re: Determine subpart inside a Price Rule Provider

Post by aimeos » 24 Dec 2021, 07:55

There's no way to handle prices in the basket differently than in the basket as the price rules are applied by the frontend controllers and the mshop code.

The price rules are only applied to the products in the catalog but the ProductPrice plugin uses them es well to stay consistent:
https://github.com/aimeos/aimeos-core/b ... tPrice.php

You can enable the "ignore-modified" setting of the ProductPrice plugin to avoid overwriting product prices which have been changed by other plugins too.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply