From b0c137a7eab679b758fa9ededdae6da84de5b6c7 Mon Sep 17 00:00:00 2001 From: abhisheks Date: Wed, 6 Dec 2023 17:37:00 +0530 Subject: [PATCH 1/7] refactor: make focus ring transparent for all radio buttons --- _dev/elegance.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_dev/elegance.css b/_dev/elegance.css index d200eec..ea22670 100644 --- a/_dev/elegance.css +++ b/_dev/elegance.css @@ -32,3 +32,6 @@ a:hover .ti, a:hover .icon-tabler { ul { @apply !list-inside; } +input[type="radio"],input[type="checkbox"] { + @apply focus:ring-transparent; +} From 57225936e4af797b33b77a0d6756b78c7f44541a Mon Sep 17 00:00:00 2001 From: abhisheks Date: Wed, 6 Dec 2023 17:37:27 +0530 Subject: [PATCH 2/7] refactor: hide personal info step content if step is completed --- .../_partials/steps/personal-information.tpl | 126 +++++++++--------- 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/templates/checkout/_partials/steps/personal-information.tpl b/templates/checkout/_partials/steps/personal-information.tpl index d38ce1d..c1656e9 100644 --- a/templates/checkout/_partials/steps/personal-information.tpl +++ b/templates/checkout/_partials/steps/personal-information.tpl @@ -1,70 +1,72 @@ {extends file='checkout/_partials/steps/checkout-step.tpl'} {block name='step_content'} - {if $customer.is_logged && !$customer.is_guest} -
- - {l s='Connected as [1]%firstname% %lastname%[/1].' - d='Shop.Theme.Customeraccount' - sprintf=[ - '[1]' => "", - '[/1]' => "", - '%firstname%' => $customer.firstname, - '%lastname%' => $customer.lastname - ] - } - - - {l - s='Not you? [1]Log out[/1]' - d='Shop.Theme.Customeraccount' - sprintf=[ - '[1]' => "", - '[/1]' => "" - ] - } - -
- {else} -
-
+ {else} +
+ -
- {render file='checkout/_partials/customer-form.tpl' ui=$register_form guest_allowed=$guest_allowed} + {l s='Sign in' d='Shop.Theme.Actions'} + + + +
+ {render file='checkout/_partials/customer-form.tpl' ui=$register_form guest_allowed=$guest_allowed} +
+
+ {render file='checkout/_partials/login-form.tpl' ui=$login_form} +
-
- {render file='checkout/_partials/login-form.tpl' ui=$login_form} -
-
+ {/if} {/if} {/block} From 062e5a46d315255ea9ee6e6bdaf880a0e0607485 Mon Sep 17 00:00:00 2001 From: abhisheks Date: Wed, 6 Dec 2023 17:37:42 +0530 Subject: [PATCH 3/7] refactor: udpate Address checkout step styles --- templates/checkout/_partials/address-form.tpl | 17 +++--- .../_partials/address-selector-block.tpl | 51 ++++++++-------- .../checkout/_partials/steps/addresses.tpl | 60 ++++++++++--------- templates/customer/_partials/address-form.tpl | 2 +- 4 files changed, 69 insertions(+), 61 deletions(-) diff --git a/templates/checkout/_partials/address-form.tpl b/templates/checkout/_partials/address-form.tpl index 435d5f4..f09387e 100644 --- a/templates/checkout/_partials/address-form.tpl +++ b/templates/checkout/_partials/address-form.tpl @@ -14,16 +14,17 @@ action="{url entity='order' params=['id_address' => $id_address]}" data-id-address="{$id_address}" data-refresh-url="{url entity='order' params=['ajax' => 1, 'action' => 'addressForm']}" + class="w-full flex" > {/block} {block name='form_fields' append} {if $type === "delivery"} -
-
+
+
- +
{/if} @@ -31,15 +32,15 @@ {block name='form_buttons'} {if !$form_has_continue_button} - - {l s='Cancel' d='Shop.Theme.Actions'} + + {l s='Cancel' d='Shop.Theme.Actions'} {else} -
- {if $customer.addresses|count > 0} - {l s='Cancel' d='Shop.Theme.Actions'} + {l s='Cancel' d='Shop.Theme.Actions'} {/if}
{/if} diff --git a/templates/checkout/_partials/address-selector-block.tpl b/templates/checkout/_partials/address-selector-block.tpl index d46347e..4a5dd75 100644 --- a/templates/checkout/_partials/address-selector-block.tpl +++ b/templates/checkout/_partials/address-selector-block.tpl @@ -24,11 +24,11 @@ *} {block name='address_selector_blocks'} {foreach $addresses as $address} -
-
+
-
-
-
+
+ {$address.alias} +
{$address.formatted nofilter}
+
+
{if $interactive} - - {l s='Edit' d='Shop.Theme.Actions'} - - - {l s='Delete' d='Shop.Theme.Actions'} - + {/if} - - +
{/foreach} {if $interactive}

