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)

Glowinafuse 02-07-2006 10:14 AM

Adding new categy box on left side
 
Okay, I am wanting to have 2 or 3 different category boxes on left side.

lets say one for "Dry Goods" one for "Livestock"... This way it would look abit nicer and seperate them from each other.

Is this possible? I thought I saw this on a site before, but could not remember.

Then have it where I can tell it which categories go in which category box.

Please let me know if this is possible. if not, any ideas on how to make this close to how I want it.

Thanks in advance,

balinor 02-08-2006 03:37 AM

Easiest way is to hard-code them, otherwise you are looking at a bit of code to try and break up the automatic category listing as you would like.

Glowinafuse 02-08-2006 02:04 PM

okay, how would I go about getting something like this done? and who?

Sounds like hard coding is difficult, so I guess I need to find someone that can do this...

Any ideas?

balinor 02-08-2006 02:06 PM

So what, exactly are you looking to have done? Do you want the categories to automatically split up into multiple menu boxes, or do you want to just create menus manually and add the links in there?

Glowinafuse 02-08-2006 02:22 PM

I would rather have it set up to have certain cats in certain menu boxes. and be able to change the names of the menu boxes (does not matter where I change them, cause it will only be done once).

This way I could setup different boxes. i.e. "Dry Goods" "Livestock" "Garden Ponds", etc...

thanks in advance,

balinor 02-08-2006 02:23 PM

I would get a quote from X-Cart for doing this for you.

Glowinafuse 02-08-2006 02:39 PM

cool... will do that. we will see... :)

Also, 1 quick question for you balinor... if you do not mind...

I need my subcats text to be centered under the image. How do I do that. i have askes many times in other areas, but no answer yet. Just trying to get all this crap done that is needed.. ;)

Thanks again for all your help, as you can tell, I need it badly.. lol

balinor 02-08-2006 02:41 PM

Depends on how you have your site set up...post a screenshot or url.

Glowinafuse 02-08-2006 03:06 PM

http://www.houseoftropicals.com/store/home.php?cat=255

http://www.houseoftropicals.com/store/home.php?cat=253

balinor 02-08-2006 03:44 PM

You would need to move the code that displays the subcat name out of the cell next to the image and under the image itself. Tough to give you exact instructions, as you have obviously customized that template. Here's a thread that might help:

http://forum.x-cart.com/viewtopic.php?t=5131&highlight=subcategories+colum ns

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:29 PM.

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