forked from brooksbingham/theme-elegance
refactor: hide personal info step content if step is completed
parent
b0c137a7ea
commit
57225936e4
|
@ -1,70 +1,72 @@
|
||||||
{extends file='checkout/_partials/steps/checkout-step.tpl'}
|
{extends file='checkout/_partials/steps/checkout-step.tpl'}
|
||||||
|
|
||||||
{block name='step_content'}
|
{block name='step_content'}
|
||||||
{if $customer.is_logged && !$customer.is_guest}
|
{if !$step_is_complete}
|
||||||
<div class="flex flex-col">
|
{if $customer.is_logged && !$customer.is_guest}
|
||||||
<span class="identity">
|
<div class="flex flex-col">
|
||||||
{l s='Connected as [1]%firstname% %lastname%[/1].'
|
<span class="identity">
|
||||||
d='Shop.Theme.Customeraccount'
|
{l s='Connected as [1]%firstname% %lastname%[/1].'
|
||||||
sprintf=[
|
d='Shop.Theme.Customeraccount'
|
||||||
'[1]' => "<a href='{$urls.pages.identity}'>",
|
sprintf=[
|
||||||
'[/1]' => "</a>",
|
'[1]' => "<a href='{$urls.pages.identity}'>",
|
||||||
'%firstname%' => $customer.firstname,
|
'[/1]' => "</a>",
|
||||||
'%lastname%' => $customer.lastname
|
'%firstname%' => $customer.firstname,
|
||||||
]
|
'%lastname%' => $customer.lastname
|
||||||
}
|
]
|
||||||
</span>
|
}
|
||||||
<span>
|
</span>
|
||||||
{l
|
<span>
|
||||||
s='Not you? [1]Log out[/1]'
|
{l
|
||||||
d='Shop.Theme.Customeraccount'
|
s='Not you? [1]Log out[/1]'
|
||||||
sprintf=[
|
d='Shop.Theme.Customeraccount'
|
||||||
'[1]' => "<a href='{$urls.actions.logout}'>",
|
sprintf=[
|
||||||
'[/1]' => "</a>"
|
'[1]' => "<a href='{$urls.actions.logout}'>",
|
||||||
]
|
'[/1]' => "</a>"
|
||||||
}
|
]
|
||||||
</span>
|
}
|
||||||
</div>
|
</span>
|
||||||
{else}
|
</div>
|
||||||
<div class="flex w-full flex-col tabs">
|
{else}
|
||||||
<ul class="tabs-list flex w-full">
|
<div class="flex w-full flex-col tabs">
|
||||||
<li class="flex flex-1 p-4 items-center justify-center">
|
<ul class="tabs-list flex w-full">
|
||||||
<a
|
<li class="flex flex-1 p-4 items-center justify-center">
|
||||||
class="nav-link {if !$show_login_form}active{/if}"
|
<a
|
||||||
data-toggle="tab"
|
class="nav-link {if !$show_login_form}active{/if}"
|
||||||
href="#checkout-guest-form"
|
data-toggle="tab"
|
||||||
role="tab"
|
href="#checkout-guest-form"
|
||||||
aria-controls="checkout-guest-form"
|
role="tab"
|
||||||
{if !$show_login_form} aria-selected="true"{/if}
|
aria-controls="checkout-guest-form"
|
||||||
|
{if !$show_login_form} aria-selected="true"{/if}
|
||||||
|
>
|
||||||
|
{if $guest_allowed}
|
||||||
|
{l s='Order as a guest' d='Shop.Theme.Checkout'}
|
||||||
|
{else}
|
||||||
|
{l s='Create an account' d='Shop.Theme.Customeraccount'}
|
||||||
|
{/if}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="flex flex-1 p-4 items-center justify-center">
|
||||||
|
<a
|
||||||
|
class="nav-link {if $show_login_form}active{/if}"
|
||||||
|
data-link-action="show-login-form"
|
||||||
|
data-toggle="tab"
|
||||||
|
href="#checkout-login-form"
|
||||||
|
role="tab"
|
||||||
|
aria-controls="checkout-login-form"
|
||||||
|
{if $show_login_form} aria-selected="true"{/if}
|
||||||
>
|
>
|
||||||
{if $guest_allowed}
|
{l s='Sign in' d='Shop.Theme.Actions'}
|
||||||
{l s='Order as a guest' d='Shop.Theme.Checkout'}
|
</a>
|
||||||
{else}
|
</li>
|
||||||
{l s='Create an account' d='Shop.Theme.Customeraccount'}
|
</ul>
|
||||||
{/if}
|
<div id="checkout-guest-form" class="tabs-content w-full">
|
||||||
</a>
|
{render file='checkout/_partials/customer-form.tpl' ui=$register_form guest_allowed=$guest_allowed}
|
||||||
</li>
|
</div>
|
||||||
<li class="flex flex-1 p-4 items-center justify-center">
|
<div id="checkout-login-form" class="tabs-content w-full">
|
||||||
<a
|
{render file='checkout/_partials/login-form.tpl' ui=$login_form}
|
||||||
class="nav-link {if $show_login_form}active{/if}"
|
</div>
|
||||||
data-link-action="show-login-form"
|
|
||||||
data-toggle="tab"
|
|
||||||
href="#checkout-login-form"
|
|
||||||
role="tab"
|
|
||||||
aria-controls="checkout-login-form"
|
|
||||||
{if $show_login_form} aria-selected="true"{/if}
|
|
||||||
>
|
|
||||||
{l s='Sign in' d='Shop.Theme.Actions'}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div id="checkout-guest-form" class="tabs-content w-full">
|
|
||||||
{render file='checkout/_partials/customer-form.tpl' ui=$register_form guest_allowed=$guest_allowed}
|
|
||||||
</div>
|
</div>
|
||||||
<div id="checkout-login-form" class="tabs-content w-full">
|
{/if}
|
||||||
{render file='checkout/_partials/login-form.tpl' ui=$login_form}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue