Jump to content

[SOLVED]Removing Footer Links In v1.5.3.1


Recommended Posts

Hi all

 

I was wondering if someone might be able to assist me in removing the footer links in the default theme of PS 1.5.3.1

 

So far I have tried the "solutions" found in the following threads but so far i am struggling to find a solution which works for me:

 

http://www.prestasho...__1#entry777975

 

http://www.prestasho...lock-in-footer/

 

and also the one mentioned here at post #2 by tdr170 about modifying modules/blockcms/blockcms.tpl :

 

http://www.prestasho...ooter-cms-menu/

 

 

I have looked at the CMS Block Configuration and can see that there are no options available to remove the links i want gone as can be seen in the image below:

 

post-517136-0-39692100-1364200186_thumb.png

 

I have seen mentioned that within CMS Block Configuration there are meant to be left blocks and right blocks, however i can only see left blocks, again with no options for deleting what I want (have I possibly deleted something i shouldn't have here - ie:where is right blocks?)

 

post-517136-0-39692100-1364200186_thumb.png

 

Following is an image of the links in the footer which i would like to remove:

 

post-517136-0-70787200-1364200492_thumb.png

 

For future reference, I would also like to know that if a solution can be reached in this scenario, would the same procedure apply to removing links from other parts of the footer, for example removing the My addresses link under MY ACCOUNT section of the footer.

 

Appreciate any feedback.

post-517136-0-02660800-1364200422_thumb.png

Edited by GlennD (see edit history)
Link to comment
Share on other sites

the link you post here should be work for you.

have you try to edit your blockcms.tpl file?

go to your themes folder, open modules/blockcms/blockcms.tpl

 

give a mark code for remove the cms link you want.

 

example to remove special links:

<!--

{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if}

-->

 

 

 

  • Like 1
Link to comment
Share on other sites

.

have you try to edit your blockcms.tpl file?

 

example to remove special links:

<!--

{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if}

-->

 

Yes I have tried this and it is not working for me.

 

its blockfootercms.tpl you will want to edit, you can strip the code out by hand if you never need those links in the footer.

 

I have done a search of the prestashop directory and there is no such file.

 

Here is the footer code that currently resides in blockcms.tpl (back to un-edited):

 

{if $block == 1}

<!-- Block CMS module -->

{foreach from=$cms_titles key=cms_key item=cms_title}

<div id="informations_block_left_{$cms_key}" class="block informations_block_left">

<h4 class="title_block"><a href="{$cms_title.category_link}">{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</a></h4>

<ul class="block_content">

{foreach from=$cms_title.categories item=cms_page}

{if isset($cms_page.link)}<li class="bullet"><b style="margin-left:2em;">

<a href="{$cms_page.link}" title="{$cms_page.name|escape:html:'UTF-8'}">{$cms_page.name|escape:html:'UTF-8'}</a>

</b></li>{/if}

{/foreach}

{foreach from=$cms_title.cms item=cms_page}

{if isset($cms_page.link)}<li><a href="{$cms_page.link}" title="{$cms_page.meta_title|escape:html:'UTF-8'}">{$cms_page.meta_title|escape:html:'UTF-8'}</a></li>{/if}

{/foreach}

{if $cms_title.display_store}<li><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if}

</ul>

</div>

{/foreach}

<!-- /Block CMS module -->

{else}

<!-- MODULE Block footer -->

<div class="block_various_links" id="block_various_links_footer">

<h4 class="title_block">{l s='Information' mod='blockcms'}</h4>

<ul>

{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if}

<li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li>

{if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if}

{if $display_stores_footer}<li class="item"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if}

<li class="item"><a href="{$link->getPageLink($contact_url, true)}" title="{l s='Contact us' mod='blockcms'}">{l s='Contact us' mod='blockcms'}</a></li>

{foreach from=$cmslinks item=cmslink}

{if $cmslink.meta_title != ''}

<li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>

{/if}

{/foreach}

<li><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockcms'}">{l s='Sitemap' mod='blockcms'}</a></li>

