From aac9a161a84a3de0bf6e2e6f3a20e66c7ac0e6db Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Wed, 19 Oct 2022 15:23:15 +0200 Subject: [PATCH 1/4] Review feedbacks --- .../_partials/product-cover-thumbnails.tpl | 9 +++++++++ .../_partials/cart-detailed-product-line.tpl | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/templates/catalog/_partials/product-cover-thumbnails.tpl b/templates/catalog/_partials/product-cover-thumbnails.tpl index f459644a5..17f36e305 100644 --- a/templates/catalog/_partials/product-cover-thumbnails.tpl +++ b/templates/catalog/_partials/product-cover-thumbnails.tpl @@ -55,12 +55,21 @@ {$image.bySize.product_main.url} 720w, {$image.bySize.product_main_2x.url} 1440w" sizes="(min-width: 1300px) 720px, (min-width: 768px) 50vw, 100vw" +<<<<<<< HEAD src="{$image.bySize.product_main.url}" width="{$image.bySize.product_main.width}" height="{$image.bySize.product_main.height}" loading="{if $smarty.foreach.productImages.first}eager{else}lazy{/if}" alt="{$image.legend}" title="{$image.legend}" +======= + src="{$image.bySize.default_720.sources.jpg}" + width="{$image.bySize.default_720.width}" + height="{$image.bySize.default_720.height}" + loading="eager" + alt="{if !empty($image)}{$image.legend}{else}{$product.name}{/if}" + title="{if !empty($image.legend)}{$image.legend}{else}{$product.name}{/if}" +>>>>>>> c5027e0 (Review feedbacks) data-full-size-image-url="{$image.bySize.home_default.url}" > diff --git a/templates/checkout/_partials/cart-detailed-product-line.tpl b/templates/checkout/_partials/cart-detailed-product-line.tpl index dc79a298e..37b777685 100644 --- a/templates/checkout/_partials/cart-detailed-product-line.tpl +++ b/templates/checkout/_partials/cart-detailed-product-line.tpl @@ -14,8 +14,13 @@ {if isset($product.default_image.bySize.default_xs.sources.avif)} >>>>>> c5027e0 (Review feedbacks) type="image/avif" > {/if} @@ -23,8 +28,13 @@ {if isset($product.default_image.bySize.default_xs.sources.webp)} >>>>>> c5027e0 (Review feedbacks) type="image/webp" > {/if} @@ -32,10 +42,17 @@ >>>>>> c5027e0 (Review feedbacks) loading="lazy" alt="{$product.name|escape:'quotes'}" title="{$product.name|escape:'quotes'}" From 763ae2436905b3fef70153ed09a689fb642a1010 Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Mon, 14 Nov 2022 16:09:31 +0100 Subject: [PATCH 2/4] Update others images to picture tags --- .../templates/hook/post-comment-modal.tpl | 67 ++++++++++++++++- .../_partials/miniatures/pack-product.tpl | 75 ++++++++++++++++--- .../_partials/order-confirmation-table.tpl | 65 +++++++++++++++- .../_partials/order-detail-no-return.tpl | 66 ++++++++++++++-- .../_partials/order-detail-return.tpl | 66 ++++++++++++++-- 5 files changed, 310 insertions(+), 29 deletions(-) diff --git a/modules/productcomments/views/templates/hook/post-comment-modal.tpl b/modules/productcomments/views/templates/hook/post-comment-modal.tpl index 93367b52e..3a60604f5 100644 --- a/modules/productcomments/views/templates/hook/post-comment-modal.tpl +++ b/modules/productcomments/views/templates/hook/post-comment-modal.tpl @@ -29,10 +29,71 @@ {block name='product_cover'}
- {if $product.cover} - {$product.cover.legend} + {if !empty($product.cover)} + + {if isset($product.cover.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($product.cover.bySize.default_xs.sources.webp)} + + {/if} + + {$product.cover.legend} {else} - + + {if isset($urls.no_picture_image.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($urls.no_picture_image.bySize.default_xs.sources.webp)} + + {/if} + + + {/if}
{/block} diff --git a/templates/catalog/_partials/miniatures/pack-product.tpl b/templates/catalog/_partials/miniatures/pack-product.tpl index 6ba7e561e..7eec6c342 100644 --- a/templates/catalog/_partials/miniatures/pack-product.tpl +++ b/templates/catalog/_partials/miniatures/pack-product.tpl @@ -6,20 +6,71 @@
- {if !empty($product.default_image.medium)} - {$product.default_image.legend} + {if isset($product.default_image.bySize.default_xs.sources.avif)} + {/if} - loading="lazy" - class="img-fluid rounded" - > + + {if isset($product.default_image.bySize.default_xs.sources.webp)} + + {/if} + + {$product.default_image.legend} {else} - + + {if isset($urls.no_picture_image.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($urls.no_picture_image.bySize.default_xs.sources.webp)} + + {/if} + + + {/if}
diff --git a/templates/checkout/_partials/order-confirmation-table.tpl b/templates/checkout/_partials/order-confirmation-table.tpl index 5960887de..4c5cf21cc 100644 --- a/templates/checkout/_partials/order-confirmation-table.tpl +++ b/templates/checkout/_partials/order-confirmation-table.tpl @@ -11,9 +11,70 @@
{if !empty($product.default_image)} - + + {if isset($product.default_image.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($product.default_image.bySize.default_xs.sources.webp)} + + {/if} + + {$product.default_image.legend} {else} - + + {if isset($urls.no_picture_image.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($urls.no_picture_image.bySize.default_xs.sources.webp)} + + {/if} + + + {/if}
diff --git a/templates/customer/_partials/order-detail-no-return.tpl b/templates/customer/_partials/order-detail-no-return.tpl index 6b982e5af..85e2dc303 100644 --- a/templates/customer/_partials/order-detail-no-return.tpl +++ b/templates/customer/_partials/order-detail-no-return.tpl @@ -18,13 +18,67 @@ {if $product.cover} - {if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if} + + {if isset($product.cover.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($product.cover.bySize.default_xs.sources.webp)} + + {/if} + + {if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if} + {else} - + + {if isset($urls.no_picture_image.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($urls.no_picture_image.bySize.default_xs.sources.webp)} + + {/if} + + + {/if} diff --git a/templates/customer/_partials/order-detail-return.tpl b/templates/customer/_partials/order-detail-return.tpl index 423025390..54e43a348 100644 --- a/templates/customer/_partials/order-detail-return.tpl +++ b/templates/customer/_partials/order-detail-return.tpl @@ -120,13 +120,67 @@
{if $product.cover} - {if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if} + + {if isset($product.cover.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($product.cover.bySize.default_xs.sources.webp)} + + {/if} + + {if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if} + {else} - + + {if isset($urls.no_picture_image.bySize.default_xs.sources.avif)} + + {/if} + + {if isset($urls.no_picture_image.bySize.default_xs.sources.webp)} + + {/if} + + + {/if}
From 8e06103e2963b3c29bc391f84ef676f0aad75848 Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Wed, 7 Dec 2022 14:57:46 +0100 Subject: [PATCH 3/4] Fix wrong conflicts --- .../_partials/product-cover-thumbnails.tpl | 9 --------- .../_partials/cart-detailed-product-line.tpl | 17 ----------------- 2 files changed, 26 deletions(-) diff --git a/templates/catalog/_partials/product-cover-thumbnails.tpl b/templates/catalog/_partials/product-cover-thumbnails.tpl index 17f36e305..f459644a5 100644 --- a/templates/catalog/_partials/product-cover-thumbnails.tpl +++ b/templates/catalog/_partials/product-cover-thumbnails.tpl @@ -55,21 +55,12 @@ {$image.bySize.product_main.url} 720w, {$image.bySize.product_main_2x.url} 1440w" sizes="(min-width: 1300px) 720px, (min-width: 768px) 50vw, 100vw" -<<<<<<< HEAD src="{$image.bySize.product_main.url}" width="{$image.bySize.product_main.width}" height="{$image.bySize.product_main.height}" loading="{if $smarty.foreach.productImages.first}eager{else}lazy{/if}" alt="{$image.legend}" title="{$image.legend}" -======= - src="{$image.bySize.default_720.sources.jpg}" - width="{$image.bySize.default_720.width}" - height="{$image.bySize.default_720.height}" - loading="eager" - alt="{if !empty($image)}{$image.legend}{else}{$product.name}{/if}" - title="{if !empty($image.legend)}{$image.legend}{else}{$product.name}{/if}" ->>>>>>> c5027e0 (Review feedbacks) data-full-size-image-url="{$image.bySize.home_default.url}" > diff --git a/templates/checkout/_partials/cart-detailed-product-line.tpl b/templates/checkout/_partials/cart-detailed-product-line.tpl index 37b777685..dc79a298e 100644 --- a/templates/checkout/_partials/cart-detailed-product-line.tpl +++ b/templates/checkout/_partials/cart-detailed-product-line.tpl @@ -14,13 +14,8 @@ {if isset($product.default_image.bySize.default_xs.sources.avif)} >>>>>> c5027e0 (Review feedbacks) type="image/avif" > {/if} @@ -28,13 +23,8 @@ {if isset($product.default_image.bySize.default_xs.sources.webp)} >>>>>> c5027e0 (Review feedbacks) type="image/webp" > {/if} @@ -42,17 +32,10 @@ >>>>>> c5027e0 (Review feedbacks) loading="lazy" alt="{$product.name|escape:'quotes'}" title="{$product.name|escape:'quotes'}" From 242fcf6bd5ba9e287f052fcfb2fa76a9ac5ccbe5 Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Fri, 9 Dec 2022 11:04:30 +0100 Subject: [PATCH 4/4] Review feedbacks --- .../views/templates/hook/post-comment-modal.tpl | 8 ++------ .../_partials/miniatures/pack-product.tpl | 8 ++------ .../catalog/_partials/miniatures/product.tpl | 4 ++-- .../_partials/product-cover-thumbnails.tpl | 4 ++-- .../catalog/_partials/product-images-modal.tpl | 16 ++++------------ .../_partials/order-confirmation-table.tpl | 8 ++------ .../_partials/order-detail-no-return.tpl | 8 ++++---- .../customer/_partials/order-detail-return.tpl | 6 +++--- 8 files changed, 21 insertions(+), 41 deletions(-) diff --git a/modules/productcomments/views/templates/hook/post-comment-modal.tpl b/modules/productcomments/views/templates/hook/post-comment-modal.tpl index 3a60604f5..7de4ac83c 100644 --- a/modules/productcomments/views/templates/hook/post-comment-modal.tpl +++ b/modules/productcomments/views/templates/hook/post-comment-modal.tpl @@ -57,12 +57,8 @@ loading="lazy" width="{$product.cover.bySize.default_xs.width}" height="{$product.cover.bySize.default_xs.height}" - {if !empty($product.cover.legend)} - alt="{$product.cover.legend}" - title="{$product.cover.legend}" - {else} - alt="{$product.name}" - {/if} + alt="{$product.cover.legend}" + title="{$product.cover.legend}" {else} diff --git a/templates/catalog/_partials/miniatures/pack-product.tpl b/templates/catalog/_partials/miniatures/pack-product.tpl index 7eec6c342..78e0c5006 100644 --- a/templates/catalog/_partials/miniatures/pack-product.tpl +++ b/templates/catalog/_partials/miniatures/pack-product.tpl @@ -34,12 +34,8 @@ loading="lazy" width="{$product.default_image.bySize.default_xs.width}" height="{$product.default_image.bySize.default_xs.height}" - {if !empty($product.default_image.legend)} - alt="{$product.default_image.legend}" - title="{$product.default_image.legend}" - {else} - alt="{$product.name}" - {/if} + alt="{$product.default_image.legend}" + title="{$product.default_image.legend}" {else} diff --git a/templates/catalog/_partials/miniatures/product.tpl b/templates/catalog/_partials/miniatures/product.tpl index fc2614da5..0a47a0188 100644 --- a/templates/catalog/_partials/miniatures/product.tpl +++ b/templates/catalog/_partials/miniatures/product.tpl @@ -50,8 +50,8 @@ width="{$product.cover.bySize.default_md.width}" height="{$product.cover.bySize.default_md.height}" loading="lazy" - alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" - title="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" + alt="{$product.cover.legend}" + title="{$product.cover.legend}" data-full-size-image-url="{$product.cover.bySize.home_default.url}" > diff --git a/templates/catalog/_partials/product-cover-thumbnails.tpl b/templates/catalog/_partials/product-cover-thumbnails.tpl index f459644a5..0904b584b 100644 --- a/templates/catalog/_partials/product-cover-thumbnails.tpl +++ b/templates/catalog/_partials/product-cover-thumbnails.tpl @@ -110,8 +110,8 @@ width="{$image.bySize.default_xs.width}" height="{$image.bySize.default_xs.height}" loading="lazy" - alt="{if !empty($image)}{$image.legend}{else}{$product.name}{/if}" - title="{if !empty($image.legend)}{$image.legend}{else}{$product.name}{/if}" + alt="{$image.legend}" + title="{$image.legend}" > diff --git a/templates/catalog/_partials/product-images-modal.tpl b/templates/catalog/_partials/product-images-modal.tpl index 409f6533a..530ee167b 100644 --- a/templates/catalog/_partials/product-images-modal.tpl +++ b/templates/catalog/_partials/product-images-modal.tpl @@ -13,12 +13,8 @@ class="js-modal-product-cover product-cover-modal" width="{$product.default_image.bySize.large_default.width}" src="{$product.default_image.bySize.large_default.url}" - {if !empty($product.default_image.legend)} - alt="{$product.default_image.legend}" - title="{$product.default_image.legend}" - {else} - alt="{$product.name}" - {/if} + alt="{$product.default_image.legend}" + title="{$product.default_image.legend}" height="{$product.default_image.bySize.large_default.height}" > {else} @@ -40,12 +36,8 @@ data-image-large-src="{$image.large.url}" class="thumb js-modal-thumb" src="{$image.medium.url}" - {if !empty($image.legend)} - alt="{$image.legend}" - title="{$image.legend}" - {else} - alt="{$product.name}" - {/if} + alt="{$image.legend}" + title="{$image.legend}" width="{$image.medium.width}" height="148" > diff --git a/templates/checkout/_partials/order-confirmation-table.tpl b/templates/checkout/_partials/order-confirmation-table.tpl index 4c5cf21cc..66b198c33 100644 --- a/templates/checkout/_partials/order-confirmation-table.tpl +++ b/templates/checkout/_partials/order-confirmation-table.tpl @@ -38,12 +38,8 @@ loading="lazy" width="{$product.default_image.bySize.default_xs.width}" height="{$product.default_image.bySize.default_xs.height}" - {if !empty($product.default_image.legend)} - alt="{$product.default_image.legend}" - title="{$product.default_image.legend}" - {else} - alt="{$product.name}" - {/if} + alt="{$product.default_image.legend}" + title="{$product.default_image.legend}" {else} diff --git a/templates/customer/_partials/order-detail-no-return.tpl b/templates/customer/_partials/order-detail-no-return.tpl index 85e2dc303..f31ae85f8 100644 --- a/templates/customer/_partials/order-detail-no-return.tpl +++ b/templates/customer/_partials/order-detail-no-return.tpl @@ -24,7 +24,7 @@ srcset=" {$product.cover.bySize.default_xs.sources.avif}, {$product.cover.bySize.default_m.sources.avif} 2x", - type="image/avif" + type="image/avif" > {/if} @@ -45,8 +45,8 @@ width="{$product.cover.bySize.default_xs.width}" height="{$product.cover.bySize.default_xs.height}" loading="lazy" - alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" - title="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" + alt="{$product.cover.legend}" + title="{$product.cover.legend}" > {else} @@ -145,7 +145,7 @@
{if $product.cover} {if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if} {else} diff --git a/templates/customer/_partials/order-detail-return.tpl b/templates/customer/_partials/order-detail-return.tpl index 54e43a348..81e1a2e37 100644 --- a/templates/customer/_partials/order-detail-return.tpl +++ b/templates/customer/_partials/order-detail-return.tpl @@ -126,7 +126,7 @@ srcset=" {$product.cover.bySize.default_xs.sources.avif}, {$product.cover.bySize.default_m.sources.avif} 2x", - type="image/avif" + type="image/avif" > {/if} @@ -147,8 +147,8 @@ width="{$product.cover.bySize.default_xs.width}" height="{$product.cover.bySize.default_xs.height}" loading="lazy" - alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" - title="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" + alt="{$product.cover.legend}" + title="{$product.cover.legend}" > {else}