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)
-   -   Rearranging and reconfiguring categories problem (https://forum.x-cart.com/showthread.php?t=8617)

mikea93449 07-25-2004 11:03 AM

Rearranging and reconfiguring categories problem
 
Hi everyone,

This is my first experience with X-cart and its pretty cool. I'm using version 3.5.9 (linix) and am trying to change the way the navigation displays. If you look at http://www.solutionsforliving.biz/index.php you will see that I have the category navigation going across the top horizontally as images. I currently have them in the head.tpl file but believe that I need to change it to the categories.tpl, but I'm not sure. Ideally I would like the category image buttons to have a rollover effect, but I'm not sure where if that is possible. Also, I'm confused as to how I make each category button a functional link. And, since I'm begging for help, where the current categories are listed on the left side I would like to display the subcategories. The subcategories should remain until a new category is clicked on. Is this all possible? Any help and advice you can give me is much appreciated. Thank you in advance.

Mike

shan 07-26-2004 04:59 AM

this is the code that will give you root categories in a horizontal line

Code:

<table cellpadding="5" cellspacing="0"><tr>

{section name=cat_num loop=$categories}
<td>
<font class=CategoriesList>{$categories[cat_num].category_name}</font>

</td>
{/section}

</tr>
</table>


mikea93449 07-26-2004 06:58 AM

Thank you Shan! That works great to display the categories horizontally :D . I've put that code into the head.tpl file as can be seen at http://www.solutionsforliving.biz/index.php. What I would like to do is use the images right above the category listings as the actual category links instead of text. Also, in home.tpl I would like to replace the categories.tpl with the subcategories.tpl include but have the subcategories.tpl be reformatted to match the other menus. What should I do next?

shan 07-26-2004 07:37 AM

save your images in skin1/navpics/ folder and name them so that the file name is that same as the category id with the gif extension.

for example your storage category image should be saved as 103.gif

Code:

<table cellpadding="5" cellspacing="0"><tr>

{section name=cat_num loop=$categories}

<td>
<a href="home.php?cat={$categories[cat_num].categoryid}" >

<img src ="{$ImagesDir}/navpics/{$categories[cat_num].categoryid}.gif">

</a>
</td>

{/section}

</tr>
</table>


you should be able to see what is going on from the code ive supplied now.

theres a setting in general settings about showing subcategories in the categories menu

mikea93449 07-26-2004 04:17 PM

Thank you again Shan! The fixes you stated worked perfectly! :D My categories menu that was showing on the left now reads Sub-Categories (categories.tpl) and displays the sub-categories for whatever category is clicked on at the top of the page.

The weird thing that happens is once you click on a sub-category item, the sub-categories disappear. Is there anyway to keep the sub-categories visible until a new category is clicked on?

Thank you again for your help!
Mike

Once again... the site is located at: http://www.solutionsforliving.biz/index.php

shan 07-26-2004 04:37 PM

afraid not, its one of the drawbacks on how the categories are stored in the database in versions before v4.0.0

its because there are no more subcategories that nothing shows

mikea93449 07-26-2004 04:46 PM

Hi Shan,
Would upgrading to 4.0 help? Or is there any other way to modify the code to keep the subcategories in place?

Thank you,
Mike

shan 07-26-2004 04:49 PM

Ive had the same problem myself

Ive not tried it in 4 yet but I see the way that categories are handled is better.

V4 is not realy ready for production sites yet even though Im developing one myself at the moment. its not due for release for a while though.

best way prior to v4 is to get rid of the categories side menu altogether and just use the subcategory links that appear in the center column

mikea93449 07-26-2004 05:00 PM

Actually, what I was hoping to do was to keep the subcategories on the left, then in the middle column, display featured products when the main category is clicked on, then product listings when the subcategory is selected. I don't suppose there would be anyway to write a new *.tpl file that would be able to keep the subcategories listed?

Thanks again,
Mike

shan 07-27-2004 03:44 AM

i gave up in the end when trying it with v3.5.x


All times are GMT -8. The time now is 12:29 PM.

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