Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions templates/catalog/_partials/customization-modal.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{$componentName = 'product-customization-modal'}

<div id="product-customizations-modal-{$customization.id_customization}" class="modal fade product-customization-modal" tabindex="-1" role="dialog" aria-hidden="true" aria-labelledby="customizations-modal-{$customization.id_customization}-title">
Expand Down
39 changes: 39 additions & 0 deletions templates/customer/_partials/order-carrier.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
<section class="order-carriers">
<h3 class="h3" id="order_carriers_heading">{l s='Shipment tracking details' d='Shop.Theme.Customeraccount'}</h3>

<div class="grid-table" role="table" aria-label="{l s='Order tracking' d='Shop.Theme.Customeraccount'}" aria-describedby="order_carriers_heading">
<div class="grid-table__inner grid-table__inner--5" role="rowgroup">
<div class="grid-table__header" role="row">
<span class="grid-table__cell" role="columnheader">{l s='Date' d='Shop.Theme.Global'}</span>
<span class="grid-table__cell" role="columnheader">{l s='Carrier' d='Shop.Theme.Checkout'}</span>
<span class="grid-table__cell" role="columnheader">{l s='Weight' d='Shop.Theme.Checkout'}</span>
<span class="grid-table__cell" role="columnheader">{l s='Shipping cost' d='Shop.Theme.Checkout'}</span>
<span class="grid-table__cell" role="columnheader">{l s='Tracking number' d='Shop.Theme.Checkout'}</span>
</div>

{foreach from=$order.shipping item=line}
<div class="grid-table__row" role="row">
<span class="grid-table__cell" role="cell" data-ps-label="{l s='Date' d='Shop.Theme.Global'}">
{$line.shipping_date}
</span>
<span class="grid-table__cell" role="cell" data-ps-label="{l s='Carrier' d='Shop.Theme.Checkout'}">
{$line.carrier_name}
</span>
<span class="grid-table__cell" role="cell" data-ps-label="{l s='Weight' d='Shop.Theme.Checkout'}">
{$line.shipping_weight}
</span>
<span class="grid-table__cell" role="cell" data-ps-label="{l s='Shipping cost' d='Shop.Theme.Checkout'}">
{$line.shipping_cost}
</span>
<span class="grid-table__cell" role="cell" data-ps-label="{l s='Tracking number' d='Shop.Theme.Checkout'}">
{$line.tracking nofilter}
</span>
</div>
{/foreach}
</div>
</div>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{block name='order_products_table'}
<div class="grid-table grid-table--collapse mb-0" role="table" aria-label="{l s='Products details' d='Shop.Theme.Customeraccount'}" aria-describedby="order_products_heading">
<div class="grid-table__inner grid-table__inner--4" role="rowgroup">
<div class="grid-table__header" role="row">
<span class="grid-table__cell" role="columnheader">{l s='Product' d='Shop.Theme.Catalog'}</span>
<span class="grid-table__cell grid-table__cell--center" role="columnheader">{l s='Quantity' d='Shop.Theme.Catalog'}</span>
<span class="grid-table__cell grid-table__cell--center" role="columnheader">{l s='Unit price' d='Shop.Theme.Catalog'}</span>
<span class="grid-table__cell grid-table__cell--right" role="columnheader">{l s='Total price' d='Shop.Theme.Catalog'}</span>
</div>

{foreach $order->order_shipments['physical_products'] item=shipment}
{foreach from=$shipment['products'] item=product}
{assign var="is_last_product" value=($product@last && empty($order->order_shipments['virtual_products']))}

{include
file='./order-detail-product-line-no-return.tpl'
product=$product
carrier_name=$shipment['carrier']['name']
is_last_product=$is_last_product
}
{/foreach}
{/foreach}

{foreach $order->order_shipments['virtual_products'] item=product}
{include file='./order-detail-product-line-no-return.tpl' product=$product is_last_product=$product@last}
{/foreach}
</div>
</div>

