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)
-   -   Subcategory text & images for x-cart 4.1.5 (https://forum.x-cart.com/showthread.php?t=27803)

Jayk 08-10-2007 01:59 PM

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

Originally Posted by Madhatterr
Okay,

Seems I am having a issue still... for some reason the subcat icon pics aren't showing and it keeps showing the nopic.gif default. Anyone know what's up with that? My code is as posted above.

Thanks! :D/


If you look in the really long line that starts with:

Code:

<td class="ColumnTitles" valign="top">

You will see:

Code:

{$xcart_w eb_dir}

There should be no space between the 'w' and the 'e' in web.

Jason

neroag 08-11-2007 12:04 PM

Re: Subcategory text & images for x-cart 4.1.5
 
Great Little mod, i have this workng a treat on 4.1.8, is there a way to have it 4 columns across raether than just the 2 ?

kevin02 09-02-2007 04:02 PM

Re: Subcategory text & images for x-cart 4.1.5
 
Nice little find, It worked right away on 4.1.6. Changed to 3 wide.

{foreach from=$subcategories item=subcat}
{if $tmp is div by 3}

Don't forget about adding to the skin1 css file.

/* Catagory Display Rework
*/
.ColumnTitles {
margin: 0;
padding: 5px 5px 0 5px;
text-align: center;
width: 33%;
}

.ItemsList {
padding: 0;
color: #374C79;
font-weight: bold;
font-size: 12px;
}

kevin02 09-02-2007 04:33 PM

Re: Subcategory text & images for x-cart 4.1.5
 
1 Attachment(s)
After changing the width to 3 across, any help on having the text displaying the number of products display below the category name instead of after it? I have several category names that are long and the number of products breaks apart. Image attached.

MoonDog 09-03-2007 06:02 PM

Re: Subcategory text & images for x-cart 4.1.5
 
kevin02,

I've deleted the word 'products' from my code, and just have the number quantity of subcatagories in parenthesis display.

Here is the post I did for v4.1.8 and you can see the screenshots of the way it displays without the word 'products'.

http://forum.x-cart.com/showpost.php?p=183821&postcount=211

But if you do need the quantity and the word 'products' on the next line, then all you need to do is put a <br> tag at the end of the line of code that says:

Code:


<font class="ItemsList">{$subcat.category|escape}</font></a>


so the code will look like this:
Code:


<font class="ItemsList">{$subcat.category|escape}</font></a><br>


And that's it!

- MoonDog -

balinor 09-03-2007 06:12 PM

Re: Subcategory text & images for x-cart 4.1.5
 
Be sure to use <span> tags and not <font> tags, as font tags are now depreciated and should not be used.

kevin02 09-03-2007 07:36 PM

Re: Subcategory text & images for x-cart 4.1.5
 
Thanks for the information, It worked perfect.

MoonDog 09-03-2007 08:58 PM

Re: Subcategory text & images for x-cart 4.1.5
 
FONT element deprecated in HTML 4.01, thanks balinor. I'll keep that in mind.

One question though, is it bad programming practice to use the <br> tag instead of the <br/> in the line of code I used above?

Even though they both do the same thing, should I use a <br/> tag to break a paragraph and the <br> tag to enter blank lines?

Or does it really matter?

To kevin02, glad you got it working.

- MoonDog -

balinor 09-04-2007 04:21 AM

Re: Subcategory text & images for x-cart 4.1.5
 
It depends on what doctype you are using. 4.1 uses XHTML 1.0 Transitional by default, which means you need to use <br /> and also close every IMG tag with a /. You can read up on the standards here:

http://www.w3.org/

You should also validate your site using their validator, and fix any issues.

MoonDog 09-04-2007 05:52 PM

Re: Subcategory text & images for x-cart 4.1.5
 
balinor, thanks for the info.

- MoonDog -


All times are GMT -8. The time now is 04:09 AM.

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