| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Mod for subcategories in columns with descriptions and icons | ||||
|
|
Thread Tools | Search this Thread |
#211
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
This is for v4.1.8
Thanks to mrkenzie from post #137 for the modifications and the original poster 27stars for the original creation, I got this working on v4.1.8 with just minor modifications. These instructions are basically the same as post #137, but I'll explain it with the code modifications that I have. Mod for subcategories in columns with descriptions and icons for v4.1.8 1. the default "No Image Available" image is displayed if none is assigned 2. product description is displayed below the icon. 3. quantity will display a number in parenthesis and without the word 'product' and "(0)" if there are no subcategories or products for a particular category. 4. and it will also show the subcategory DESCRIPTION if there is one when you hover over the subcategory link. ------------------------------------------------------------ Start by adding this code to the end of the xcart/skin1/skin1.css file. Code:
Find the following code in xcart/include/categories.php: Code:
and replace with this (in order to get the category description): Code:
Next, find the following code, from <table ..to...</table> in skin1/customer/main/subcategories.tpl and delete it: Code:
And replace that code with this: Code:
And thats it. ------------------------------------------------------------- The default is 3 columns. But if you want to change the number of columns, then just change all the 3's to the number of columns you want in this line of code (from above): 4 column example (two number 3's was changed to 4): Code:
And also change the following line in skin1.css (from above) for the appropriate td width % (4 columns is 25%; 2 columns is 50%; etc.) 4 column example: Code:
To keep the icons aligned evenly on the page , I created my sub-category icons (thumbnails) the same size as the 'No Image Available' image. This size is around 125 x 75 pixels. I've also attached screenshots for the 3 and 4 column displays below. All the modifications above were made on templates that had no previous modifications. Hope you like it and thanks again to 27stars and mrkenzie. - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
|
#212
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
Anyway to get this to work if the images are in the database?
didn't mean to do that, but had to set it that way to install on this server and forgot to set it back to file system.
__________________
xcart version 4.0.18 |
|||||||
#213
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
Move them back to FileSystem...never should run images from the DB.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#214
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
Thanks,
Can I change now or will I have to re-enter all the images for the products?
__________________
xcart version 4.0.18 |
|||||||
#215
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#216
|
|||||||||
|
|||||||||
Re: Mod for subcategories in columns with descriptions and icons
Jason,
Did you ever find out how to center the text under the image in subcategories? Thanks, Vahid Quote:
__________________
X-cart gold 4.4.3 Unix |
|||||||||
#217
|
|||||||||
|
|||||||||
Re: Mod for subcategories in columns with descriptions and icons
MoonDog,
You have done an excellent job on this! I have done every thing correct and got the subcategories aligned with picture and text. all great. The only problem I have is that I can’t get the text under the picture in the center. It is on the bottom left side of the image. Any advise. Sorry to have to bother you, I read a lot on the forum with no success. Thanks, V
__________________
X-cart gold 4.4.3 Unix |
|||||||||
#218
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
vahidnia,
Make sure that you have added the following code to your skin1/skin1.css correctly. This is the code that sets your icon and text alignment to center.
Code:
That's it. Hope this helps. - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
#219
|
|||||||||
|
|||||||||
Re: Mod for subcategories in columns with descriptions and icons
Apparently, my skin1.css file has no control over subcategort text format and size! . I got rid of this code all together and the text still showed up at the bottom left. I deleted skin1.css in skin1/ directory but again nothing happened. It seems to me that subcategory text gets its format and size from somewhere else! is it possible?
By the way, I am using fancy category mod, does that has anything to do with this?
__________________
X-cart gold 4.4.3 Unix |
|||||||||
#220
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
vahidnia,
Yeah, that seems pretty strange. O.K. let's see, you deleted the .ColumnTitles class and it still does the same thing. Did you check to see that there is only one instance of .ColumnTitles in your skin1.css file. If you have two .ColumnTitles classes, then the last one will overide the first one. But if you do have two of them, just delete one of the two. Now, if there is nothing wrong with your skin1.css file, then go back to the modified skin1/customer/main/subcategories.tpl file and open that up. When your icon gets placed on your page it gets center aligned and then it sees a break tag and then it places the category name text centered on the next line. So if you don't have a <br> tag, then when the text is too long, it goes to the next line, but it continues from the left side instead of the center. So what you need to do is find this line of code: Code:
Hopefully one of the two will fix it. As far as the fancy category mod, I don't really know what that is. I just bought this x-cart software last month and I'm just playing around with it right now. But I don't think that mod should affect it. But if those two suggestions doesn't work, then I guess maybe it could. Well, that's it. Good luck. - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
|
|||
X-Cart forums © 2001-2020
|