<div class="grid-table grid-table--collapse" role="table" aria-label="{l s='Order totals' d='Shop.Theme.Customeraccount'}">
<div class="grid-table__inner grid-table__inner--6" role="rowgroup">
{foreach $order.subtotals as $line}
{if $line.value}
<div class="grid-table__row" role="row">
<span class="grid-table__cell grid-table__cell--label-value" role="cell" data-ps-label="{$line.label}">
<span class="visually-hidden">{l s='%label%' d='Shop.Theme.Catalog' sprintf=['%label%' => $line.label]}</span>
{$line.value}
</span>
</div>
{/if}
{/foreach}

<div class="grid-table__row" role="row">
<span class="grid-table__cell grid-table__cell--label-value" role="cell" data-ps-label="{$order.totals.total.label}">
<span class="visually-hidden">{l s='Total price' d='Shop.Theme.Catalog'}</span>
{$order.totals.total.value}
</span>
</div>
</div>
</div>
{/block}
14 changes: 7 additions & 7 deletions templates/customer/_partials/order-detail-no-return.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
{block name='order_products_table'}
<div class="grid-table grid-table--collapse mb-0" role="table" aria-label="{l s='Products details' d='Shop.Theme.Customeraccount'}" aria-describedby="order_products_heading">
<div class="grid-table__inner grid-table__inner--4" role="rowgroup">
<header class="grid-table__header" role="row">
<div class="grid-table__header" role="row">
<span class="grid-table__cell" role="columnheader">{l s='Product' d='Shop.Theme.Catalog'}</span>
<span class="grid-table__cell grid-table__cell--center" role="columnheader">{l s='Quantity' d='Shop.Theme.Catalog'}</span>
<span class="grid-table__cell grid-table__cell--center" role="columnheader">{l s='Unit price' d='Shop.Theme.Catalog'}</span>
<span class="grid-table__cell grid-table__cell--right" role="columnheader">{l s='Total price' d='Shop.Theme.Catalog'}</span>
</header>
</div>

{foreach from=$order.products item=product name=products}
<div class="grid-table__row {if $smarty.foreach.products.last}rounded-bottom-0{/if}" role="row">
Expand All @@ -21,7 +21,7 @@
{if $product.cover}
<picture>
{if isset($product.cover.bySize.default_xs.sources.avif)}
<source
<source
srcset="
{$product.cover.bySize.default_xs.sources.avif},
{$product.cover.bySize.default_md.sources.avif} 2x",
Expand All @@ -30,7 +30,7 @@
{/if}

{if isset($product.cover.bySize.default_xs.sources.webp)}
<source
<source
srcset="
{$product.cover.bySize.default_xs.sources.webp},
{$product.cover.bySize.default_md.sources.webp} 2x"
Expand All @@ -53,7 +53,7 @@
{else}
<picture>
{if isset($urls.no_picture_image.bySize.default_xs.sources.avif)}
<source
<source
srcset="
{$urls.no_picture_image.bySize.default_xs.sources.avif},
{$urls.no_picture_image.bySize.default_md.sources.avif} 2x"
Expand All @@ -62,7 +62,7 @@
{/if}

{if isset($urls.no_picture_image.bySize.default_xs.sources.webp)}
<source
<source
srcset="
{$urls.no_picture_image.bySize.default_xs.sources.webp},
{$urls.no_picture_image.bySize.default_md.sources.webp} 2x"
Expand Down Expand Up @@ -91,7 +91,7 @@

{if $product.product_reference}
<small class="text-secondary">
{l s='Reference' d='Shop.Theme.Catalog'}: {$product.product_reference}
{l s='Reference: %reference%' sprintf=['%reference%' => $product.product_reference] d='Shop.Theme.Catalog'}
</small>
{/if}

Expand Down
143 changes: 143 additions & 0 deletions templates/customer/_partials/order-detail-product-line-no-return.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{block name='order_products_table_line_no_return'}
<div class="grid-table__row {if isset($is_last_product) && $is_last_product}rounded-bottom-0{/if}" role="row">
<span class="grid-table__cell order-product" role="cell" data-ps-label="{l s='Product' d='Shop.Theme.Catalog'}">
<span class="order-product__infos">
<span class="order-product__image">
<a href="{$link->getProductLink($product.id_product)}">
{if isset($product.cover) && $product.cover}
<picture>
{if isset($product.cover.bySize.default_xs.sources.avif)}
<source
srcset="
{$product.cover.bySize.default_xs.sources.avif},
{$product.cover.bySize.default_md.sources.avif} 2x",
type="image/avif"
>
{/if}

