bepot Posted February 7, 2018 Share Posted February 7, 2018 (edited) Hi all I want to show/hide a menu item in "My Account" depending if the customer has already completed an order/payment. By using themes/classic/templates/customer/my-account.tpl, you can show/hide menu items in "My Account". Those items are shown/hidden depending on the "if" statement, for example, the following (if $customer.addresses|count) statement checks that the customer has already entered an address: {if $customer.addresses|count} <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="addresses-link" href="{$urls.pages.addresses}"> <span class="link-item"> <i class="material-icons"></i> {l s='Addresses' d='Shop.Theme.Customeraccount'} </span> </a> {else} <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="address-link" href="{$urls.pages.address}"> <span class="link-item"> <i class="material-icons"></i> {l s='Add first address' d='Shop.Theme.Customeraccount'} </span> </a> {/if} So how to check in the same way if the customer has already completed an order/payment? I guess it is something like: if $customer.order|count but I am afraid customer.order doesn't work and I cannot figure out the solution. Thanks in advance Edited February 7, 2018 by bepot (see edit history) Link to comment Share on other sites More sharing options...
bepot Posted February 7, 2018 Author Share Posted February 7, 2018 See solution here: https://www.prestashop.com/forums/topic/663313-restrict-access-to-my-account-only-to-customers-who-made-a-purchase/#comment-2680891 I just tried to ask in a more clear way the same question this is why I created the other post. Thanks Victor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now