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)
-   -   Tables in Category Descriptions (https://forum.x-cart.com/showthread.php?t=19323)

MrInfo 01-17-2006 02:38 PM

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? :?

Maree 01-17-2006 06:58 PM

No ideas but I can tell you I have had the same problem in the past and gave up.

MrInfo 01-17-2006 08:59 PM

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?

Maree 01-17-2006 09:26 PM

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.

balinor 01-18-2006 03:06 AM

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.

Maree 01-18-2006 11:01 AM

Thnaks Balinor - I will try that.

MrInfo 01-25-2006 10:33 AM

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>


balinor 01-25-2006 10:34 AM

You haven't specified width, cellpadding, cellspacing or anything else in the <table> tag, which you need to do.

MrInfo 01-25-2006 10:52 AM

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="">

balinor 01-25-2006 10:58 AM

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 :(

MrInfo 01-25-2006 11:07 AM

Wahooo! It works.

Thank you so much!


All times are GMT -8. The time now is 12:51 AM.

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