Price rule within the custom products does not work
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 1.2k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 433
Description
### Shopware Version
6.6.10.5
### Affected area / extension
Platform(Default)
### Actual behaviour
If you use a price rule within a custom product configuration that relates to customer groups, for example, this is displayed incorrectly in the frontend for the product as soon as Open Search is active.
In this case, the fallback default value is not displayed if the rule does not apply, but the gross value from the price rule is displayed even though the price rule does not apply.
If you are logged in with the customer group, the rule becomes active and the price is taken correctly from the price matrix and displayed.
### Expected behaviour
The price matrix is only played if the stored rule also applies and ‘only’ then.
### How to reproduce
- Creates a custom product with a ‘selection field’, for example
- Stores a standard price and an extended surcharge
- the extended surcharge is given a lower price than the standard value and a rule that refers to customer groups, for example (not the standard group)
- Open Search must be actively set up for the environment
- now you assign the CP to an article, go to the frontend and see that the gross value of the extended setting is displayed and not the standard value although the rule does not apply
### Definition of Done
- [ ] An automated test covers the fix.
- [ ] Integration/E2E testing in staging is done.
- [ ] Changelog markdown file created or updated in /changelog/_unreleased directory.
- [ ] Developer documentation written/updated.
- [ ] End user and/or developer documentation written or updated with clarification.
- [ ] Regression test created to ensure bug does not reappear, and automated regression tests pass.
- [ ] Code changes resolve the reported bug without introducing new issues.
Contributor guide
Research direction
Start by reproducing the custom product pricing scenario with Open Search enabled, comparing an unauthenticated customer group with a group for which the rule applies. Trace the custom product price-rule handling and its automated or regression coverage; the issue names /changelog/_unreleased as the changelog location. Done means the fallback value is shown when the rule does not apply, tests cover the regression, and the requested documentation and staging checks are complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100