{if $display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a target="_blank" href="http://www.prestashop.com">PrestaShop</a>™</li>{/if}

</ul>

{$footer_text}

</div>

<!-- /MODULE Block footer -->

{/if}

 

I have noted that when i open this file within Notepad++ that the file appears in ALL black text where as some other files I open have color - is this normal?

 

Any more suggestions anyone?

Edited by GlennD (see edit history)
Link to comment
Share on other sites

These links are parts of the Display various footer links in the configuration so they can not be added or removed one by one.

To remove the links you posted you will need to remove the code in red below, if you do not want to remove in case you want to add later just comment it out as suggested above - like this <!-- code is here -->

 

The upper part of this TPL file (blue) is for the right or left CMS column blocks so if you used either and wanted to remove links that were part of the display various footer links in the configuration the process would be the same.

 

Note: in 1.5 the blockcms.tpl file you need to edit is in themes/default/modules/ folder or /yourtheme/modules/

 

 

{if $block == 1}

<!-- Block CMS module -->

{foreach from=$cms_titles key=cms_key item=cms_title}

<div id="informations_block_left_{$cms_key}" class="block informations_block_left">

<h4 class="title_block"><a href="{$cms_title.category_link}">{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</a></h4>

<ul class="block_content">

{foreach from=$cms_title.categories item=cms_page}

{if isset($cms_page.link)}<li class="bullet"><b style="margin-left:2em;">

<a href="{$cms_page.link}" title="{$cms_page.name|escape:html:'UTF-8'}">{$cms_page.name|escape:html:'UTF-8'}</a>

</b></li>{/if}

{/foreach}

{foreach from=$cms_title.cms item=cms_page}

{if isset($cms_page.link)}<li><a href="{$cms_page.link}" title="{$cms_page.meta_title|escape:html:'UTF-8'}">{$cms_page.meta_title|escape:html:'UTF-8'}</a></li>{/if}

{/foreach}

{if $cms_title.display_store}<li><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if}

</ul>

</div>

{/foreach}

<!-- /Block CMS module -->

{else}

<!-- MODULE Block footer -->

<div class="block_various_links" id="block_various_links_footer">

<h4 class="title_block">{l s='Information' mod='blockcms'}</h4>

<ul>

{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if}

<li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li>

{if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if}

{if $display_stores_footer}<li class="item"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if}

<li class="item"><a href="{$link->getPageLink($contact_url, true)}" title="{l s='Contact us' mod='blockcms'}">{l s='Contact us' mod='blockcms'}</a></li>

{foreach from=$cmslinks item=cmslink}

{if $cmslink.meta_title != ''}

<li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>

{/if}

{/foreach}

<li><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockcms'}">{l s='Sitemap' mod='blockcms'}</a></li>

{if $display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a target="_blank" href="http://www.prestashop.com">PrestaShop</a>™</li>{/if}

</ul>

{$footer_text}

</div>

<!-- /MODULE Block footer -->

{/if}

Edited by tdr170 (see edit history)
  • Like 3
Link to comment
Share on other sites

tdr170 - I did the procedure again exactly as you said and this time it worked without issue.

 

I personally can't explain why because i am 99% sure I had tried the exact same file edit prior to doing it this morning after reading the above post (I am currently scratching my head).

 

I would only be guessing but this may have been a cache issue or something to do with the memory i have dedicated to my virtual machine (maybe it wasn't keeping up - who knows). After saying that it may have been a cache issue, I did ensure that Smarty cache was turned off with force recompile on.

 

I did however have the browser cache set to remember history (Firefox v19.0.2 for anyone interested) which I did clear at one stage to see if that was the problem. Yesterday there was no result after doing so, however I have had some strange anomalies with Firefox before where I have set it to "Never Remember History" and it seemed to me that it was in fact still remembering history even with that option selected. This was an issue for me mid 2012 in an earlier release of Firefox and maybe with the latest release the problem has returned.

 

In all honesty, I'm not trying to pass on the blame here - as with an aeroplane going down it is usually related to user error and in this case that would be me - luckily I'm not flying!

 

Just to clarify for anyone else who may visit this thread in future, here is what worked for me:

 

1) Ensure that browser cache is emptied

2) Ensure that Force Compile is turned on and Smarty cache is turned off in the back office

(Advanced Parameters tab -> Performance -> Smarty section -> Select Force Compile radio button -> x the cache radio button

3) Open blockcms.tpl file in suitable text editor such as Notepad or Notepad++

( themes -> theme name (in my case "default") -> modules -> blockcms -> blockcms.tpl

4) Edit the file (insert comment tags <!-- -->) as mentioned previously:

<!--{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if}

<li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li>

{if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if}-->

Note: for anyone not much into coding comments here are using a double hyphen.

ie: <!hyphenhyphen hyphenhyphen>

 

5) Where force compilation and cache were configured (Advanced Parameters -> Performance) click the Save button just to be on the safe side

 

Thanks tdr170 for explaining the edit of the file a little clearer - I still have a brief question if you have time:

 

Why is New Products not wrapped in an {if /if} statement like the rest of the link items appearing in this code?

Edited by GlennD (see edit history)
Link to comment
Share on other sites

Well that is a good question and one I never asked myself, this would be a good comment to make for future versions of Prestashop.

Would seem like a natural process as the New Products module does not show when no new products are present.

I am assuming that is what your thinking about.

I am currently testing 1.5.4 and will pass this on the Prestashop, but I do not have a good answer for you.

Link to comment
Share on other sites

  • 2 weeks later...

8.4.2013 [sOLVED]Removing Footer Links In v1.5.4

 

make changes /httpdocs/themes/default/modules/blockcms in blockcms.tpl

 

links you want to hide make those lines as a comment <!-- -->

 

<!--{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if}

<li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li>

{if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if} -->

 

 

upload the file refesh your FO page and enjoy!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...