X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Adding Address Book to My Account Drop Down (https://forum.x-cart.com/showthread.php?t=78110)

Dawn Howard 01-07-2021 10:32 AM

Adding Address Book to My Account Drop Down
 
1 Attachment(s)
The drop down list called "My Account" on the main screen when a customer is logged in, can I add a link to the address book to that drop down list? See screen shot

cflsystems 01-07-2021 10:41 AM

Re: Adding Address Book to My Account Drop Down
 
You can. Custom module or the easiest method (maybe not so good though) is to use the template editor and modify one of the templates there.
Use the template editor and modify
Quote:

customer/layout/header/header.bar.links.logged.account.twig
and add to it


Code:

<li class="account-link-profile">
  <a href="{{ url('address_book', '') }}" class="profile icon-my-account-profile">
      <span>{{ t('Address Book') }}</span>
  </a>
</li>


Dawn Howard 01-15-2021 08:24 AM

Re: Adding Address Book to My Account Drop Down
 
Thanks, sounds simple enough but before I add that bit of code, I want to make sure. This is the code for that twig:

Quote:

{% if this.isLogged() and not this.isCheckoutLayout() %}
<div class="dropdown header_bar-my_account">
<a data-toggle="dropdown" data-target="#">{{ t('My account') }}</a>
<ul class="account-links dropdown-menu">
{{ widget_list('layout.header.bar.links.logged') }}
</ul>
</div>
{% endif %}

I don't see the other drop down items listed here. Where does that code code exactly?

Thanks in Advance! ♥

cflsystems 01-15-2021 03:23 PM

Re: Adding Address Book to My Account Drop Down
 
You are looking at the wrong template. You need the one referred to (in the one you posted) as


{{ widget_list('layout.header.bar.links.logged') }}


Use the template editor to find the correct template


All times are GMT -8. The time now is 02:15 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.