-
-
Notifications
You must be signed in to change notification settings - Fork 133
Have the ability to show how a price has been calculated #5041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…etails-2 # Conflicts: # js/app/delivery/PriceCalculation.js # src/Api/State/CalculateRetailPriceProcessor.php # src/Controller/AdminController.php
…ing-details-2 # Conflicts: # config/services.yaml # src/Entity/Delivery/PricingRule.php # src/Service/PricingRuleSetManager.php # src/Sylius/Product/ProductOptionValueFactory.php
…etails-2 # Conflicts: # src/Entity/Sylius/ProductOptionRepository.php
…etails-2 # Conflicts: # src/Pricing/RuleHumanizer.php
*/ | ||
foreach ($productVariant->getOptionValues() as $productOptionValue) { | ||
|
||
if ('CPCCL-ODDLVR-PERCENTAGE' === $productOptionValue->getOptionCode()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't understand how this product option value is created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each pricing rule is linked to a product option value
: https://github.com/coopcycle/coopcycle-web/pull/5041/files#diff-6d0bf011cb02bc7af29f5165a12ba776544276b344a75a571000ef8c54c08551R76-R82
A product option value
is in turn linked to a product option
.
There are four product option
s at the moment, one for each type of a price expression: https://github.com/coopcycle/coopcycle-web/pull/5041/files#diff-2f4eb521f276a6cf3656e4edfc7da899063408d39c0b75f2b0b19fb3b68db0dfR42-R57
'CPCCL-ODDLVR-PERCENTAGE' is a product option
for pricing rules with a price expression: price_percentage(..
https://github.com/coopcycle/coopcycle-web/pull/5041/files#diff-2f4eb521f276a6cf3656e4edfc7da899063408d39c0b75f2b0b19fb3b68db0dfR44-R46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
❗️Please do NOT merge yet
--
This is Part 2; Start reviewing with Part 1: #5038
--
Display price breakdown during delivery order creation:
Display price breakdown on the order page: