X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding an external link to catagories menu (https://forum.x-cart.com/showthread.php?t=46234)

sjb1218 03-12-2009 04:31 PM

Re: Adding an external link to catagories menu
 
Quote:

Originally Posted by balinor
Make an embedded static page, that way the customer will always stay in the cart and won't lose any data they have saved.

You can edit customer/categories.tpl to add a hard link to the static page.


I need some assistance here. If I make an embedded static page it will show up in the help menu, correct? Assuming that is correct and that is not the option that I want, would I create a new category and then edit the template so that it will link to an external page?

balinor 03-12-2009 04:34 PM

Re: Adding an external link to catagories menu
 
Please be sure to look at the date of a thread you post in, that one was almost 4 years old :)

Yes, you can hard-code an external link in the help menu by editing help.tpl. If you create a new static page or category, those will automatically link to their respective pages, you can't change the link on them.

sjb1218 03-12-2009 04:43 PM

Re: Adding an external link to catagories menu
 
Quote:

Originally Posted by balinor
Please be sure to look at the date of a thread you post in, that one was almost 4 years old :)

Yes, you can hard-code an external link in the help menu by editing help.tpl. If you create a new static page or category, those will automatically link to their respective pages, you can't change the link on them.


Yes, I noticed that is was old, but it described exactly what I needed so I thought I'd use it. But I think I've confused myself anyway. LOL! Here's what I'm trying to accomplish - I want to add a new category and have it link to an external page. I specifically want it in the categories menu and not the help menu. Is that possible at all?

balinor 03-12-2009 04:45 PM

Re: Adding an external link to catagories menu
 
You can't do it by creating a new category, you need to hard-code a link in customer/categories.tpl.

<a href="http://www.yoursite.com" target="_blank">Link text</a>

sjb1218 03-12-2009 05:01 PM

Re: Adding an external link to catagories menu
 
Quote:

Originally Posted by balinor
You can't do it by creating a new category, you need to hard-code a link in customer/categories.tpl.

<a href="http://www.yoursite.com" target="_blank">Link text</a>


So I would add the code that you provided at the end of all the code that is already there, replacing "yoursite.com" with the appropriate URL? And how do I get the title of the category to show up, do I replace "Link text" with whatever I want the category to be called?

balinor 03-12-2009 05:36 PM

Re: Adding an external link to catagories menu
 
Correct

sjb1218 03-12-2009 05:44 PM

Re: Adding an external link to catagories menu
 
It worked...sort of...the link shows up between the 2 menus...here's the link: http://www.fcgbsupplies.com/ I want it in the category menu...can it be moved?

balinor 03-13-2009 02:23 AM

Re: Adding an external link to catagories menu
 
You need to move it IN the includes of the category template - meaning before this line of code:

{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}

marketing@kifaru.net 03-14-2009 11:07 AM

Re: Adding an external link to catagories menu
 
I need to do the same thing (create external links from categories), but keep getting a failure.

mine looks like this though:
{*
$Id: categories.tpl,v 1.33 2008/11/06 16:53:53 max Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{capture name=menu}
{if $active_modules.Fancy_Categories}
{include file="modules/Fancy_Categories/categories.tpl"}
{assign var="additional_class" value="menu-fancy-categories-list"}
{else}
<ul>
{foreach from=$categories_menu_list item=c}
<li><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category}</a></li>
{/foreach}
</ul>
{assign var="additional_class" value="menu-categories-list"}
{/if}
{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_categories content=$smarty.capture.menu}

where do I insert the above mentioned line? Thanks for any help - I'm pulling my hair out over this! Margaret


All times are GMT -8. The time now is 07:14 AM.

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