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)

BCSE 08-03-2004 04:46 AM

I see what's going on. You didn't put my code in the right spot. Maybe it would be better explained to say to put it infront of this code:

Code:

#
# Put  subcategory_count  to $subcategories array
#
if (!empty($subcategories))
foreach($subcategories as $key =>$subcategory) {
       
        $subcategory["subcategory_count"]=0;

        foreach($all_categories as $all_category) {
                if ($all_category["categoryid"]==$subcategory["categoryid"]) {               
                        $cur_dir_len = strlen($all_category["category"]);
                        $current_subcategory=$all_category["category"];
                }               
        }


The code depends on the subcategories being created (or not created). So it has to go below the subcategory creation.

Otherwise, it looks like you have it if you notice browsing down the categories to say here:
http://www.solutionsforliving.biz/customer/home.php?cat=131
you have the parent's subcategories on the left side.

Also, since you have the root categories across the top, I have fixed my code to allow for that. So recopy the php code in my original fix so you don't have 2 copies of the root categories at the top.

Carrie

mikea93449 08-03-2004 07:51 AM

CARRIE YOU'RE A GENIUS!!! :D Everything works perfectly. Thank you so much for taking time out to solve this problem and for your patience in dealing with my lack of php experience. You're very nice to do so.

I don't mean to take advantage of your generosity, but I do have one last issue. When a main category is clicked on across the top, in the center section of the page the subcategories are listed in addition to the subcategories now being listed on the left. What I would like is for featured products to be displayed in the center of the page instead of the subcategory listings. I'm assuming this is an easy fix and I only need to be pointed in the right direction, but what do I know? :wink: Also, I'm thinking that the word "description" that appears at the top of the center section can be changed by editing a file in the languages section. Am I close?

I promise I won't take up any more of your time after this.

Thanks again for your kindness in helping me out!

Mike

BCSE 08-04-2004 07:45 AM

Glad you got it working! :)

I don't know about the genious part! LOL Many would argue on that one! ;)

As far as getting rid of the categories in the middle, edit skin1/customer/main/subcategories.tpl and comment out much of the top that displays sub categories. Then it should just show featured products and/or products.

You'd want to start the commenting on this line:
Code:

{section name=cat_num loop=$subcategories}

And would probably want to end the commenting after:
Code:

{ if %cat_num.last% }
</table>
{/if}
{/section}


I hope that makes sense!

To change the "description" word, try going into your categories and editing them. You will probably see the word "description" in the description section. I hope that makes sense when you look at it.

Good luck with the site! I think it looks nice and clean!

Carrie

shan 08-04-2004 07:50 AM

heres a similar thread for doing this in V4

http://forum.x-cart.com/viewtopic.php?t=12058

mikea93449 08-04-2004 05:17 PM

Thank you again Carrie & Shan... you've both been very helpful and without your advice I would never be as far along with this as I am. Thanks again... now I just have to figure out the back end stuff... stay tuned for more posts in the future. :wink:

Mike

johnnydos 10-22-2004 12:00 PM

thanks for the code
 
Carrie,

I second mikea93449's sentiments. Works very nicely. Being able to access sibling categories is key.

Thanks

BCSE 03-20-2005 06:17 AM

You can see an example of the mod discussed here on:
http://www.purpleturtlekids.com

It's an old site I did a long time ago (2 years?) that I have revisited and made the look a bit fresher (within their budget).

If you click on the category tabs you will notice when you get to the end of a category tree branch (where there's no more subcategories) it will still show the previous set of subcategories in the purple bar.

Carrie

Hyperdelicious 04-11-2005 10:00 AM

only show sub categories
 
Quote:

Originally Posted by shan
heres a similar thread for doing this in V4

http://forum.x-cart.com/viewtopic.php?t=12058



The link Shan provided works great for me in 4.0.13 ... however, unlike what is mentioned here it does not discuss showing only the sub categories.


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

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