From 8218fdcbf37b2e3c92a31d616ffbb37f3c7ee139 Mon Sep 17 00:00:00 2001 From: jatiny Date: Tue, 19 Nov 2024 06:36:06 +0000 Subject: [PATCH] chore: update customer templates --- .../_partials/order-detail-no-return.tpl | 100 +++--- .../_partials/order-detail-return.tpl | 145 ++++---- templates/customer/order-detail.tpl | 331 ++++++++---------- 3 files changed, 273 insertions(+), 303 deletions(-) diff --git a/templates/customer/_partials/order-detail-no-return.tpl b/templates/customer/_partials/order-detail-no-return.tpl index 005af9b..040e309 100644 --- a/templates/customer/_partials/order-detail-no-return.tpl +++ b/templates/customer/_partials/order-detail-no-return.tpl @@ -23,31 +23,31 @@ * International Registered Trademark & Property of PrestaShop SA *} {block name='order_products_table'} -
- - +
+ - - - - + + + + {foreach from=$order.products item=product} - - + - - - + + {/foreach} {foreach $order.subtotals as $line} {if $line.value} - - - + + + {/if} {/foreach} - - - + + +
{l s='Product' d='Shop.Theme.Catalog'}{l s='Quantity' d='Shop.Theme.Catalog'}{l s='Unit price' d='Shop.Theme.Catalog'}{l s='Total price' d='Shop.Theme.Catalog'}{l s='Product' d='Shop.Theme.Catalog'}{l s='Quantity' d='Shop.Theme.Catalog'}{l s='Unit price' d='Shop.Theme.Catalog'}{l s='Total price' d='Shop.Theme.Catalog'}
+
- + {$product.name}
{if $product.reference} - {l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
+ {l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
{/if} {if $product.customizations} {foreach from=$product.customizations item="customization"} -
- {l s='Product customization' d='Shop.Theme.Catalog'} +
+ {if $product.customizations} {foreach $product.customizations as $customization} {$customization.quantity} @@ -95,52 +95,49 @@ {$product.quantity} {/if} {$product.price}{$product.total}{$|cat:$product.price}{$|cat:$product.total}
{$line.label}{$line.value}
{$line.label}{$line.value}
{$order.totals.total.label}{$order.totals.total.value}
{$order.totals.total.label}{$order.totals.total.value}
-
+
{foreach from=$order.products item=product} -
-
-
-
{$product.name}
+
+
+
+
{$product.name}
{if $product.reference} -
{l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
+
{l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
{/if} {if $product.customizations} {foreach $product.customizations as $customization} - - -
-
-
- {$product.price} -
-
+
+
+
{$product.price}
+
{if $product.customizations} {foreach $product.customizations as $customization} {$customization.quantity} @@ -149,27 +146,26 @@ {$product.quantity} {/if}
-
- {$product.total} -
+
{'$'|cat:$product.total}
{/foreach}
-
+ +
{foreach $order.subtotals as $line} {if $line.value} -
-
{$line.label}
-
{$line.value}
+
+
{'$line.label'}
+
{'$line.value'}
{/if} {/foreach} -
-
{$order.totals.total.label}
-
{$order.totals.total.value}
+
+
{'$order.totals.total.label'}
+
{'$order.totals.total.value'}
{/block} diff --git a/templates/customer/_partials/order-detail-return.tpl b/templates/customer/_partials/order-detail-return.tpl index 1156ec3..8aeefc5 100644 --- a/templates/customer/_partials/order-detail-return.tpl +++ b/templates/customer/_partials/order-detail-return.tpl @@ -25,42 +25,42 @@ {block name='order_products_table'}
-
- - +
+ - - - - - - + + + + + + {foreach from=$order.products item=product name=products} - - + - - - - - + + + {/foreach} {foreach $order.subtotals as $line} {if $line.value} - - - + + + {/if} {/foreach} - - - + + +
{l s='Product' d='Shop.Theme.Catalog'}{l s='Quantity' d='Shop.Theme.Catalog'}{l s='Returned' d='Shop.Theme.Customeraccount'}{l s='Unit price' d='Shop.Theme.Catalog'}{l s='Total price' d='Shop.Theme.Catalog'}{l s='Product' d='Shop.Theme.Catalog'}{l s='Quantity' d='Shop.Theme.Catalog'}{l s='Returned' d='Shop.Theme.Customeraccount'}{l s='Unit price' d='Shop.Theme.Catalog'}{l s='Total price' d='Shop.Theme.Catalog'}
+
{if !$product.customizations} - - - {else} - {foreach $product.customizations as $customization} - - + + {else} + {foreach $product.customizations as $customization} + + + {/foreach} {/if} + {$product.name}
{if $product.reference} - {l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
+ {l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
{/if} {if $product.customizations} {foreach from=$product.customizations item="customization"} -
- {l s='Product customization' d='Shop.Theme.Catalog'} +
+ {if !$product.customizations}
{$product.quantity}
{if $product.quantity > $product.qty_returned} -
- {section name=quantity start=1 loop=$product.quantity+1-$product.qty_returned} {/section} @@ -118,10 +118,10 @@
{$customization.quantity}
-
+
{$product.qty_returned}{$product.price}{$product.total}{$product.qty_returned}{'$'|cat:$product.price}{'$'|cat:$product.total}
{$line.label}{$line.value}
{'$line.label'}{'$line.value'}
{$order.totals.total.label}{$order.totals.total.value}
{'$order.totals.total.label'}{'$order.totals.total.value'}
-
+
{foreach from=$order.products item=product} -
-
+
+
{if !$product.customizations} @@ -167,29 +167,27 @@ {/foreach} {/if}
-
-
-
-
{$product.name}
+
+
+
+
{$product.name}
{if $product.reference} -
{l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
+
{l s='Reference' d='Shop.Theme.Catalog'}: {$product.reference}
{/if} {if $product.customizations} {foreach $product.customizations as $customization} - -
-
-
- {$product.price} -
-
+
+
+
{'$'|cat:$product.price}
+
{if $product.customizations} {foreach $product.customizations as $customization}
{l s='Quantity' d='Shop.Theme.Catalog'}: {$customization.quantity}
@@ -202,12 +200,9 @@ {/if} {/if} {if $product.qty_returned > 0} -
{l s='Returned' d='Shop.Theme.Customeraccount'}: {$product.qty_returned}
+
{l s='Returned' d='Shop.Theme.Customeraccount'}: {$product.qty_returned}
{/if}
-
- {$product.total} -
@@ -216,38 +211,38 @@
{/foreach}
-
+
{foreach $order.subtotals as $line} {if $line.value} -
-
{$line.label}
-
{$line.value}
+
+
{$line.label}
+
{'$line.value'}
{/if} {/foreach} -
-
{$order.totals.total.label}
-
{$order.totals.total.value}
+
+
{$order.totals.total.label}
+
{'$order.totals.total.value'}
-
-
-

{l s='Merchandise return' d='Shop.Theme.Customeraccount'}

-

{l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. When complete, click the button below.' d='Shop.Theme.Customeraccount'}

+
+
+

{l s='Merchandise return' d='Shop.Theme.Customeraccount'}

+

{l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. When complete, click the button below.' d='Shop.Theme.Customeraccount'}

-
+
- +
-
+
-
-{/block} +{/block}} diff --git a/templates/customer/order-detail.tpl b/templates/customer/order-detail.tpl index 44b9afc..fcc8a17 100644 --- a/templates/customer/order-detail.tpl +++ b/templates/customer/order-detail.tpl @@ -20,7 +20,6 @@ * @author PrestaShop SA * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) - * International Registered Trademark & Property of PrestaShop SA *} {extends file='customer/page.tpl'} @@ -30,184 +29,164 @@ {block name='page_content'} {block name='order_infos'} -
-
-
-
- - {l - s='Order Reference %reference% - placed on %date%' - d='Shop.Theme.Customeraccount' - sprintf=['%reference%' => $order.details.reference, '%date%' => $order.details.order_date] - } - -
- {if $order.details.reorder_url} - - {/if} -
-
-
- -
-
    -
  • {l s='Carrier' d='Shop.Theme.Checkout'} {$order.carrier.name}
  • -
  • {l s='Payment method' d='Shop.Theme.Checkout'} {$order.details.payment}
  • - - {if $order.details.invoice_url} -
  • - - {l s='Download your invoice as a PDF file.' d='Shop.Theme.Customeraccount'} - -
  • - {/if} - - {if $order.details.recyclable} -
  • - {l s='You have given permission to receive your order in recycled packaging.' d='Shop.Theme.Customeraccount'} -
  • - {/if} - - {if $order.details.gift_message} -
  • {l s='You have requested gift wrapping for this order.' d='Shop.Theme.Customeraccount'}
  • -
  • {l s='Message' d='Shop.Theme.Customeraccount'} {$order.details.gift_message nofilter}
  • - {/if} -
-
+
+
+
+
+ + {l s='Order Reference %reference% - placed on %date%' d='Shop.Theme.Customeraccount' sprintf=['%reference%' => $order.details.reference, '%date%' => $order.details.order_date]} + +
+ {if $order.details.reorder_url} + + {/if} +
+
+
+
+ + {l s='Order Reference %reference% - placed on %date%' d='Shop.Theme.Customeraccount' sprintf=['%reference%' => $order.details.reference, '%date%' => $order.details.order_date]} + +
+ {if $order.details.reorder_url} + + {/if} +
+
+
    +
  • {l s='Carrier' d='Shop.Theme.Checkout'} {$order.carrier.name}
  • +
  • {l s='Payment method' d='Shop.Theme.Checkout'} {$order.details.payment}
  • + + {if $order.details.invoice_url} +
  • + + {l s='Download your invoice as a PDF file.' d='Shop.Theme.Customeraccount'} + +
  • + {/if} + + {if $order.details.recyclable} +
  • + {l s='You have given permission to receive your order in recycled packaging.' d='Shop.Theme.Customeraccount'} +
  • + {/if} + + {if $order.details.gift_message} +
  • {l s='You have requested gift wrapping for this order.' d='Shop.Theme.Customeraccount'}
  • +
  • {l s='Message' d='Shop.Theme.Customeraccount'} {$order.details.gift_message nofilter}
  • + {/if} +
+
+
{/block} {block name='order_history'} -
-

{l s='Follow your order\'s status step-by-step' d='Shop.Theme.Customeraccount'}

- - - - - - - - - {foreach from=$order.history item=state} - - - - - {/foreach} - -
{l s='Date' d='Shop.Theme.Global'}{l s='Status' d='Shop.Theme.Global'}
{$state.history_date} - - {$state.ostate_name} - -
-
- {foreach from=$order.history item=state} -
-
{$state.history_date}
-
- - {$state.ostate_name} - -
-
- {/foreach} -
-
- {/block} +
+

{l s='Follow your order\'s status step-by-step' d='Shop.Theme.Customeraccount'}

+ + + + + + + + + {foreach from=$order.history item=state} + + + + + {/foreach} + + +
+ {foreach from=$order.history item=state} +
+
{($state.history_date)}
+
+ + {$state.ostate_name} + +
+
+ {/foreach} +
+
+ {/block} + + {if $order.follow_up} +
+

{l s='Click the following link to track the delivery of your order' d='Shop.Theme.Customeraccount'}

+ {$order.follow_up} +
+ {/if} - {if $order.follow_up} -
-

{l s='Click the following link to track the delivery of your order' d='Shop.Theme.Customeraccount'}

- {$order.follow_up} -
- {/if} + {block name='addresses'} +
+ {if $order.addresses.delivery} +
+
+

{l s='Delivery address %alias%' d='Shop.Theme.Checkout' sprintf=['%alias%' => $order.addresses.delivery.alias]}

+
{$order.addresses.delivery.formatted nofilter}
+
+
+ {/if} + +
+
+

{l s='Invoice address %alias%' d='Shop.Theme.Checkout' sprintf=['%alias%' => $order.addresses.invoice.alias]}

+
{$order.addresses.invoice.formatted nofilter}
+
+
+
+ {/block} - {block name='addresses'} -
- {if $order.addresses.delivery} -
-
-

{l s='Delivery address %alias%' d='Shop.Theme.Checkout' sprintf=['%alias%' => $order.addresses.delivery.alias]}

-
{$order.addresses.delivery.formatted nofilter}
-
-
- {/if} - -
-
-

{l s='Invoice address %alias%' d='Shop.Theme.Checkout' sprintf=['%alias%' => $order.addresses.invoice.alias]}

-
{$order.addresses.invoice.formatted nofilter}
-
-
-
-
- {/block} - - {$HOOK_DISPLAYORDERDETAIL nofilter} - - {block name='order_detail'} - {if $order.details.is_returnable} - {include file='customer/_partials/order-detail-return.tpl'} - {else} - {include file='customer/_partials/order-detail-no-return.tpl'} - {/if} - {/block} - - {block name='order_carriers'} - {if $order.shipping} -
- - - - - - - - - - - - {foreach from=$order.shipping item=line} - - - - - - - - {/foreach} - -
{l s='Date' d='Shop.Theme.Global'}{l s='Carrier' d='Shop.Theme.Checkout'}{l s='Weight' d='Shop.Theme.Checkout'}{l s='Shipping cost' d='Shop.Theme.Checkout'}{l s='Tracking number' d='Shop.Theme.Checkout'}
{$line.shipping_date}{$line.carrier_name}{$line.shipping_weight}{$line.shipping_cost}{$line.tracking nofilter}
-
- {foreach from=$order.shipping item=line} -
-
    -
  • - {l s='Date' d='Shop.Theme.Global'} {$line.shipping_date} -
  • -
  • - {l s='Carrier' d='Shop.Theme.Checkout'} {$line.carrier_name} -
  • -
  • - {l s='Weight' d='Shop.Theme.Checkout'} {$line.shipping_weight} -
  • -
  • - {l s='Shipping cost' d='Shop.Theme.Checkout'} {$line.shipping_cost} -
  • -
  • - {l s='Tracking number' d='Shop.Theme.Checkout'} {$line.tracking nofilter} -
  • -
-
- {/foreach} -
-
- {/if} - {/block} - - {block name='order_messages'} - {include file='customer/_partials/order-messages.tpl'} - {/block} -{/block} + {$HOOK_DISPLAYORDERDETAIL nofilter} + + {block name='order_detail'} + {if $order.details.is_returnable} + {include file='customer/_partials/order-detail-return.tpl'} + {else} + {include file='customer/_partials/order-detail-no-return.tpl'} + {/if} + {/block} + + {block name='order_carriers'} + {if $order.shipping} +
+ + + + + + + + + + + + {foreach from=$order.shipping item=line} + + + + + + + + {/foreach} + + +
+ {/if} + {/block} + + {/block}