Skip to content

Commit 05a3d9d

Browse files
committed
fix(sylius-compatibility): add missing channelPriceHistoryConfig field to management in channel form for Sylius 1.13
1 parent ef29784 commit 05a3d9d

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/Form/Extension/ChannelTypeExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
5656
->remove('currencies')
5757
->remove('defaultTaxZone')
5858
->remove('taxCalculationStrategy')
59+
->remove('channelPriceHistoryConfig')
5960
->addEventSubscriber(new RemoveBaseCurrencySubscriber())
6061
;
6162
}

src/Resources/views/Admin/Channel/_noCommerceForm.html.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,10 @@
8080
{# {{ form_row(form.skippingPaymentStepAllowed) }}#}
8181
{{ form_row(form.accountVerificationRequired) }}
8282
</div>
83+
{# <div class="ui attached segment">#}
84+
{# {{ form_row(form.channelPriceHistoryConfig.lowestPriceForDiscountedProductsVisible) }}#}
85+
{# {{ form_row(form.channelPriceHistoryConfig.lowestPriceForDiscountedProductsCheckingPeriod) }}#}
86+
{# {{ form_row(form.channelPriceHistoryConfig.taxonsExcludedFromShowingLowestPrice, {'remote_url': path('sylius_admin_ajax_taxon_by_name_phrase'), 'load_edit_url': path('sylius_admin_ajax_taxon_by_code')}) }}#}
87+
{# </div>#}
8388
</div>
8489
</div>

src/Resources/views/Admin/Channel/_standardForm.html.twig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,12 @@
8080
{{ form_row(form.skippingPaymentStepAllowed) }}
8181
{{ form_row(form.accountVerificationRequired) }}
8282
</div>
83+
{% if form.channelPriceHistoryConfig is defined %}
84+
<div class="ui attached segment">
85+
{{ form_row(form.channelPriceHistoryConfig.lowestPriceForDiscountedProductsVisible) }}
86+
{{ form_row(form.channelPriceHistoryConfig.lowestPriceForDiscountedProductsCheckingPeriod) }}
87+
{{ form_row(form.channelPriceHistoryConfig.taxonsExcludedFromShowingLowestPrice, {'remote_url': path('sylius_admin_ajax_taxon_by_name_phrase'), 'load_edit_url': path('sylius_admin_ajax_taxon_by_code')}) }}
88+
</div>
89+
{% endif %}
8390
</div>
8491
</div>

0 commit comments

Comments
 (0)