Skip to content
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

Merged
merged 1 commit into from Oct 19, 2021

Conversation

AdamKasp
Copy link
Contributor

@AdamKasp AdamKasp commented Oct 15, 2021

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no/yes
Deprecations? no/yes

Screenshot 2021-10-18 at 08 26 28

Screenshot 2021-10-18 at 08 26 53

Small refactor of pricing view on Product Variant

@AdamKasp AdamKasp requested a review from a team as a code owner October 15, 2021 12:02
@probot-autolabeler probot-autolabeler bot added the Admin AdminBundle related issues and PRs. label Oct 15, 2021
@AdamKasp AdamKasp force-pushed the move-channel-pricings-to-new-tab branch 3 times, most recently from ae8a6bb to 4377470 Compare October 18, 2021 06:25
@AdamKasp AdamKasp changed the title [WIP][WIP] Move channel pricing to separate tab Move channel pricing to separate tab Oct 18, 2021
@AdamKasp AdamKasp force-pushed the move-channel-pricings-to-new-tab branch from 4377470 to 2b402d0 Compare October 18, 2021 13:29
@@ -60,6 +60,12 @@ public function createMenu(array $options = []): ItemInterface
->setLabel('sylius.ui.inventory')
;

$menu
->addChild('channelPricings')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
channel_pricings: Channel Pricings
channel_pricings: Channel pricings

<br/>
{{ 'sylius.ui.original_price_details'|trans }}
</div>
<div id="sylius_product_variant_channelPricings">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong indentation

@GSadee GSadee merged commit 5cd2f59 into Sylius:master Oct 19, 2021
@GSadee
Copy link
Member

GSadee commented Oct 19, 2021

Thank you, Adam! 🎉

@AdamKasp AdamKasp deleted the move-channel-pricings-to-new-tab branch October 19, 2021 13:35
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants