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

Mod for subcategories in columns with descriptions and icons

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #191  
Old 04-07-2007, 04:44 AM
 
balinor balinor is offline
 

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

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

Just read through the thread, you'll get to the 4.0.x version after a couple of pages
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #192  
Old 04-07-2007, 09:06 AM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

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

Got it partially working. Somehow the images are not showing up in FireFox. In Internet Explorer everything works fine.
Looks like the images are trying to load from a different url in FireFox, and therefore it cannot find the images.
Really strange...

Code:
{* ==================== Sub categories mod start *} {if $subcategories} {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 3} <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} {* ==================== Sub categories mod end *}
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #193  
Old 04-07-2007, 09:16 AM
 
balinor balinor is offline
 

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

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

Keep reading...I added a modification to call the images from the filesystem instead of the DB.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #194  
Old 04-07-2007, 09:23 AM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

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

Quote:
Originally Posted by balinor
Keep reading...I added a modification to call the images from the filesystem instead of the DB.

I did . Read all 20 pages.
If I am correct, this was your solution for the file system:
Code:
{if $subcategories[cat_num].icon_url}[img]{$subcategories[cat_num].icon_url}[/img]{else}[img]{$xcart_web_dir}/default_icon.gif[/img]{/if}

But that one is already implemented, and only works for the internet explorer browser. Still not getting any images in my FireFox browser. Checked all code snippets from other users, and can't find the solution. What am I doing wrong?
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #195  
Old 04-07-2007, 12:23 PM
 
balinor balinor is offline
 

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

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

Sorry, mis-read the code. When you view the source code in firefox, it is showing the correct link? Do you have the permissions set properly on the files folder where the images are? Do you have the .htaccess file in there set to 'allow from all'?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #196  
Old 04-07-2007, 05:25 PM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

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

Just viewed the source:

Code:
<td align="center" valign="top"> <a href="home.php?cat=1"> <img src="http://localhost/shop\files\NightFire\WPS.jpg" border="0" style="padding-bottom: 5px;"> </a><br /><br /> <a href="home.php?cat=1"> <b>Water Pashmina klein</b></a><br><br> </td>

I'm testing it on the localhost server at the moment. And as you can see, the slashed are used in two ways in the link: / and \
Normally it should just be like: /
Somehow Internet Explorer is not having any problems with this, but FireFox does.

Haven't checked it on my live server yet, don't want to take the risk of having the customers experiencing the problem.
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #197  
Old 04-13-2007, 08:57 AM
 
trickyjoe trickyjoe is offline
 

Member
  
Join Date: Jul 2006
Posts: 16
 

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

I'm sure I've read this somewhere before and want to link the two things together, but...

I'm trying to get the following code to display the first product image from within the category if the category image does not exist.

<img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/{GET FIRST_PRODUCT_IMAGE.jpg}{/if}" alt="{$subcat.description}" align="middle" border="0">

I know thats not the code I need :P but I'm crap with php and its doing my head in. Please can anyone help. Cheers

Joe
__________________
www.rollersnakes.co.uk
4.0.19 [getting faster]
2 x dedicated servers, Dual Quad Core processors, 16gb ram, Raid 0 for the os, Raid 5 for the data and a whole host of tweaks. Some might say its a little over kill for one site
Reply With Quote
  #198  
Old 04-27-2007, 09:56 PM
 
Zero Zero is offline
 

Newbie
  
Join Date: Apr 2007
Posts: 7
 

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

I dont know how the code works very well, I was able to follow the instructions and get the subcategory images to work, however I cant them to stay two in a row. No matter where I set div by I cant get two images in a single row.

div by 3 is 4 in a row, div by 2 is three on top, two in the middle, and one on the bottom, and div by 1 is one in each row.

What am I doing wrong? Here is one of the pages http://bulletproofautomotive.net/store/home.php?cat=261 Im wondering if it has anything to do with the images not all being the exact same size?

I have the latest version..4.X
__________________
1
Reply With Quote
  #199  
Old 04-29-2007, 06:25 PM
 
Art lopez Art lopez is offline
 

Newbie
  
Join Date: Apr 2007
Posts: 8
 

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

This is a great mod that should be implemented into x-cart. It is working on my website but it seems the text is not centered under the image. I noticed that if I minimize the page it does center up. Currently running my thumbnails at 100 and wondering if I should resize them bigger to get them more centered.
__________________
X-Cart 4.1.7
X-AOM
X-Special Offers
Reply With Quote
  #200  
Old 04-30-2007, 05:56 AM
 
chawla@moviesandgamesonli chawla@moviesandgamesonli is offline
 

Senior Member
  
Join Date: Mar 2003
Location: UK
Posts: 125
 

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

Can someone please enter the complete code for this mod as its quite confusing at the moment.
__________________
X-Cart 4.4.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 09:02 AM.

   

 
X-Cart forums © 2001-2020