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

Tables in Category Descriptions

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-17-2006, 02:38 PM
 
MrInfo MrInfo is offline
 

Newbie
  
Join Date: Jul 2003
Posts: 6
 

Default Tables in Category Descriptions

Greetings,

I have looked all over trying to figure out why the spacing is so far down the page when I insert a table of images in the category description.

Here is the link to see the space

http://dev.blindsale.net/home.php?cat=248

Here is the code that I placed in the description section of the category.
Code:
2" PVC Blind Gallery <font size="1" color="#0000cc" face="Zapf Chancery, Comic Sans MS, cursive">(click on picture to enlarge)</font> <table width="0" border="0"><tr><td>[img]Graphics/blinds_gallery/r1-1.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r1-2.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r1-3.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r1-4.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r1-5.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r1-6.jpg[/img]</td> </tr> <tr> <td>[img]Graphics/blinds_gallery/r2-1.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r2-2.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r2-3.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r2-4.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r2-5.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r2-6.jpg[/img]</td> </tr> <tr> <td>[img]Graphics/blinds_gallery/r3-1.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r3-2.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r3-3.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r3-4.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r3-5.jpg[/img]</td> <td>[img]Graphics/blinds_gallery/r3-6.jpg[/img]</td></tr></table>

My therapist always references that it is my fault. Does anyone have any ideas?
__________________
Xcart 4.0.17 GOLD/PRO UNIX
Reply With Quote
  #2  
Old 01-17-2006, 06:58 PM
 
Maree Maree is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 85
 

Default

No ideas but I can tell you I have had the same problem in the past and gave up.
__________________
Maree
4.0.13
Reply With Quote
  #3  
Old 01-17-2006, 08:59 PM
 
MrInfo MrInfo is offline
 

Newbie
  
Join Date: Jul 2003
Posts: 6
 

Default

Thanks Maree. I had to chuckle about giving up. It is an option I am considering. It would be nice though to be able to have a little gallery of the products to view in that category before selecting it from the listing.

Maybe there is a way of placing the image in the actual menu item of the category. This way they can point, view and click?
__________________
Xcart 4.0.17 GOLD/PRO UNIX
Reply With Quote
  #4  
Old 01-17-2006, 09:26 PM
 
Maree Maree is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 85
 

Default

Yes it would be nice.
In my case I was placing a html table detailing Varieties of Quilt Battings, widths, lengths, attributes,prices, and a anchor reference ot the particular product.tpl etc - this was placed in the same position as your images - at the top of a fairly long list of products. My aim was to provide the customer with a quick view comparison of products and click on link.

Yes it would be nice
good Luck - I'll post here if I work it out.
__________________
Maree
4.0.13
Reply With Quote
  #5  
Old 01-18-2006, 03:06 AM
 
balinor balinor is offline
 

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

Default

When you enter code into the product description area, you have to be very careful that the code is written correctly. There are a number of errors/omissions in the code posted above (calling out the table as 0 width, not specifying cellpadding or cellspacing, use of <font> tags, no breaks between lines, etc, no align settings). Certain browsers like IE are tolerant of code mistakes, others (like Firefox) are much more picky

Try cleaning up the code and see if that helps.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 01-18-2006, 11:01 AM
 
Maree Maree is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 85
 

Default

Thnaks Balinor - I will try that.
__________________
Maree
4.0.13
Reply With Quote
  #7  
Old 01-25-2006, 10:33 AM
 
MrInfo MrInfo is offline
 

Newbie
  
Join Date: Jul 2003
Posts: 6
 

Default

I placed a simple table in the category description. It still brings the table to far down. If I just use one table row then it works fine. The error occurs when I use multiple table rows. Is there some in the code that I am missing?

Code:
<table> <tr> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> </tr> <tr> <td>2</td> <td>2</td> <td>2</td> <td>2</td> <td>2</td> <td>2</td> </tr> <tr> <td>3</td> <td>3</td> <td>3</td> <td>3</td> <td>3</td> <td>3</td> </tr> </table>
__________________
Xcart 4.0.17 GOLD/PRO UNIX
Reply With Quote
  #8  
Old 01-25-2006, 10:34 AM
 
balinor balinor is offline
 

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

Default

You haven't specified width, cellpadding, cellspacing or anything else in the <table> tag, which you need to do.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 01-25-2006, 10:52 AM
 
MrInfo MrInfo is offline
 

Newbie
  
Join Date: Jul 2003
Posts: 6
 

Default

OK. I added the following with no change in the results. Any other table option that I should be aware of?

Also, thank you for helping out with this.

Code:
<table width="100%" border="1" cellspacing="1" cellpadding="1">

I also tried the following with no change either.

Code:
<table align="center" width="100%" border="1" bordercolor="#000000" bordercolorlight="#C0C0C0" bordercolordark="#000000" cellpadding="1" cellspacing="1" summary="">
__________________
Xcart 4.0.17 GOLD/PRO UNIX
Reply With Quote
  #10  
Old 01-25-2006, 10:58 AM
 
balinor balinor is offline
 

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

Default

Ahhh..found the problem. Have a look at the way the table is rendered by X-Cart:

Code:
<table width="100%" border="1" cellspacing="1" cellpadding="1"> <tr> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> </tr> <tr> <td>2</td> <td>2</td> <td>2</td> <td>2</td> <td>2</td> <td>2</td> </tr> <tr> <td>3</td> <td>3</td> <td>3</td> <td>3</td> <td>3</td> <td>3</td> </tr> </table>

See all those
tags in there? You need to make a change to customer/main/subcategories.tpl:

replace this:

Code:
{$current_category.description|regex_replace:"/[\n]/":" "}

with this:

Code:
{$current_category.description}

I have that fixed by default in my X-Cart installation file, so I always forget it is in there
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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 12:49 AM.

   

 
X-Cart forums © 2001-2020