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)
-   -   category page (https://forum.x-cart.com/showthread.php?t=69144)

DBK Web Builder 05-07-2014 04:27 PM

category page
 
Hi

We would like to have a category page

which would show the cat name /image for each category in a grid

kinda like what I have here on the home page - but on a page of it's own ?

I can't seem to find how to make this type of page

http://www.watertownmemorialcompany.com/home.php

thanks

DonnaNJ

totaltec 05-07-2014 05:07 PM

Re: category page
 
Great Question! Thanks Donna, you inspired me to do a quick X-cart tip video and add it to my tutorials. http://forum.x-cart.com/showthread.php?t=62810

You can view the video here: http://youtu.be/1T5pdmGEDVI

DBK Web Builder 05-07-2014 06:17 PM

Re: category page
 
Oh this is great - I casn do a lot with this

where do I put newpage.php

in the toplevel/customer folder - where home.php is now ?

thanks

Donna

(I probably won't finish this till morning - so I'll post then how it works)

totaltec 05-07-2014 08:47 PM

Re: category page
 
Quote:

Originally Posted by DBK Web Builder
Oh this is great - I can do a lot with this

where do I put newpage.php

in the toplevel/customer folder - where home.php is now ?

That's where you would put it if you want it to be a customer page, yes.

DBK Web Builder 05-08-2014 08:19 AM

Re: category page
 
Oh this worked great !
http://www.watertownmemorialcompany.com/category_portfolio.php


Except now the client REALLY wants a category page for each category and that page will show only the products for that category

I can get the layout to work - but it's not picking up the category id's/prod_ids

is there something I need to declare so I get all the variables /arrays ?

thanks
Donna

totaltec 05-08-2014 08:56 AM

Re: category page
 
Donna, isn't this accomplished already on the normal category pages?

To work with categories you are probably going to want to include /include/func/func.category.php

Its been a while since I needed to do something like this, but if I remember correctly the function you want to use is func_get_category_data()

Read through that file and see if the function you need is in there.

BTW, I see from your signature you are running 4.6.6, now we can be sure that you are from the future. j/k :-)

DBK Web Builder 05-08-2014 11:01 AM

Re: category page
 
I tired copying in subcategories.php but it tells me there are no prods in this cat

I tried including that file ... no difference ... I loop through the categories but it thinks there are no product s/

http://www.watertownmemorialcompany.com/category_portfolio.php

(I'm working on two xc sites one is 4.6.3 and one is 4.6.2 !)

totaltec 05-08-2014 11:09 AM

Re: category page
 
Yeah Donna, I could look at that for you, but I must admit that I don't know how to do it off the top of my head. It would take some investigation time for me to determine what needed to be done to make this work.

We would need to include the right unctions, then call those functions and pass the right arguments to get the products. Its definitely possible to do it, but it is going to take a bit of finagling to get it done.

DBK Web Builder 05-08-2014 06:25 PM

Re: category page
 
But your earlier comment is right ? isn't there already a category page ?

I can't find it - I can generate a menu but not the next level page ?

It looks like I need to pass it ?cat=6 or something ...

I'll think about it more tomorrow

totaltec 05-09-2014 07:00 AM

Re: category page
 
Quote:

Originally Posted by DBK Web Builder
It looks like I need to pass it ?cat=6 or something ...

Yes, you need to give it the category id, either in your code, or in a variable in the URL.


All times are GMT -8. The time now is 03:11 PM.

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