Skip to content

Commit

Permalink
Show in shop is disabled if page is not published
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Sep 24, 2024
1 parent 78302a6 commit 0cb86db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/views/Admin/Page/_showInShopButton.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set enabledChannels = resource.channels|filter(channel => channel.enabled == true) %}

{% if sylius_bundle_loaded_checker('SyliusShopBundle') %}
{% if not resource.enabled or enabledChannels|length < 1 %}
{% if not resource.enabled or not resource.isPublished(date()) or enabledChannels|length < 1 %}
<a class="ui labeled icon button disabled" href="#">
<i class="angle right icon"></i>
{{ 'monsieurbiz_cms_page.ui.show_page_in_shop_page'|trans }}
Expand Down

0 comments on commit 0cb86db

Please sign in to comment.