Martin511 Posted February 25, 2023 Share Posted February 25, 2023 Hello. In PS 1.7 there was a way to hide links in the footer section by editing the my-account.tpl file like this: In Prestashop 8 this seems to have no effect any longer. Does anybody know which file to edit now? Link to comment Share on other sites More sharing options...
endriu107 Posted February 25, 2023 Share Posted February 25, 2023 You want disable it only on footer or you want disable credit slip in shop at all? Link to comment Share on other sites More sharing options...
Martin511 Posted February 25, 2023 Author Share Posted February 25, 2023 Both is possible because we don´t need it. Most important is to hide the links in the footer. Link to comment Share on other sites More sharing options...
endriu107 Posted February 25, 2023 Share Posted February 25, 2023 Go to Customer Service > Merchandise Returns and switch Enable returns to No. Link to comment Share on other sites More sharing options...
Martin511 Posted February 25, 2023 Author Share Posted February 25, 2023 This was already set to "No". The links remain. Additionally I have to hide the "Information" link also - so I will have to edit a file. But which file is it? Link to comment Share on other sites More sharing options...
NPO Posted February 25, 2023 Share Posted February 25, 2023 To remove the Credit Slips from the customer account edit: /themes/.../templates/customer/page.tpl comment out the block with {if !configuration.is_catalog}......... the l s=credit slips ....... For the footer there is a page_footer block (but I don't have that one so can't see it) Link to comment Share on other sites More sharing options...
Martin511 Posted February 25, 2023 Author Share Posted February 25, 2023 (edited) 11 minutes ago, NPO said: To remove the Credit Slips from the customer account edit: /themes/.../templates/customer/page.tpl comment out the block with {if !configuration.is_catalog}......... the l s=credit slips ....... For the footer there is a page_footer block (but I don't have that one so can't see it) Hi. This is the untouched content of the /templates/customer/page.tpl : There is nothing about credit slips... Is your page.tpl different? ( If you are also on PS 8 ) In PS 1.7 I commented out as described in my first post. This worked. After upgrading to PS 8 the hidden footer links are back... {** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License 3.0 (AFL-3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/AFL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <contact@prestashop.com> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) *} {extends file='page.tpl'} {block name='notifications'}{/block} {block name='page_content_container'} <section id="content" class="page-content"> {block name='page_content_top'} {block name='customer_notifications'} {include file='_partials/notifications.tpl'} {/block} {/block} {block name='page_content'} <!-- Page content --> {/block} </section> {/block} {block name='page_footer'} {block name='my_account_links'} {include file='customer/_partials/my-account-links.tpl'} {/block} {/block} Edited February 25, 2023 by Martin511 (see edit history) Link to comment Share on other sites More sharing options...
NPO Posted February 25, 2023 Share Posted February 25, 2023 If you are using PS 8 with classic that block should be in the my-account.tpl /themes/classic/templates/customer I have it on a clean install and several updates (without having made changes to the config). Link to comment Share on other sites More sharing options...
Martin511 Posted February 25, 2023 Author Share Posted February 25, 2023 (edited) 7 minutes ago, NPO said: If you are using PS 8 with classic that block should be in the my-account.tpl /themes/classic/templates/customer I have it on a clean install and several updates (without having made changes to the config). Yes, I can confirm this. But commenting out as described in my first post doesn´t have any effects in PS 8. Here is the content of my my-account.tpl : {** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License 3.0 (AFL-3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/AFL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <contact@prestashop.com> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) *} {extends file='customer/page.tpl'} {block name='page_title'} {l s='Your account' d='Shop.Theme.Customeraccount'} {/block} {block name='page_content'} <div class="row"> <div class="links"> {*COMMENT OUT INFORMATION FROM ACCOUNT AREA <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="identity-link" href="{$urls.pages.identity}"> <span class="link-item"> <i class="material-icons"></i> {l s='Information' d='Shop.Theme.Customeraccount'} </span> </a> END OF COMMENT *} {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} {if !$configuration.is_catalog} <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="history-link" href="{$urls.pages.history}"> <span class="link-item"> <i class="material-icons"></i> {l s='Order history and details' d='Shop.Theme.Customeraccount'} </span> </a> {/if} {*COMMENT OUT CREDIT SLIP FROM ACCOUNT AREA {if !$configuration.is_catalog} <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="order-slips-link" href="{$urls.pages.order_slip}"> <span class="link-item"> <i class="material-icons"></i> {l s='Credit slips' d='Shop.Theme.Customeraccount'} </span> </a> {/if} END OF COMMENT *} {if $configuration.voucher_enabled && !$configuration.is_catalog} <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="discounts-link" href="{$urls.pages.discount}"> <span class="link-item"> <i class="material-icons"></i> {l s='Vouchers' d='Shop.Theme.Customeraccount'} </span> </a> {/if} {if $configuration.return_enabled && !$configuration.is_catalog} <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="returns-link" href="{$urls.pages.order_follow}"> <span class="link-item"> <i class="material-icons"></i> {l s='Merchandise returns' d='Shop.Theme.Customeraccount'} </span> </a> {/if} {block name='display_customer_account'} {hook h='displayCustomerAccount'} {/block} </div> </div> {/block} {block name='page_footer'} {block name='my_account_links'} <div class="text-sm-center"> <a href="{$urls.actions.logout}" > {l s='Sign out' d='Shop.Theme.Actions'} </a> </div> {/block} {/block} Edited February 25, 2023 by Martin511 (see edit history) Link to comment Share on other sites More sharing options...
NPO Posted February 25, 2023 Share Posted February 25, 2023 I have PS 8 and it's working. Maybe other changes made somewhere else? custom theme? overrite somewhere by some module? Link to comment Share on other sites More sharing options...
Martin511 Posted February 25, 2023 Author Share Posted February 25, 2023 2 minutes ago, NPO said: I have PS 8 and it's working. Maybe other changes made somewhere else? custom theme? overrite somewhere by some module? Thank you very much! It is an important information for me, that commenting out works in your installation. So I will have to dig deeper. Thank you so far. Link to comment Share on other sites More sharing options...
NPO Posted February 25, 2023 Share Posted February 25, 2023 I found another one - referring to the footer /themes/..../modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl there is a ul class="account-list" for id=footer_account_links with the same credit link block Link to comment Share on other sites More sharing options...
Martin511 Posted February 25, 2023 Author Share Posted February 25, 2023 THAT´S IT! 😃 Thank you so very very much! How did you figure this out? I think this file has this additional content since PS 8. Link to comment Share on other sites More sharing options...
NPO Posted February 25, 2023 Share Posted February 25, 2023 You're welcome! I like looking for needles in haystacks 🧐 Link to comment Share on other sites More sharing options...
Martin511 Posted February 25, 2023 Author Share Posted February 25, 2023 THANK YOU! Link to comment Share on other sites More sharing options...
Frevab Posted October 25, 2023 Share Posted October 25, 2023 They way I usually find it by searching for the text I want to change and search for it using Notepad+ using tab Search in files. I back-up a copy to my local HD and apply the search to the file containing the PS files. Looking for a text or just for a color code to find out where I can change it. Works all the time. I found it that way in: translations\nl-NL\ShopThemeGlobal.nl-NL.xlf on line 525 <target state="final">%copyright% %year% - E-commerce-software van %prestashop%</target> (I am in NL so you have to check your language files). Link to comment Share on other sites More sharing options...
Prestag0od Posted December 20, 2023 Share Posted December 20, 2023 For me this edit works /modules/ps_customeraccountlinks/ps_customeraccountlinks.php This function public function getWidgetVariables($hookName = null, array $configuration = []) { $link = $this->context->link; $my_account_urls = [ 2 => [ 'title' => $this->trans('Orders', [], 'Admin.Global'), 'url' => $link->getPageLink('history', true), ], 3 => [ 'title' => $this->trans('Credit slips', [], 'Modules.Customeraccountlinks.Admin'), 'url' => $link->getPageLink('order-slip', true), ], 4 => [ 'title' => $this->trans('Addresses', [], 'Shop.Theme.Global'), 'url' => $link->getPageLink('addresses', true), ], 0 => [ 'title' => $this->trans('Personal info', [], 'Modules.Customeraccountlinks.Admin'), 'url' => $link->getPageLink('identity', true), ], ]; Change to this by removing the 3. Credit slips lines and change Addresses order number to 3. public function getWidgetVariables($hookName = null, array $configuration = []) { $link = $this->context->link; $my_account_urls = [ 2 => [ 'title' => $this->trans('Orders', [], 'Admin.Global'), 'url' => $link->getPageLink('history', true), ], 3 => [ 'title' => $this->trans('Addresses', [], 'Shop.Theme.Global'), 'url' => $link->getPageLink('addresses', true), ], 0 => [ 'title' => $this->trans('Personal info', [], 'Modules.Customeraccountlinks.Admin'), 'url' => $link->getPageLink('identity', true), ], ]; 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