Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Changing the categories.tpl categories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-17-2009, 06:33 AM
 
Darntoothysam.com Darntoothysam.com is offline
 

Member
  
Join Date: Mar 2009
Posts: 19
 

Default Changing the categories.tpl categories

I'm not exactly sure what I need to do here, or if it is even possible, but what I'm looking for is for the ability to change the categories that are linked to on the default categories template.

The code says -

{*
$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}
{strip}
<ul>
{foreach from=$categories_menu_list item=c}
<li><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}"><strong>{$c.category} </strong></a></li>
{/foreach}
</ul>
{/strip}
{assign var="additional_class" value="menu-categories-list"}

{/if}

{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_categories content=$smarty.capture.menu}


And the category that is being linked is called /Digital-Camera-Parts.html (The X-Cart clean URL I believe)
What I need it to be changed to is /Digital_Camera_Parts.html, which is my static page I created.

Is this possible to do? Or do I need a mod to be able to change it?

Thanks and sorry for the rather inept way of describing all this, I'm still new at the X-Cart format
__________________
X-Cart Version - 4.2.0
License products:
X-Cart Gold
Reply With Quote
  #2  
Old 04-17-2009, 06:35 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Changing the categories.tpl categories

The categories and their links are automatically generated - so if you want to link to something other than the category, you need to hard-code the menu.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-17-2009, 07:15 AM
 
Darntoothysam.com Darntoothysam.com is offline
 

Member
  
Join Date: Mar 2009
Posts: 19
 

Default Re: Changing the categories.tpl categories

Is there anyone who has experience doing that sort of hard-coding? I'm kind of at a loss with what I should be doing with the menu coding.
__________________
X-Cart Version - 4.2.0
License products:
X-Cart Gold
Reply With Quote
  #4  
Old 04-17-2009, 07:24 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Changing the categories.tpl categories

It is just html - do you know html?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 04-17-2009, 07:28 AM
 
Darntoothysam.com Darntoothysam.com is offline
 

Member
  
Join Date: Mar 2009
Posts: 19
 

Default Re: Changing the categories.tpl categories

Yes, I got the categories figured out and I can add those but I'm just having issues with our template The template has a nice blue rounded border "container" that holds the categories in it, and it looks like the whole thing is coded in php, which I don't know, so I can't seem to figure out how to get my categories in the container.
__________________
X-Cart Version - 4.2.0
License products:
X-Cart Gold
Reply With Quote
  #6  
Old 04-17-2009, 07:34 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Changing the categories.tpl categories

It isn't php, it is html and Smarty. Just put your code inside this:

{capture name=menu}

Your html here

{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_categories content=$smarty.capture.menu}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 04-17-2009, 07:42 AM
 
Darntoothysam.com Darntoothysam.com is offline
 

Member
  
Join Date: Mar 2009
Posts: 19
 

Default Re: Changing the categories.tpl categories

Wow...apparently I need to do a serious look into Smarty. I got it, thank you so much!
__________________
X-Cart Version - 4.2.0
License products:
X-Cart Gold
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:06 PM.

   

 
X-Cart forums © 2001-2020