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
3 changes: 1 addition & 2 deletions templates/catalog/_partials/customization-modal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
value=[
"id"=>$image_modal_id,
"title"=>$field.label,
"image_url"=>$field.image.large.url,
"back_id"=>$customization_modal_id
"image_url"=>$field.image.large.url
]
}
{/if}
Expand Down
8 changes: 1 addition & 7 deletions templates/customer/_partials/order-detail-no-return.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,7 @@
</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}
{$product.quantity}
</span>

<span class="grid-table__cell grid-table__cell--center" role="cell" data-ps-label="{l s='Unit price' d='Shop.Theme.Catalog'}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,7 @@
</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}
{$product.quantity}
</span>

<span class="grid-table__cell grid-table__cell--center" role="cell" data-ps-label="{l s='Unit price' d='Shop.Theme.Catalog'}">
Expand Down
73 changes: 21 additions & 52 deletions templates/customer/_partials/order-detail-product-line-return.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,16 @@
{block name='order_products_table_line_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" role="cell" data-ps-label="{l s='Select' d='Shop.Theme.Catalog'}">
{if !$product.customizations}
<input
class="form-check-input"
type="checkbox"
id="cb_{$product.id_order_detail}"
data-ps-ref="select-product"
name="ids_order_detail[{$product.id_order_detail}]"
value="{$product.id_order_detail}"
{if $product.qty_returned >= $product.quantity}disabled{/if}
aria-label="{$product.name}"
>
{else}
{foreach $product.customizations as $customization}
<input
class="form-check-input"
type="checkbox"
id="cb_{$product.id_order_detail}"
data-ps-ref="select-product"
name="customization_ids[{$product.id_order_detail}][]"
value="{$customization.id_customization}"
{if $product.qty_returned >= $product.quantity}disabled{/if}
aria-label="{$product.name}"
>
{/foreach}
{/if}
<input
class="form-check-input"
type="checkbox"
id="cb_{$product.id_order_detail}"
data-ps-ref="select-product"
name="ids_order_detail[{$product.id_order_detail}]"
value="{$product.id_order_detail}"
{if $product.qty_returned >= $product.quantity}disabled{/if}
aria-label="{$product.name}"
>
</span>

<span class="grid-table__cell order-product" role="cell" data-ps-label="{l s='Product' d='Shop.Theme.Catalog'}">
Expand Down Expand Up @@ -146,34 +131,18 @@

<span class="grid-table__cell grid-table__cell--center" role="cell" data-ps-label="{l s='Quantity' d='Shop.Theme.Catalog'}">
<span class="grid-table__cell-group grid-table__cell-group--sm grid-table__cell-group--inline">
{if !$product.customizations}
<span class="current">
<span class="visually-hidden">{l s='Available quantity to return:' d='Shop.Theme.Catalog'}</span>
{$product.quantity}
<span class="current">
<span class="visually-hidden">{l s='Available quantity to return:' d='Shop.Theme.Catalog'}</span>
{$product.quantity}
</span>
{if $product.quantity > $product.qty_returned}
<span class="select" id="order_return_qty_{$product.id_order_detail}">
<select name="order_qte_input[{$product.id_order_detail}]" class="form-select" aria-label="{l s='Select quantity to return' d='Shop.Theme.Catalog'}">
{section name=quantity start=1 loop=$product.quantity+1-$product.qty_returned}
<option value="{$smarty.section.quantity.index}">{$smarty.section.quantity.index}</option>
{/section}
</select>
</span>
{if $product.quantity > $product.qty_returned}
<span class="select" id="order_return_qty_{$product.id_order_detail}">
<select name="order_qte_input[{$product.id_order_detail}]" class="form-select" aria-label="{l s='Select quantity to return' d='Shop.Theme.Catalog'}">
{section name=quantity start=1 loop=$product.quantity+1-$product.qty_returned}
<option value="{$smarty.section.quantity.index}">{$smarty.section.quantity.index}</option>
{/section}
</select>
</span>
{/if}
{else}
{foreach $product.customizations as $customization}
<span class="current">
<span class="visually-hidden">{l s='Available quantity to return:' d='Shop.Theme.Catalog'}</span>
{$customization.quantity}
</span>
<span class="select" id="order_return_qty_{$product.id_order_detail}_{$customization.id_customization}">
<select name="customization_qty_input[{$customization.id_customization}]" class="form-select" aria-label="{l s='Select quantity to return' d='Shop.Theme.Catalog'}">
{section name=quantity start=1 loop=$customization.quantity+1}
<option value="{$smarty.section.quantity.index}">{$smarty.section.quantity.index}</option>
{/section}
</select>
</span>
{/foreach}
{/if}
</span>
</span>
Expand Down
73 changes: 21 additions & 52 deletions templates/customer/_partials/order-detail-return.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,16 @@
{foreach from=$order.products item=product name=products}
<div class="grid-table__row {if $smarty.foreach.products.last}rounded-bottom-0{/if}" role="row">
<span class="grid-table__cell" role="cell" data-ps-label="{l s='Select' d='Shop.Theme.Catalog'}">
{if !$product.customizations}
<input
class="form-check-input"
type="checkbox"
id="cb_{$product.id_order_detail}"
data-ps-ref="select-product"
name="ids_order_detail[{$product.id_order_detail}]"
value="{$product.id_order_detail}"
{if $product.qty_returned >= $product.quantity}disabled{/if}
aria-label="{$product.name}"
>
{else}
{foreach $product.customizations as $customization}
<input
class="form-check-input"
type="checkbox"
id="cb_{$product.id_order_detail}"
data-ps-ref="select-product"
name="customization_ids[{$product.id_order_detail}][]"
value="{$customization.id_customization}"
{if $product.qty_returned >= $product.quantity}disabled{/if}
aria-label="{$product.name}"
>
{/foreach}
{/if}
<input
class="form-check-input"
type="checkbox"
id="cb_{$product.id_order_detail}"
data-ps-ref="select-product"
name="ids_order_detail[{$product.id_order_detail}]"
value="{$product.id_order_detail}"
{if $product.qty_returned >= $product.quantity}disabled{/if}
aria-label="{$product.name}"
>
</span>

<span class="grid-table__cell order-product" role="cell" data-ps-label="{l s='Product' d='Shop.Theme.Catalog'}">
Expand Down Expand Up @@ -149,34 +134,18 @@

<span class="grid-table__cell grid-table__cell--center" role="cell" data-ps-label="{l s='Quantity' d='Shop.Theme.Catalog'}">
<span class="grid-table__cell-group grid-table__cell-group--sm grid-table__cell-group--inline">
{if !$product.customizations}
<span class="current">
<span class="visually-hidden">{l s='Available quantity to return:' d='Shop.Theme.Catalog'}</span>
{$product.quantity}
<span class="current">
<span class="visually-hidden">{l s='Available quantity to return:' d='Shop.Theme.Catalog'}</span>
{$product.quantity}
</span>
{if $product.quantity > $product.qty_returned}
<span class="select" id="_desktop_return_qty_{$product.id_order_detail}">
<select name="order_qte_input[{$product.id_order_detail}]" class="form-select" aria-label="{l s='Select quantity to return' d='Shop.Theme.Catalog'}">
{section name=quantity start=1 loop=$product.quantity+1-$product.qty_returned}
<option value="{$smarty.section.quantity.index}">{$smarty.section.quantity.index}</option>
{/section}
</select>
</span>
{if $product.quantity > $product.qty_returned}
<span class="select" id="_desktop_return_qty_{$product.id_order_detail}">
<select name="order_qte_input[{$product.id_order_detail}]" class="form-select" aria-label="{l s='Select quantity to return' d='Shop.Theme.Catalog'}">
{section name=quantity start=1 loop=$product.quantity+1-$product.qty_returned}
<option value="{$smarty.section.quantity.index}">{$smarty.section.quantity.index}</option>
{/section}
</select>
</span>
{/if}
{else}
{foreach $product.customizations as $customization}
<span class="current">
<span class="visually-hidden">{l s='Available quantity to return:' d='Shop.Theme.Catalog'}</span>
{$customization.quantity}
</span>
<span class="select" id="_desktop_return_qty_{$product.id_order_detail}_{$customization.id_customization}">
<select name="customization_qty_input[{$customization.id_customization}]" class="form-select" aria-label="{l s='Select quantity to return' d='Shop.Theme.Catalog'}">
{section name=quantity start=1 loop=$customization.quantity+1}
<option value="{$smarty.section.quantity.index}">{$smarty.section.quantity.index}</option>
{/section}
</select>
</span>
{/foreach}
{/if}
</span>
</span>
Expand Down