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
Move channel pricing to separate tab #13209
Move channel pricing to separate tab #13209
Conversation
ae8a6bb
to
4377470
Compare
4377470
to
2b402d0
Compare
@@ -60,6 +60,12 @@ public function createMenu(array $options = []): ItemInterface | |||
->setLabel('sylius.ui.inventory') | |||
; | |||
|
|||
$menu | |||
->addChild('channelPricings') |
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.
->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') |
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.
->setLabel('sylius.ui.product_variant.channel_pricings') | |
->setLabel('sylius.ui.channel_pricings') |
@@ -47,6 +47,10 @@ sylius: | |||
ui: | |||
product: | |||
product_not_active_in_channel: The product is not yet activated in this channel. | |||
product_variant: | |||
channel_pricings: Channel Pricings |
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.
channel_pricings: Channel Pricings | |
channel_pricings: Channel pricings |
<br/> | ||
{{ 'sylius.ui.original_price_details'|trans }} | ||
</div> | ||
<div id="sylius_product_variant_channelPricings"> |
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.
<div id="sylius_product_variant_channelPricings"> | |
<div id="sylius-product-variant-channel-pricings"> |
as we use this convention for ids in twigs
or use
<div id="sylius_product_variant_channelPricings"> | |
<div {{ sylius_test_html_attribute('channel-pricings') }}> |
if you need it only for behats
{% 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 %} |
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.
Wrong indentation
Thank you, Adam! 🎉 |
…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
Small refactor of pricing view on Product Variant