- +

{/if} {/block} diff --git a/templates/checkout/_partials/steps/addresses.tpl b/templates/checkout/_partials/steps/addresses.tpl index a095b13..5699d15 100644 --- a/templates/checkout/_partials/steps/addresses.tpl +++ b/templates/checkout/_partials/steps/addresses.tpl @@ -26,25 +26,27 @@ {block name='step_content'} {if !$step_is_complete} -
+
+
{if !$use_same_address} -

{l s='Shipping Address' d='Shop.Theme.Checkout'}

+

{l s='Shipping Address' d='Shop.Theme.Checkout'}

{/if} {if $use_same_address && !$cart.is_virtual} -

+ {l s='The selected address will be used both as your personal address (for invoice) and as your delivery address.' d='Shop.Theme.Checkout'} -

+ {elseif $use_same_address && $cart.is_virtual} -

+ {l s='The selected address will be used as your personal address (for invoice).' d='Shop.Theme.Checkout'} -

+ {/if} {if $show_delivery_address_form} @@ -57,7 +59,7 @@ }
{elseif $customer.addresses|count > 0} -
+
{include file = 'checkout/_partials/address-selector-block.tpl' addresses = $customer.addresses name = "id_address_delivery" @@ -73,24 +75,24 @@ {/if} -

- {l s='add new address' d='Shop.Theme.Actions'} -

- - {if $use_same_address && !$cart.is_virtual} -

- +

{/if} - +
{if !$use_same_address} - -

{l s='Your Invoice Address' d='Shop.Theme.Checkout'}

- +
+
+

{l s='Your Invoice Address' d='Shop.Theme.Checkout'}

{if $show_invoice_address_form}
{render file = 'checkout/_partials/address-form.tpl' @@ -101,7 +103,7 @@ }
{else} -
+
{include file = 'checkout/_partials/address-selector-block.tpl' addresses = $customer.addresses name = "id_address_invoice" @@ -117,16 +119,20 @@ {/if} -

- {l s='add new address' d='Shop.Theme.Actions'} -

+ +
{/if} {/if} {if !$form_has_continue_button} -
- diff --git a/templates/customer/_partials/address-form.tpl b/templates/customer/_partials/address-form.tpl index 3f30e0f..e43ddc5 100644 --- a/templates/customer/_partials/address-form.tpl +++ b/templates/customer/_partials/address-form.tpl @@ -48,7 +48,7 @@ {/block} {block name="address_form_footer"} -
+
{block name='form_buttons'} - -
- -
-
-
{$product.price}
-
{$product.quantity}
-
{$product.total}
-
+ {/foreach} + {/if} + {hook h='displayProductPriceBlock' product=$product type="unit_price"} +
+
{$product.price}
+
{$product.quantity}
+
{$product.total}
{/foreach}
+
+
+
+ {foreach $subtotals as $subtotal} + {if $subtotal.type !== 'tax' && $subtotal.label !== null} + {$subtotal.label} + {/if} + {/foreach} + {if $subtotals.tax.label !== null} + {l s='%label%:' sprintf=['%label%' => $subtotals.tax.label] d='Shop.Theme.Global'} + {/if} - - {foreach $subtotals as $subtotal} - {if $subtotal.type !== 'tax' && $subtotal.label !== null} - - - - - {/if} - {/foreach} - - {if !$configuration.display_prices_tax_incl && $configuration.taxes_enabled} - - - - - - - - - {else} - - - - - {/if} - {if $subtotals.tax.label !== null} - - - - {/if} -
{$subtotal.label}{if 'discount' == $subtotal.type}- {/if}{$subtotal.value}
{$totals.total.label} {$labels.tax_short}{$totals.total.value}
{$totals.total_including_tax.label}{$totals.total_including_tax.value}
{$totals.total.label} {if $configuration.taxes_enabled}{$labels.tax_short}{/if}{$totals.total.value}
{l s='%label%:' sprintf=['%label%' => $subtotals.tax.label] d='Shop.Theme.Global'} {$subtotals.tax.value}
+ {if !$configuration.display_prices_tax_incl && $configuration.taxes_enabled} + {$totals.total.label} {$labels.tax_short} + {/if} +
+
+ {foreach $subtotals as $subtotal} + {if $subtotal.type !== 'tax' && $subtotal.label !== null} + {if 'discount' == $subtotal.type}- {/if}{$subtotal.value} + {/if} + {/foreach} + {if $subtotals.tax.label !== null} + {$subtotals.tax.value} + {/if} + {if !$configuration.display_prices_tax_incl && $configuration.taxes_enabled} + {$totals.total.value} + {/if} +
+
+
+ {if !$configuration.display_prices_tax_incl && $configuration.taxes_enabled} + + {$totals.total_including_tax.label} + + {else} + {$totals.total.label} {if $configuration.taxes_enabled}{$labels.tax_short}{/if} + {/if} + {if !$configuration.display_prices_tax_incl && $configuration.taxes_enabled} + {$totals.total_including_tax.value} + {else} + {$totals.total.value} + {/if} +
+
+
+
{/block} -
diff --git a/templates/checkout/order-confirmation.tpl b/templates/checkout/order-confirmation.tpl index d73a970..22a4af6 100644 --- a/templates/checkout/order-confirmation.tpl +++ b/templates/checkout/order-confirmation.tpl @@ -1,18 +1,19 @@ {extends file='page.tpl'} {block name='page_content_container' prepend} -
-
-
-
+
+
+
+
{block name='order_confirmation_header'} -

- {l s='Your order is confirmed' d='Shop.Theme.Checkout'} -

+
+ + {l s='Your order is confirmed.' d='Shop.Theme.Checkout'} +
{/block} -

+ {l s='An email has been sent to your mail address %email%.' d='Shop.Theme.Checkout' sprintf=['%email%' => $customer.email]} {if $order.details.invoice_url} {* [1][/1] is for a HTML tag. *} @@ -25,7 +26,7 @@ ] } {/if} -

+ {block name='hook_order_confirmation'} {$HOOK_ORDER_CONFIRMATION nofilter} @@ -38,10 +39,8 @@ {/block} {block name='page_content_container'} -
-
-
- +
+
{block name='order_confirmation_table'} {include file='checkout/_partials/order-confirmation-table.tpl' @@ -54,23 +53,24 @@ {/block} {block name='order_details'} -
-

{l s='Order details' d='Shop.Theme.Checkout'}:

-
    -
  • {l s='Order reference: %reference%' d='Shop.Theme.Checkout' sprintf=['%reference%' => $order.details.reference]}
  • -
  • {l s='Payment method: %method%' d='Shop.Theme.Checkout' sprintf=['%method%' => $order.details.payment]}
  • - {if !$order.details.is_virtual} -
  • - {l s='Shipping method: %method%' d='Shop.Theme.Checkout' sprintf=['%method%' => $order.carrier.name]}
    - {$order.carrier.delay} -
  • - {/if} -
+
+

{l s='Order details' d='Shop.Theme.Checkout'}:

+
+
+ Order reference: + Payment method: + Shipping method: +
+
+ {$order.details.reference} + {$order.details.payment} + {$order.carrier.name} +
+
{/block}
-
{block name='hook_payment_return'} @@ -79,7 +79,6 @@
- {$HOOK_PAYMENT_RETURN nofilter}
@@ -103,7 +102,7 @@ {/block} {block name='hook_order_confirmation_2'} -