Page 1 of 1

Add contact us to top bar

Posted: Thu Oct 26, 2017 8:03 pm
by Kinggaz
Is it possible to add a link to my contact us page in the top bar of my site? I'm talking about the blue horizontal top bar in the default theme.

Thanks for any help

Re: Add contact us to top bar

Posted: Thu Oct 26, 2017 8:37 pm
by straightlight
Yes, that could be done with multiple ways; either with VQMod, OCMod, the override engine or with JS files.

Re: Add contact us to top bar

Posted: Thu Oct 26, 2017 8:52 pm
by kestas
Kinggaz wrote:
Thu Oct 26, 2017 8:03 pm
Is it possible to add a link to my contact us page in the top bar of my site? I'm talking about the blue horizontal top bar in the default theme.

Thanks for any help
Hi,
You can it to do with simply inserting in catalog/view/theme/default/template/common/menu.twig after line 25

Code: Select all

{% endfor %}
this string:

Code: Select all

<li><a href="{{ contact }}">{{ text_contact }}</a></li>
and of course you should edit relevant ones files in controller...
somewhere in file catalog/controller/common/menu.php
after the:

Code: Select all

$this->load->model('catalog/product');
add this:

Code: Select all

$data['contact'] = $this->url->link('information/contact');
after that do not forget clear cash of your shop

but of course it the best way to do this using vqmod or ocmod.

Re: Add contact us to top bar

Posted: Thu Oct 26, 2017 9:38 pm
by straightlight
The above would not be outputted since the controller has not been defined to use the contact key nor the contact text.

Re: Add contact us to top bar

Posted: Thu Oct 26, 2017 9:45 pm
by kestas
straightlight wrote:
Thu Oct 26, 2017 9:38 pm
The above would not be outputted since the controller has not been defined to use the contact key nor the contact text.
yes you are right :) when you typed this message in this time I have added string for the controller.
Sorry little bit late. ;)

Good luck

Re: Add contact us to top bar

Posted: Thu Oct 26, 2017 9:54 pm
by straightlight
The text definition step has not been mentioned to be set in the language definition file of information/contact,php. ;)