{if isset($product.cover.bySize.default_xs.sources.webp)}
<source
srcset="
{$product.cover.bySize.default_xs.sources.webp},
{$product.cover.bySize.default_md.sources.webp} 2x"
type="image/webp"
>
{/if}

<img
class="order-product__img img-fluid"
srcset="
{$product.cover.bySize.default_xs.url},
{$product.cover.bySize.default_md.url} 2x"
width="{$product.cover.bySize.default_xs.width}"
height="{$product.cover.bySize.default_xs.height}"
loading="lazy"
alt="{$product.cover.legend}"
title="{$product.cover.legend}"
>
</picture>
{else}
<picture>
{if isset($urls.no_picture_image.bySize.default_xs.sources.avif)}
<source
srcset="
{$urls.no_picture_image.bySize.default_xs.sources.avif},
{$urls.no_picture_image.bySize.default_md.sources.avif} 2x"
type="image/avif"
>
{/if}

{if isset($urls.no_picture_image.bySize.default_xs.sources.webp)}
<source
srcset="
{$urls.no_picture_image.bySize.default_xs.sources.webp},
{$urls.no_picture_image.bySize.default_md.sources.webp} 2x"
type="image/webp"
>
{/if}

<img
class="order-product__img img-fluid"
srcset="
{$urls.no_picture_image.bySize.default_xs.url},
{$urls.no_picture_image.bySize.default_md.url} 2x"
width="{$urls.no_picture_image.bySize.default_xs.width}"
height="{$urls.no_picture_image.bySize.default_xs.height}"
loading="lazy"
>
</picture>
{/if}
</a>
</span>

<span class="order-product__content">
<a class="order-product__name" href="{$link->getProductLink($product.id_product)}">
{$product.name}
</a>

{if $product.product_reference}
<small class="text-secondary">
{l s='Reference: %reference%' sprintf=['%reference%' => $product.product_reference] d='Shop.Theme.Catalog'}
</small>
{/if}

{if $product.is_virtual}
<small class="text-secondary">
{l s='Virtual product(s): No delivery service' d='Shop.Theme.Global'}
</small>
{/if}

{if !$product.is_virtual && isset($carrier_name)}
<small class="text-secondary">
{l s='Carrier: %carrier_name%' sprintf=['%carrier_name%' => $carrier_name] d='Shop.Theme.Catalog'}
</small>
{/if}

{if isset($product.download_link)}
<a href="{$product.download_link}">
<i class="material-icons" aria-hidden="true">&#xF090;</i> {l s='Download' d='Shop.Theme.Actions'}
</a>
{/if}

{if $product.customizations}
{foreach from=$product.customizations item="customization"}
<span id="product_customization_modal_wrapper_{$customization.id_customization}">
{include file='catalog/_partials/customization-modal.tpl' customization=$customization}
</span>

<span class="customization">
<a class="btn btn-sm btn-link p-0" href="#" data-bs-toggle="modal"
data-bs-target="#product-customizations-modal-{$customization.id_customization}">
<i class="material-icons">&#xE8F4;</i>
{l s='Product customization' d='Shop.Theme.Catalog'}
</a>
</span>
{/foreach}
{/if}
</span>
</span>
</span>

<span class="grid-table__cell grid-table__cell--center" role="cell" data-ps-label="{l s='Quantity' d='Shop.Theme.Catalog'}">
{if $product.customizations}
{foreach $product.customizations as $customization}
{$customization.quantity}
{/foreach}
{else}
{$product.quantity}
{/if}
</span>

<span class="grid-table__cell grid-table__cell--center" role="cell" data-ps-label="{l s='Unit price' d='Shop.Theme.Catalog'}">
{$product.price}
</span>

<span class="grid-table__cell grid-table__cell--right" role="cell" data-ps-label="{l s='Total price' d='Shop.Theme.Catalog'}">
{$product.total}
</span>
</div>
{/block}
Loading