From 4b6c48d09d933095ee5bf7a529e6a4722ce12538 Mon Sep 17 00:00:00 2001 From: damonsson Date: Thu, 5 Dec 2024 01:41:27 +0100 Subject: [PATCH 1/2] performance optimization --- config/packages/sylius_twig_hooks.yaml | 5 ++++ .../homepage/card_deals.html.twig | 1 + templates/payment_methods.html.twig | 27 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 templates/payment_methods.html.twig diff --git a/config/packages/sylius_twig_hooks.yaml b/config/packages/sylius_twig_hooks.yaml index 25727b2..62e909f 100644 --- a/config/packages/sylius_twig_hooks.yaml +++ b/config/packages/sylius_twig_hooks.yaml @@ -69,3 +69,8 @@ sylius_twig_hooks: limit: 8 template: '@SyliusShop/homepage/list_products.html.twig' priority: 0 + 'sylius_shop.base.footer.content': + payment_methods: + template: '@SyliusShop/shared/layout/base/footer/content/payment_methods.html.twig' + priority: 100 + diff --git a/templates/bundles/SyliusShopBundle/homepage/card_deals.html.twig b/templates/bundles/SyliusShopBundle/homepage/card_deals.html.twig index 278cd07..1a9a379 100644 --- a/templates/bundles/SyliusShopBundle/homepage/card_deals.html.twig +++ b/templates/bundles/SyliusShopBundle/homepage/card_deals.html.twig @@ -5,6 +5,7 @@ {% if key == 1 %} {{ component('sylius_shop:main_image', { product: product, + fetchpriority: "high", class: "w-100 h-100 object-fit-cover", filter: 'sylius_shop_product_small_thumbnail' }) }} diff --git a/templates/payment_methods.html.twig b/templates/payment_methods.html.twig new file mode 100644 index 0000000..06c593a --- /dev/null +++ b/templates/payment_methods.html.twig @@ -0,0 +1,27 @@ +
+
Payment methods:
+ +
+
+ + PayPal + +
+
+ + Adyen + +
+
+ + Mollie + +
+
+ + +
From 12d9b223bfe25109a750640f52bc92d53666432a Mon Sep 17 00:00:00 2001 From: damonsson Date: Thu, 5 Dec 2024 01:43:57 +0100 Subject: [PATCH 2/2] performance optimization --- config/packages/sylius_twig_hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/packages/sylius_twig_hooks.yaml b/config/packages/sylius_twig_hooks.yaml index 62e909f..171a423 100644 --- a/config/packages/sylius_twig_hooks.yaml +++ b/config/packages/sylius_twig_hooks.yaml @@ -71,6 +71,6 @@ sylius_twig_hooks: priority: 0 'sylius_shop.base.footer.content': payment_methods: - template: '@SyliusShop/shared/layout/base/footer/content/payment_methods.html.twig' + template: 'payment_methods.html.twig' priority: 100