X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Mod for subcategories in columns with descriptions and icons (https://forum.x-cart.com/showthread.php?t=3848)

mrkenzie 08-22-2006 10:26 AM

Re: Mod for subcategories in columns with descriptions and icons
 
I fixed my original post on page 14, so everything should work fine now.

Let me know if there are any more issues

districtsix 09-12-2006 12:28 PM

Re: Mod for subcategories in columns with descriptions and icons
 
Hey,
I tried the post revision on page 14... my layout for subcategories is all stuck on the default image. I have an image uploaded under the "zaki" category, but it's not connecting http://districtsixmusic.com/store/home.php?cat=249


mrkenzie 09-12-2006 12:31 PM

Re: Mod for subcategories in columns with descriptions and icons
 
What version of X-Cart are you using?

pinklinoleum 09-12-2006 11:34 PM

Re: Mod for subcategories in columns with descriptions and icons
 
I was wondering if anyone knew how to call the root category icon from the filesystem instead of the DB?



Version 4.0.x

kunal 09-27-2006 12:45 PM

Re: Mod for subcategories in columns with descriptions and icons
 
hi

i have the this thread over and over and tried lots of different ways, everything works fine aprt from showing the Categories description can somebody please explain what the correct smarty tag is or what i need to change and add to display this, x-cart version in sig

louielou 09-30-2006 11:11 AM

Re: Mod for subcategories in columns with descriptions and icons
 
This looks good. But is it possible to have the image/text link to another subcatagory instead of a product?

mrkenzie 09-30-2006 11:58 AM

Re: Mod for subcategories in columns with descriptions and icons
 
If there are subcategories, it will link to the subcategories, otherwise, it will link to the products.

zenkiss 10-03-2006 03:54 PM

Re: Mod for subcategories in columns with descriptions and icons
 
Hello -

I am almost have this perfect for my site as I have stripped away some code. Can some one please tell me how I can make the catagory icons (thumbnails) show up above the text and make those images a link as well.

Thank you

Here is my current code


-------------------------------

Code:

{* $Id: subcategories.tpl,v 1.43.2.7 2005/10/28 05:23:51 svowl Exp $ *}

{capture name=dialog}

{if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}{/if}<br><br>
{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 width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
{/if}
{ if %cat_num.index% is div by 4}
<tr>
{/if}
<td align="center" valign="top">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
{if $subcategories[cat_num].icon_url}<img src="{$subcategories[cat_num].icon_url}" border="0" style="padding-bottom: 5px;">{else}<img src="{$xcart_web_dir}/default_icon.gif" border="0" style="padding-bottom: 5px;">{/if} </a><br /><br />
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
<b>{ $subcategories[cat_num].category|escape }</b></a><br><br>
                        { $subcategories[cat_num].description|escape }</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}
{if $total_pages gt 2}
<br>
{ include file="customer/main/navigation.tpl" }
{/if}
{if $products eq "" and $tmp eq "0"}
{$lng.txt_no_products_in_cat}
{/if}
{/capture}
{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"}
{if $products eq ""}
{if $f_products ne ""}
<BR><BR>
{include file="customer/main/featured.tpl"}
{/if}
{/if}
{ include file="customer/main/navigation.tpl" }


----------------------

Edit, it looked good until going into one of the suncats as I wiped out the products, hmmmmm......

finestshops 10-03-2006 04:03 PM

Re: Mod for subcategories in columns with descriptions and icons
 
Hi there,

try to change

{if $subcategories[cat_num].icon_url} ... {/if}

to

<A href="home.php?cat={ $subcategories[cat_num].categoryid }"><IMG alt="{ $subcategories[cat_num].category|escape }" border="0" src="{if $subcategories[cat_num].icon_url}{$subcategories[cat_num].icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}{/if}"></a>

zenkiss 10-03-2006 04:20 PM

Re: Mod for subcategories in columns with descriptions and icons
 
1 Attachment(s)
That worked great 27Stars- Thank you! This really should be built into X-cart.

If you saw my last part of the edit, I took the products off and changed some code about. When I click one of the icons now it goes to proper subcat but shows no products (my fault).

1 - I see no products (I know that is because I took out the variable) I was trying to get it to show just the icon and sub cat name and no products underneath as with this mod as it is. But that wiped out my products inside the subcat where they should show.

I am almost keep having it but mess it up :(

Thank you again

I am after this looking the way it does with these as the subcats then the page you would get there products


All times are GMT -8. The time now is 11:38 AM.

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