X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Adding "Contact Us" link to the top of the template (https://forum.x-cart.com/showthread.php?t=71850)

Mips 04-15-2015 09:59 AM

Adding "Contact Us" link to the top of the template
 
We would like to add 3 top links on the top of the template (to the left of "Sign In" and "Register". What module or class is responsible for this kind of change in X-Cart 5 please ?

Thanks,
Mips

Phil Richman 04-15-2015 01:32 PM

Re: Adding "Contact Us" link to the top of the template
 
If you just want to add 3 html links you should be able to add those to the /skins/default/en/layout/header.bar.tpl It may require a little css depending on how you might want to style them.

Mips 04-15-2015 01:40 PM

Re: Adding "Contact Us" link to the top of the template
 
Thank you.
Quote:

Originally Posted by Phil Richman
If you just want to add 3 html links you should be able to add those to the /skins/default/en/layout/header.bar.tpl It may require a little css depending on how you might want to style them.

So you would use css to style the links. But to actually add the links themselves, would you need to use html, or php ? A bit new at it here ...

Thanks,
Mips.

Phil Richman 04-15-2015 02:01 PM

Re: Adding "Contact Us" link to the top of the template
 
Quote:

Originally Posted by Mips
Thank you.

So you would use css to style the links. But to actually add the links themselves, would you need to use html, or php ? A bit new at it here ...

Thanks,
Mips.

In .tpl files you just use straight html. Something as simple as
<a href="contact_us.html">Contact Us</a> or you can make an ordered list out of the 3 links with something like

<ul class="new-top-links" >
<li>
<a href="contact_us.html">Contact Us</a>
</li>
<li>
<a href="link2.html">Link2</a>
</li> <li>
<a href="link3.html">Link3</a>
</li>
</ul>

Hopefully that makes sense. Just a quick example. If you have any problems just post again and I will try to help you further.

Phil Richman 04-15-2015 02:07 PM

Re: Adding "Contact Us" link to the top of the template
 
Quote:

Originally Posted by Phil Richman
In .tpl files you just use straight html. Something as simple as
<a href="contact_us.html">Contact Us</a> or you can make an ordered list out of the 3 links with something like

<ul class="new-top-links" >
<li>
<a href="contact_us.html">Contact Us</a>
</li>
<li>
<a href="link2.html">Link2</a>
</li> <li>
<a href="link3.html">Link3</a>
</li>
</ul>

Hopefully that makes sense. Just a quick example. If you have any problems just post again and I will try to help you further.

Sorry I just realized i misspoke. Rather than /skins/default/en/layout/header.bar.tpl you should make a copy of that file and move the copy to /skins/custom_skin/default/en/layout/header.bar.tpl

You will need to enable the custom skin mod. In xcart 5 you never make your changes to the original files, but always make a custom version of them. Otherwise you will lose them during updates. The update process replaces all stock xcart files which would throw out your custimizations. Sorry about that I didn't stop to think about you being new and possibly not knowing that. Let me know if that doesn't make sense.

Mips 04-16-2015 05:31 AM

Re: Adding "Contact Us" link to the top of the template
 
Good tip, I will try that.

Thank you.
Mips.


All times are GMT -8. The time now is 01:30 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.