Move channel pricing to separate tab#13209
Merged
Merged
Conversation
ae8a6bb to
4377470
Compare
SirDomin
approved these changes
Oct 18, 2021
4377470 to
2b402d0
Compare
GSadee
approved these changes
Oct 19, 2021
| ; | ||
|
|
||
| $menu | ||
| ->addChild('channelPricings') |
Member
There was a problem hiding this comment.
Suggested change
| ->addChild('channelPricings') | |
| ->addChild('channel_pricings') |
as we use snake case notation in menu builders
| $menu | ||
| ->addChild('channelPricings') | ||
| ->setAttribute('template', '@SyliusAdmin/ProductVariant/Tab/_channelPricings.html.twig') | ||
| ->setLabel('sylius.ui.product_variant.channel_pricings') |
Member
There was a problem hiding this comment.
Suggested change
| ->setLabel('sylius.ui.product_variant.channel_pricings') | |
| ->setLabel('sylius.ui.channel_pricings') |
| product: | ||
| product_not_active_in_channel: The product is not yet activated in this channel. | ||
| product_variant: | ||
| channel_pricings: Channel Pricings |
Member
There was a problem hiding this comment.
Suggested change
| channel_pricings: Channel Pricings | |
| channel_pricings: Channel pricings |
| <br/> | ||
| {{ 'sylius.ui.original_price_details'|trans }} | ||
| </div> | ||
| <div id="sylius_product_variant_channelPricings"> |
Member
There was a problem hiding this comment.
Suggested change
| <div id="sylius_product_variant_channelPricings"> | |
| <div id="sylius-product-variant-channel-pricings"> |
as we use this convention for ids in twigs
or use
Suggested change
| <div id="sylius_product_variant_channelPricings"> | |
| <div {{ sylius_test_html_attribute('channel-pricings') }}> |
if you need it only for behats
Comment on lines
+10
to
+23
| {% for channelCode, channelPricing in form.channelPricings %} | ||
| <div class="ui segment"> | ||
| <div> | ||
| <strong>{{ channelPricing.vars.label }}</strong> | ||
| </div> | ||
| {% if channelCode not in product_variant.product.channels|map(channel => channel.code) %} | ||
| <div class="ui info message"> | ||
| {{ 'sylius.ui.product.product_not_active_in_channel'|trans }} | ||
| </div> | ||
| {% endif %} | ||
| {{ form_row(channelPricing.price) }} | ||
| {{ form_row(channelPricing.originalPrice) }} | ||
| </div> | ||
| {% endfor %} |
Member
|
Thank you, Adam! 🎉 |
GSadee
added a commit
that referenced
this pull request
Jan 24, 2023
…cing (devantoine) This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.11, 1.12, 1.13 <!-- see the comment below --> | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file --> | | Related tickets | None | | License | MIT | <!-- - Bug fixes must be submitted against the 1.11 or 1.12 branch - Features and deprecations must be submitted against the 1.13 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Related to this change: #13209 Or maybe I should edit the _channelPricings.html.twig template to go back to the old behavior? Commits ------- 86960b7 Updated UPGRADE-1.11.md to add a BC Break on channel pricing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small refactor of pricing view on Product Variant