Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Breadcrumbs on my acount pages at front office #776

Merged
merged 3 commits into from
Jan 8, 2024
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
2 changes: 2 additions & 0 deletions controllers/front/AddressController.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ protected function processSubmitAddress()
*/
public function initContent()
{
$this->show_breadcrump = true;

parent::initContent();

$this->assignCountries();
Expand Down
2 changes: 2 additions & 0 deletions controllers/front/DiscountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class DiscountControllerCore extends FrontController
*/
public function initContent()
{
$this->show_breadcrump = true;

parent::initContent();

$cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false, true);
Expand Down
2 changes: 2 additions & 0 deletions controllers/front/HistoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function setMedia()
*/
public function initContent()
{
$this->show_breadcrump = true;

parent::initContent();
if ($orders = Order::getCustomerOrders($this->context->customer->id)) {
foreach ($orders as &$order) {
Expand Down
2 changes: 2 additions & 0 deletions controllers/front/IdentityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public function postProcess()
*/
public function initContent()
{
$this->show_breadcrump = true;

parent::initContent();

if ($this->customer->birthday) {
Expand Down
3 changes: 2 additions & 1 deletion controllers/front/OrderFollowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ class OrderFollowControllerCore extends FrontController
*/
public function initContent()
{
parent::initContent();
$this->show_breadcrump = true;

parent::initContent();
if (isset($this->context->customer->id) && $this->context->customer->id) {
$ordersReturns = OrderReturn::getOrdersReturn($this->context->customer->id, Tools::getValue('id_order'));
$this->context->smarty->assign('ordersReturns', $ordersReturns);
Expand Down
2 changes: 2 additions & 0 deletions controllers/front/OrderSlipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function setMedia()
*/
public function initContent()
{
$this->show_breadcrump = true;

parent::initContent();

$this->context->smarty->assign('ordersSlip', OrderSlip::getOrdersSlip((int)$this->context->cookie->id_customer));
Expand Down
16 changes: 13 additions & 3 deletions themes/hotel-reservation-theme/address.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,24 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{capture name=path}{l s='Your address'}{/capture}
{capture name=path}
<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
{l s='My account'}
</a>
<span class="navigation-pipe">
{$navigationPipe}
</span>
<span class="navigation_page">
{l s='Address'}
</span>
{/capture}
{if isset($smarty.get.updated) && $smarty.get.updated}
<p class="alert alert-success">
{l s='Your address has been successfully updated.'}
</p>
{/if}
<div class="box">
<h1 class="page-subheading">{l s='Your address'}</h1>
<h1 class="page-subheading">{l s='Address'}</h1>
<p class="info-title">
{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}
{l s='Modify address'}
Expand Down Expand Up @@ -215,7 +225,7 @@
<ul class="footer_links clearfix">
<li>
<a class="btn btn-defaul button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
<span><i class="icon-chevron-left"></i> {l s='Back to your account'}</span>
<span><i class="icon-chevron-left"></i> {l s='Back to My account'}</span>
</a>
</li>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions themes/hotel-reservation-theme/discount.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{capture name=path}<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">{l s='My account'}</a><span class="navigation-pipe">{$navigationPipe}</span><span class="navigation_page">{l s='My vouchers'}</span>{/capture}
{capture name=path}<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">{l s='My account'}</a><span class="navigation-pipe">{$navigationPipe}</span><span class="navigation_page">{l s='Vouchers'}</span>{/capture}

<h1 class="page-heading">
{l s='My vouchers'}
{l s='Vouchers'}
</h1>

{if isset($cart_rules) && $nb_cart_rules}
Expand Down Expand Up @@ -98,7 +98,7 @@
<li>
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
<span>
<i class="icon-chevron-left"></i> {l s='Back to your account'}
<i class="icon-chevron-left"></i> {l s='Back to My account'}
</span>
</a>
</li>
Expand Down
6 changes: 3 additions & 3 deletions themes/hotel-reservation-theme/history.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
{l s='My account'}
</a>
<span class="navigation-pipe">{$navigationPipe}</span>
<span class="navigation_page">{l s='Order history'}</span>
<span class="navigation_page">{l s='Bookings'}</span>
{/capture}
{include file="$tpl_dir./errors.tpl"}
<h1 class="page-heading bottom-indent">{l s='Order history'}</h1>
<h1 class="page-heading bottom-indent">{l s='Bookings'}</h1>
<p class="info-title">{l s='Here are the orders you\'ve placed since your account was created.'}</p>
{if $slowValidation}
<p class="alert alert-warning">{l s='If you have just placed an order, it may take a few minutes for it to be validated. Please refresh this page if your order is missing.'}</p>
Expand Down Expand Up @@ -127,7 +127,7 @@
<li>
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
<span>
<i class="icon-chevron-left"></i> {l s='Back to Your Account'}
<i class="icon-chevron-left"></i> {l s='Back to My account'}
</span>
</a>
</li>
Expand Down
6 changes: 3 additions & 3 deletions themes/hotel-reservation-theme/identity.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
{$navigationPipe}
</span>
<span class="navigation_page">
{l s='Your personal information'}
{l s='Personal information'}
</span>
{/capture}
<div class="box">
<h1 class="page-subheading">
{l s='Your personal information'}
{l s='Personal information'}
</h1>

{include file="$tpl_dir./errors.tpl"}
Expand Down Expand Up @@ -206,7 +206,7 @@
<li>
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)}">
<span>
<i class="icon-chevron-left"></i>{l s='Back to your account'}
<i class="icon-chevron-left"></i>{l s='Back to My account'}
</span>
</a>
</li>
Expand Down
12 changes: 6 additions & 6 deletions themes/hotel-reservation-theme/my-account.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@
<div class="row addresses-lists">
<div class="col-xs-12 col-sm-6 col-lg-4">
<ul class="myaccount-link-list">
<li><a href="{$link->getPageLink('address', true)|escape:'html':'UTF-8'}" title="{l s='My address'}"><i class="icon-building"></i><span>{l s='My address'}</span></a></li>
<li><a href="{$link->getPageLink('history', true)|escape:'html':'UTF-8'}" title="{l s='Orders'}"><i class="icon-list-ol"></i><span>{l s='Order history and details'}</span></a></li>
<li><a href="{$link->getPageLink('address', true)|escape:'html':'UTF-8'}" title="{l s='Address'}"><i class="icon-building"></i><span>{l s='Address'}</span></a></li>
<li><a href="{$link->getPageLink('history', true)|escape:'html':'UTF-8'}" title="{l s='Bookings'}"><i class="icon-list-ol"></i><span>{l s='Bookings'}</span></a></li>
{if $refundAllowed}
<li><a href="{$link->getPageLink('order-follow', true)|escape:'html':'UTF-8'}" title="{l s='Booking Refund Requests'}"><i class="icon-refresh"></i><span>{l s='Booking Refund Requests'}</span></a></li>
<li><a href="{$link->getPageLink('order-follow', true)|escape:'html':'UTF-8'}" title="{l s='Booking refund requests'}"><i class="icon-refresh"></i><span>{l s='Booking refund requests'}</span></a></li>
{/if}
<li><a href="{$link->getPageLink('order-slip', true)|escape:'html':'UTF-8'}" title="{l s='Credit slips'}"><i class="icon-file-o"></i><span>{l s='My credit slips'}</span></a></li>
<li><a href="{$link->getPageLink('identity', true)|escape:'html':'UTF-8'}" title="{l s='Information'}"><i class="icon-user"></i><span>{l s='My personal information'}</span></a></li>
<li><a href="{$link->getPageLink('order-slip', true)|escape:'html':'UTF-8'}" title="{l s='Credit slips'}"><i class="icon-file-o"></i><span>{l s='Credit slips'}</span></a></li>
<li><a href="{$link->getPageLink('identity', true)|escape:'html':'UTF-8'}" title="{l s='Personal information'}"><i class="icon-user"></i><span>{l s='Personal information'}</span></a></li>
</ul>
</div>
{if $voucherAllowed || isset($HOOK_CUSTOMER_ACCOUNT) && $HOOK_CUSTOMER_ACCOUNT !=''}
<div class="col-xs-12 col-sm-6 col-lg-4">
<ul class="myaccount-link-list">
{if $voucherAllowed}
<li><a href="{$link->getPageLink('discount', true)|escape:'html':'UTF-8'}" title="{l s='Vouchers'}"><i class="icon-barcode"></i><span>{l s='My vouchers'}</span></a></li>
<li><a href="{$link->getPageLink('discount', true)|escape:'html':'UTF-8'}" title="{l s='Vouchers'}"><i class="icon-barcode"></i><span>{l s='Vouchers'}</span></a></li>
{/if}
{$HOOK_CUSTOMER_ACCOUNT}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions themes/hotel-reservation-theme/order-follow.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{$navigationPipe}
</span>
<span class="navigation_page">
{l s='Booking Refund Requests'}
{l s='Booking refund requests'}
</span>
{/capture}

Expand Down Expand Up @@ -86,6 +86,6 @@
</div>

<ul class="footer_links clearfix">
<li><a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"><span><i class="icon-chevron-left"></i> {l s='Back to your account'}</span></a></li>
<li><a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"><span><i class="icon-chevron-left"></i> {l s='Back to My account'}</span></a></li>
<li><a class="btn btn-default button button-small" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}"><span><i class="icon-chevron-left"></i> {l s='Home'}</span></a></li>
</ul>
2 changes: 1 addition & 1 deletion themes/hotel-reservation-theme/order-slip.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<li>
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
<span>
<i class="icon-chevron-left"></i> {l s='Back to your account'}
<i class="icon-chevron-left"></i> {l s='Back to My account'}
</span>
</a>
</li>
Expand Down