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 new categy box on left side (https://forum.x-cart.com/showthread.php?t=19790)

vixnfox 02-09-2006 01:06 AM

Re New Category Box
 
Hi, I thought this question would answer my search, but no....

I want to actually add a menu to the Left Side. I Have Categories, Special, and Help by default. I want to add another menu for FAQs to have information on various product components. Can I do this???

vixnfox

balinor 02-09-2006 03:06 AM

If you want to add a new menu, try these steps:

1. Copy one of the existing menus (special.tpl is an easy one) and create a new template.

2. Remove the code for the 'special' link in the new template, and add your own links.

3. Add the menu to customer/home.tpl (just copy the way special.tpl is called and change the name).

Done!

Glowinafuse 02-09-2006 11:00 AM

okay, I have been to that thread with no luck so far... And I really need to figure this out so I can continue with making the shop look better :)

here is my code for the subcategories.tpl

please help please!!! I have not found out how to do it...

Code:

{* $Id: subcategories.tpl,v 1.29 2002/11/26 14:55:13 alfiya Exp $ *}
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"}



{include file="modules/Bestsellers/bestsellers.tpl"}
{/if}



{ include file="customer/main/navigation.tpl" }
{if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":"
"}

{/if}


{capture name=dialog}
{assign var="tmp" value="0"}

{section name=cat_num loop=$subcategories}
{if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if}
{/section}

{section name=cat_num loop=$subcategories}

{ if %cat_num.first% }
<table border=0 cellspacing=5 width=100%>
{/if}

  {if $smarty.section.cat_num.index is div by 2}
    </tr><tr valign="top">
  {/if}

  <td valign="top" width="70" align="center">
  <a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }">
  [img]icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]
  </a>
  </td>
  <td align=center><a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }">
  {$subcategories[cat_num].category|escape}</a>

  { $subcategories[cat_num].description|escape }
{if $config.Appearance.count_products eq "Y"}


<font class=Text>
{if $subcategories[cat_num].product_count}
{ $subcategories[cat_num].product_count } {$lng.lbl_products}
{elseif $subcategories[cat_num].subcategory_count}
{ $subcategories[cat_num].subcategory_count } {$lng.lbl_categories|lower}
{/if}
</font>
{/if}


  </td>

{ if %cat_num.last% }
</tr></table>
{/if}

{/section}
{if $tmp and $products ne "" }
<br clear=_all>{*<hr size=1 noshade>*}
{/if}

{if $products eq "" and $tmp eq "0"}
{$lng.txt_no_products_in_cat}
{/if}




{include file="customer/main/products.tpl" products=$products}

{/capture}
{include file="dialog.tpl" title=$current_category.category|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"}

{if $products eq ""}
{if $f_products ne ""}



{include file="customer/main/featured.tpl"}
{/if}
{/if}
{ include file="customer/main/navigation.tpl" }


thanks in advance for the help...

vixnfox 02-09-2006 11:54 PM

sorry to hijack your thread glow, just a thanks to Balinor (again!! what a man) for sorting my problem.

I am about to create a new menu. Taking balinors idea a little further, I just tracked the includes from home.php. After a while (cos I only had this thing a few days) you get the idea how the logic goes.
The key is in $smarty->assign("main", <your name>"; in home.php
home.php includes skin1/customer/home.tpl which itself includes home_main.tpl, and its here that the $smarty-> is switched,
{if $main eg "yourname" }
( include file ="customer/main/yourname.tpl" }
yourname.tpl of course is your stuff you want displayed.


A start is to duplicate the "special" menu.
In home.php, under the include special.tpl add
{include file="skin1/customer/yourname.tpl"}
duplicate special.tpl as yourname.tpl into skin1/customer

You now have 2 "special" menus. Replace the .tpls with your own.

Dont know if this helps you, but I felt good after I worked it out.

vixnfox
cheers from Oz


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

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