Post by Kinggaz » 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

Newbie

Posts

Joined
Tue Oct 17, 2017 2:22 am

Post by straightlight » Thu Oct 26, 2017 8:37 pm

Yes, that could be done with multiple ways; either with VQMod, OCMod, the override engine or with JS files.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by kestas » Thu Oct 26, 2017 8:52 pm

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.
Last edited by kestas on Thu Oct 26, 2017 9:40 pm, edited 1 time in total.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by straightlight » 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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by kestas » Thu Oct 26, 2017 9:45 pm

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

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by straightlight » Thu Oct 26, 2017 9:54 pm

The text definition step has not been mentioned to be set in the language definition file of information/contact,php. ;)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 40 guests