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

Subcategory text & images for x-cart 4.1.5

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 02-19-2007, 10:37 PM
  evolv's Avatar 
evolv evolv is offline
 

Newbie
  
Join Date: Feb 2007
Location: Canada
Posts: 6
 

Default Re: Subcategory text & images for x-cart 4.1.5

This is exactly what I wanted and I followed the instructions exactly, but I cannot get Images for my sub-categories to show up.

Is there another change other then the one in blue above that will get the images to show up???

thanks
__________________
Karl in Canada
Version 5 Mobile
Reply With Quote
  #12  
Old 02-21-2007, 06:14 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Thumbs up Re: Subcategory text & images for x-cart 4.1.5

Great Mod!

Works with 4.1.3
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #13  
Old 02-23-2007, 12:26 AM
 
obaluba2 obaluba2 is offline
 

Senior Member
  
Join Date: Sep 2006
Posts: 152
 

Default Re: Subcategory text & images for x-cart 4.1.5

Did anyone manage to solve why Images werent showing up? I've installed this mod and all seems fine except I cant see the images!

Is the code in question

<td class="ColumnTitles" valign="top"><a title="{$subcat.description}" href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/default_image.gif{/if}" alt="" />

anyone have any ideas?

thanks
__________________
4.0.1.18 & 4.1.6 & 4.1.9 & 4.1.11 & 4.2.2 & 4.3.2, 4.6.1
Reply With Quote
  #14  
Old 02-23-2007, 08:48 AM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Re: Subcategory text & images for x-cart 4.1.5

Ok I have x-cart 4.1x and my categories.php does not have that line of code? does anyone have this mod or anything like it that is working in my version of x-cart Please someone help:
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #15  
Old 02-23-2007, 09:12 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Subcategory text & images for x-cart 4.1.5

I have 4.1.3 and with this version it is at

Line 117 in myshopurl/include/categories.php
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #16  
Old 04-08-2007, 06:23 AM
 
Newpowerr Newpowerr is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 32
 

Default Re: Subcategory text & images for x-cart 4.1.5

Quote:
Originally Posted by obaluba2
Did anyone manage to solve why Images werent showing up? I've installed this mod and all seems fine except I cant see the images!

Is the code in question

<td class="ColumnTitles" valign="top"><a title="{$subcat.description}" href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/default_image.gif{/if}" alt="" />

anyone have any ideas?

thanks


That is because there is an error in the code, everybody is doing a nice copy and paste without looking at the code as to what it does.
In the code it says: {$xcart_w eb_dir}/default_image.gif{/if}

As many of you can see, there is an ampty space between the w and the eb of the word xcart_web_dir. Get rid of this empty space and it will work fine.
__________________
X-CART-4.1.9 Pro
Add-on: X-Affiliate
Add-on: X-RMA (Return Merchandise Authorization)
Add-on: X-SpecialOffers
Add-on: X-AOM (Advanced Order Management)
Reply With Quote
  #17  
Old 05-27-2007, 09:47 AM
 
loly loly is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 5
 

Default Re: Subcategory text & images for x-cart 4.1.5

Quote:
Originally Posted by evolv
This is exactly what I wanted and I followed the instructions exactly, but I cannot get Images for my sub-categories to show up.

Is there another change other then the one in blue above that will get the images to show up???

thanks

well hope you have fiquerd it out by now, but i relized that you need to add subcatagories to your catagory in order for your catagories icons to show up.
__________________
xcart 4.1.3
Reply With Quote
  #18  
Old 05-27-2007, 09:52 AM
 
loly loly is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 5
 

Default Re: Subcategory text & images for x-cart 4.1.5

thank you for this great mod if you happend to fiquir out how icons can line up correctly please pass me the code. here is how it lookes on my site http://www.zafafy.com/shop/home.php?cat=318
__________________
xcart 4.1.3
Reply With Quote
  #19  
Old 05-28-2007, 07:49 PM
 
PP PP is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 34
 

Default Re: Subcategory text & images for x-cart 4.1.5

Great mod thanks for sharing, one issue I see is it looks great at 1024x768 and less but any resolutions above this and the text moves off to the side of the image. So in my case running 1280x1024 and 1440x900 it looks a mess. Is there any way to make the text stick under the image with out going to tables ?
__________________
X-Cart version 4.1.7 Pro
PHP 4.4.3
GD bundled (2.0.28 compatible)
MySQL server 4.1.21-standard
MySQL client 4.1.21
Web server Apache/1.3.37 (Unix)
Operation system Linux
Perl 5.008007
XML parser (expat) 1.95.6
Reply With Quote
  #20  
Old 06-02-2007, 03:22 PM
 
Seacat Seacat is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 29
 

Thumbs up Re: Subcategory text & images for x-cart 4.1.5

Really like this mod! Adjusted a few things to get it to work with my site. Here's a little variation on the theme:

Left this: /includes/categories.php as in post #1.

In /skin1/customer/main/subcategories.tpl, used a little bit like this:

{if $subcategories}
{assign var="cntr" value="0"}
<table cellspacing="5" width="100%" border="0">
<tr align="right">
{foreach from=$subcategories item=subcat}
{if $cntr is div by 2}
<td colspan="3" align="right"></td></tr><tr>
{/if}
{if $first_subcat ne "Y"}
{assign var="first_subcat" value="Y"}
{/if}
<td align="right"><a title="{$subcat.category|escape}" href="home.php?cat={$subcat.categoryid}"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/self-defense-weapons.jpg{/if}" alt="{$subcat.category|escape}" /></a></td>
<td align="right" class="ColumnTitles"><a title="{$subcat.category|escape}" href="home.php?cat={$subcat.categoryid}">
<font class="ItemsList">{$subcat.category|escape}</font></a></td>
{if $config.Appearance.count_products eq "Y"}
{if $subcat.product_count}{$subcat.product_count}{$lng .lbl_products}
{elseif $subcat.subcategory_count}{$subcat.subcategory_cou nt}{$lng.lbl_categories|lower}
{else} 0 Products
{/if}
{/if}
{assign var="cntr" value=$cntr+1}
{/foreach}
</tr>
</table>
{/if}

This validates as xhtml/transitional and displays a category image that has been uniformly set to 105px on the long side. Then puts the text link for the subcategory name to the right of the image. It uses title tags with the two hrefs and an alt tag for the image. These are all subcategory names. Keyword bliss.

In skin1/skin1.css, a few changes:

.ColumnTitles {
padding-top: 12px;
padding-right: 10px;
padding-bottom: 3px;
padding-left: 10px;
text-align: left;
margin: 0px;
width: 33%;
}

It works for me, may play with some spacing and alignment a little more, see it here: http://www.misdefenseproducts.com/Home-Security-Decoys-p-1-c-272.html
__________________
Seacat
X-Cart Gold v4.1.6 [linux]
PHP 5.2.2
My SQL 5.0.24
DSEFU Mod
Cartlab CSS Skin
Several other mods
Self-Defense Weapons
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 03:27 AM.

   

 
X-Cart forums © 2001-2020