From 3da36cfbe52e1604327a35b8eec2415e7d4bb8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Tue, 29 Oct 2024 09:49:12 +0100 Subject: [PATCH 1/2] [Shop] Reorganize Twig hooks on cart index page --- .../config/app/twig_hooks/cart/index.yaml | 77 ++++++++++--------- .../ShopBundle/templates/cart/index.html.twig | 4 +- .../templates/cart/index/content.html.twig | 3 + .../cart/index/{ => content}/form.html.twig | 0 .../{ => content}/form/sections.html.twig | 0 .../form/sections/general.html.twig | 0 .../form/sections/general/checkout.html.twig | 0 .../sections/general/clear_cart.html.twig | 0 .../form/sections/general/coupon.html.twig | 0 .../form/sections/general/items.html.twig | 0 .../sections/general/items/body.html.twig | 0 .../general/items/body/item.html.twig | 0 .../general/items/body/quantity.html.twig | 0 .../general/items/body/remove.html.twig | 0 .../general/items/body/total.html.twig | 0 .../general/items/body/unit_price.html.twig | 0 .../sections/general/items/head.html.twig | 0 .../general/items/head/item.html.twig | 0 .../general/items/head/quantity.html.twig | 0 .../general/items/head/remove.html.twig | 0 .../general/items/head/total.html.twig | 0 .../general/items/head/unit_price.html.twig | 0 .../form/sections/general/summary.html.twig | 0 .../base_currency_order_total.html.twig | 0 .../general/summary/discount.html.twig | 0 .../general/summary/estimated_cost.html.twig | 0 .../general/summary/items_total.html.twig | 0 .../general/summary/order_total.html.twig | 0 .../general/summary/taxes_total.html.twig | 0 .../form/sections/header.html.twig | 0 .../cart/index/{ => content}/header.html.twig | 0 31 files changed, 45 insertions(+), 39 deletions(-) create mode 100644 src/Sylius/Bundle/ShopBundle/templates/cart/index/content.html.twig rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/checkout.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/clear_cart.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/coupon.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/body.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/body/item.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/body/quantity.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/body/remove.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/body/total.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/body/unit_price.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/head.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/head/item.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/head/quantity.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/head/remove.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/head/total.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/items/head/unit_price.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/summary.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/summary/base_currency_order_total.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/summary/discount.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/summary/estimated_cost.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/summary/items_total.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/summary/order_total.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/general/summary/taxes_total.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/form/sections/header.html.twig (100%) rename src/Sylius/Bundle/ShopBundle/templates/cart/index/{ => content}/header.html.twig (100%) diff --git a/src/Sylius/Bundle/ShopBundle/Resources/config/app/twig_hooks/cart/index.yaml b/src/Sylius/Bundle/ShopBundle/Resources/config/app/twig_hooks/cart/index.yaml index e61947452b..4004f0d594 100644 --- a/src/Sylius/Bundle/ShopBundle/Resources/config/app/twig_hooks/cart/index.yaml +++ b/src/Sylius/Bundle/ShopBundle/Resources/config/app/twig_hooks/cart/index.yaml @@ -1,11 +1,16 @@ sylius_twig_hooks: hooks: 'sylius_shop.cart.index': + content: + template: '@SyliusShop/cart/index/content.html.twig' + priority: 0 + + 'sylius_shop.cart.index.content': form: component: 'sylius_shop:cart:form' props: resource: '@=_context.cart' - template: '@SyliusShop/cart/index/form.html.twig' + template: '@SyliusShop/cart/index/content/form.html.twig' priority: 100 suggested_products: component: 'sylius_shop:product:list' @@ -16,106 +21,106 @@ sylius_twig_hooks: title: 'sylius.ui.you_may_also_like' priority: 0 - 'sylius_shop.cart.index.header': + 'sylius_shop.cart.index.content.header': flashes: enabled: false - 'sylius_shop.cart.index.form': + 'sylius_shop.cart.index.content.form': sections: - template: '@SyliusShop/cart/index/form/sections.html.twig' + template: '@SyliusShop/cart/index/content/form/sections.html.twig' priority: 0 - 'sylius_shop.cart.index.form.sections': + 'sylius_shop.cart.index.content.form.sections': flashes: template: "@SyliusShop/shared/flashes.html.twig" priority: 200 header: - template: '@SyliusShop/cart/index/form/sections/header.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/header.html.twig' priority: 100 general: - template: '@SyliusShop/cart/index/form/sections/general.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general.html.twig' priority: 0 - 'sylius_shop.cart.index.form.sections.general#left': + 'sylius_shop.cart.index.content.form.sections.general#left': items: - template: '@SyliusShop/cart/index/form/sections/general/items.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items.html.twig' priority: 200 coupon: - template: '@SyliusShop/cart/index/form/sections/general/coupon.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/coupon.html.twig' priority: 100 clear_cart: - template: '@SyliusShop/cart/index/form/sections/general/clear_cart.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/clear_cart.html.twig' priority: 0 - 'sylius_shop.cart.index.form.sections.general#right': + 'sylius_shop.cart.index.content.form.sections.general#right': summary: component: 'sylius_shop:cart:summary' props: cart: '@=_context.cart' - template: '@SyliusShop/cart/index/form/sections/general/summary.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/summary.html.twig' priority: 100 checkout: - template: '@SyliusShop/cart/index/form/sections/general/checkout.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/checkout.html.twig' priority: 0 - 'sylius_shop.cart.index.form.sections.general.items': + 'sylius_shop.cart.index.content.form.sections.general.items': head: - template: '@SyliusShop/cart/index/form/sections/general/items/head.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/head.html.twig' priority: 100 body: - template: '@SyliusShop/cart/index/form/sections/general/items/body.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/body.html.twig' priority: 0 - 'sylius_shop.cart.index.form.sections.general.items.head': + 'sylius_shop.cart.index.content.form.sections.general.items.head': remove: - template: '@SyliusShop/cart/index/form/sections/general/items/head/remove.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/head/remove.html.twig' priority: 400 item: - template: '@SyliusShop/cart/index/form/sections/general/items/head/item.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/head/item.html.twig' priority: 300 unit_price: - template: '@SyliusShop/cart/index/form/sections/general/items/head/unit_price.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/head/unit_price.html.twig' priority: 200 quantity: - template: '@SyliusShop/cart/index/form/sections/general/items/head/quantity.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/head/quantity.html.twig' priority: 100 total: - template: '@SyliusShop/cart/index/form/sections/general/items/head/total.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/head/total.html.twig' priority: 0 - 'sylius_shop.cart.index.form.sections.general.items.body': + 'sylius_shop.cart.index.content.form.sections.general.items.body': remove: - template: '@SyliusShop/cart/index/form/sections/general/items/body/remove.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/body/remove.html.twig' priority: 400 item: - template: '@SyliusShop/cart/index/form/sections/general/items/body/item.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/body/item.html.twig' priority: 300 unit_price: - template: '@SyliusShop/cart/index/form/sections/general/items/body/unit_price.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/body/unit_price.html.twig' priority: 200 quantity: - template: '@SyliusShop/cart/index/form/sections/general/items/body/quantity.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/body/quantity.html.twig' priority: 100 total: - template: '@SyliusShop/cart/index/form/sections/general/items/body/total.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/items/body/total.html.twig' priority: 0 - 'sylius_shop.cart.index.form.sections.general.summary': + 'sylius_shop.cart.index.content.form.sections.general.summary': items_total: - template: '@SyliusShop/cart/index/form/sections/general/summary/items_total.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/summary/items_total.html.twig' priority: 500 discount: - template: '@SyliusShop/cart/index/form/sections/general/summary/discount.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/summary/discount.html.twig' priority: 400 estimated_cost: - template: '@SyliusShop/cart/index/form/sections/general/summary/estimated_cost.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/summary/estimated_cost.html.twig' priority: 300 taxes_total: - template: '@SyliusShop/cart/index/form/sections/general/summary/taxes_total.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/summary/taxes_total.html.twig' priority: 200 order_total: - template: '@SyliusShop/cart/index/form/sections/general/summary/order_total.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/summary/order_total.html.twig' priority: 100 base_currency_order_total: - template: '@SyliusShop/cart/index/form/sections/general/summary/base_currency_order_total.html.twig' + template: '@SyliusShop/cart/index/content/form/sections/general/summary/base_currency_order_total.html.twig' priority: 0 diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index.html.twig index e37d216791..4a74894267 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/cart/index.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/cart/index.html.twig @@ -6,7 +6,5 @@ {% block title %}{{ 'sylius.ui.your_shopping_cart'|trans }} | {{ parent() }}{% endblock %} {% block content %} -
- {% hook cart_hook with { cart, form } %} -
+ {% hook cart_hook with { cart, form } %} {% endblock %} diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/content.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content.html.twig new file mode 100644 index 0000000000..6392fe0854 --- /dev/null +++ b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content.html.twig @@ -0,0 +1,3 @@ +
+ {% hook 'content' %} +
diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/checkout.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/checkout.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/checkout.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/checkout.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/clear_cart.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/clear_cart.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/clear_cart.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/clear_cart.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/coupon.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/coupon.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/coupon.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/coupon.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/item.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/item.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/item.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/item.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/quantity.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/quantity.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/quantity.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/quantity.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/remove.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/remove.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/remove.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/remove.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/total.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/total.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/total.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/total.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/unit_price.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/unit_price.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/body/unit_price.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/body/unit_price.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/item.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/item.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/item.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/item.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/quantity.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/quantity.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/quantity.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/quantity.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/remove.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/remove.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/remove.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/remove.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/total.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/total.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/total.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/total.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/unit_price.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/unit_price.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/items/head/unit_price.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/items/head/unit_price.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/base_currency_order_total.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/base_currency_order_total.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/base_currency_order_total.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/base_currency_order_total.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/discount.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/discount.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/discount.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/discount.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/estimated_cost.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/estimated_cost.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/estimated_cost.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/estimated_cost.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/items_total.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/items_total.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/items_total.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/items_total.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/order_total.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/order_total.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/order_total.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/order_total.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/taxes_total.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/taxes_total.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/general/summary/taxes_total.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/general/summary/taxes_total.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/header.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/header.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/form/sections/header.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form/sections/header.html.twig diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/header.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/header.html.twig similarity index 100% rename from src/Sylius/Bundle/ShopBundle/templates/cart/index/header.html.twig rename to src/Sylius/Bundle/ShopBundle/templates/cart/index/content/header.html.twig From 44c71421e3b161e17c03a4c9ffe15ef5aeb88e7d Mon Sep 17 00:00:00 2001 From: Wojdylak Date: Mon, 4 Nov 2024 11:19:48 +0100 Subject: [PATCH 2/2] [Behat][Shop] Adjusted flash_message selector to specify alert-info --- src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php b/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php index 7956c2bfc6..b4072334e5 100644 --- a/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php +++ b/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php @@ -173,7 +173,7 @@ class SummaryPage extends ShopPage implements SummaryPageInterface public function cartIsEmpty(): bool { - return str_contains($this->getElement('flash_message')->getText(), 'Your cart is empty'); + return str_contains($this->getElement('flash_message_info')->getText(), 'Your cart is empty'); } public function getQuantity(string $productName): int @@ -226,7 +226,7 @@ class SummaryPage extends ShopPage implements SummaryPageInterface 'checkout_button' => '[data-test-cart-checkout-button]', 'clear_cart' => '[data-test-clear-cart]', 'coupon_field' => '[data-test-cart-promotion-coupon-input]', - 'flash_message' => '[data-test-sylius-flash-message]', + 'flash_message_info' => '[data-test-sylius-flash-message="alert-info"]', 'form' => '[data-live-name-value="sylius_shop:cart:form"]', 'summary_component' => '[data-live-name-value="sylius_shop:cart:summary"]', 'grand_total' => '[data-test-cart-grand-total]',