AlegroCart open source E-commerce
Web hosting by Host1Plus

How to add a new button to the header?

knowledge base and frequently asked questions

How to add a new button to the header?

Postby leo » Wed Jun 22, 2011 1:05 pm

So, if you would like to add a new button to the navigation bar in the header (where the other buttons are located) to have a link back to your home page or your forum, you have to edit some files.

1. open /catalog/language/english/extension/navigation.php and add e.g.
Code: Select all
$_['text_myhomepage'] = 'My Home Page';

below
Code: Select all
$_['text_checkout'] = 'Checkout';


2. open /catalog/template/default/module/navigation.tpl and add
Code: Select all
<a href="http://www.mysite.com"><?php echo $text_myhomepage; ?></a>

below
Code: Select all
<a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a>


3. open /catalog/extension/module/navigation.php and add
Code: Select all
$view->set('text_myhomepage', $language->get('text_myhomepage'));

below
Code: Select all
$view->set('text_checkout', $language->get('text_checkout'));


4. change the width of #bar in the default css files if needed.

Before:
new_button_before.png
new_button_before.png (8.87 KiB) Viewed 9111 times

After:
new_button_after.png
new_button_after.png (8.9 KiB) Viewed 9111 times
User avatar
leo
admin
 
Posts: 4117
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Return to FAQ / Layouts / Knowledge Base

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 2 guests

cron