Jump to content

[Solved] How to add button to top menu in prestashop_alt theme


Recommended Posts

Hi<br/><br/>I am using the prestashop_alt theme which has the blockcategoriestop menu bar.<br/><br/>I would like to add an About Us and a Contact Us button to the right side of the menu.<br/><br/>Could anyone advise on how I can do this please.<br/><br/>Thanks.

Link to comment
Share on other sites

Hello,
I am not familiar with the theme you mentioned but most of them still using majority of Prestashop module and theme structure. I hope you will find the short instruction below helpful.

If the menu is from the "categoriestop", then you need to edit the tpl file (categoriestop.tpl) and look for the menu structure which I believe start with the UL list tag. You can add another LI for the two button you want to add and then give it a link.

Example:

About Us
getPageLink('contact-form.php, true')}" title="{l s='Contact Us' mod='blockcms'}">{l s='Contact Us' mod='blockcms'}

Link to comment
Share on other sites

Hello,
I am not familiar with the theme you mentioned but most of them still using majority of Prestashop module and theme structure. I hope you will find the short instruction below helpful.

If the menu is from the "categoriestop", then you need to edit the tpl file (categoriestop.tpl) and look for the menu structure which I believe start with the UL list tag. You can add another LI for the two button you want to add and then give it a link.

Example:
About Us
getPageLink('contact-form.php, true')}" title="{l s='Contact Us' mod='blockcms'}">{l s='Contact Us' mod='blockcms'}



Many thanks nicetazmenia,

The first line of code did the trick for the About Us part. However, the second part for the Contact Us actually showed the code on the menu.
I duplicated the first part to get it to work.

 

   {foreach from=$blockcategoriestop_categories item=blockcategoriestop_category}


{$blockcategoriestop_category.name}


About Us
Contact Us
   {/foreach}

 



Now I just need to centre the text on the buttons an preferably have the About Us and the Contact us buttons over on the left side of the menu.


Any further advice on how to do this would be appreciated.

49057_GL6h5IcCz9pkGuRGn4NY_t

Link to comment
Share on other sites

  • 3 weeks later...

OK, so I finally solved the issue.

 

For those interested here's what I now have in the blockcategoriestop.tpl file

 

<div style="margin-top:8px">
<a href="{$base_dir}" class="v2-blockcategoryhome"> </a>
<ul class="v2-blockcategoriestop">
{foreach from=$blockcategoriestop_categories item=blockcategoriestop_category}
	<li>
		<a href="{$blockcategoriestop_category.link}">
			<span>{$blockcategoriestop_category.name}</span>
		</a>
	</li>


{/foreach}
	<li><a href="/prestashop/cms.php?id_cms=4"><span>About Us</span>
              </li>
</a>
                <li><a href="/prestashop/contact-form.php"><span>Contact Us</span>
               </li>
</a>
<ul>
<div class="flatclear"> </div>
</div>

 

I now have the two buttons I wanted and they are nicely centred on the menue like the category button.

  • Like 1
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...