Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

category page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-07-2014, 04:27 PM
 
DBK Web Builder DBK Web Builder is offline
 

Advanced Member
  
Join Date: Apr 2014
Location: NJ
Posts: 67
 

Question 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
__________________
4.6.2 and 4.6.3
http://www.DBKWebBuilder.com
Reply With Quote
  #2  
Old 05-07-2014, 05:07 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 05-07-2014, 06:17 PM
 
DBK Web Builder DBK Web Builder is offline
 

Advanced Member
  
Join Date: Apr 2014
Location: NJ
Posts: 67
 

Default 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)
__________________
4.6.2 and 4.6.3
http://www.DBKWebBuilder.com
Reply With Quote

The following user thanks DBK Web Builder for this useful post:
totaltec (05-07-2014)
  #4  
Old 05-07-2014, 08:47 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #5  
Old 05-08-2014, 08:19 AM
 
DBK Web Builder DBK Web Builder is offline
 

Advanced Member
  
Join Date: Apr 2014
Location: NJ
Posts: 67
 

Default 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
__________________
4.6.2 and 4.6.3
http://www.DBKWebBuilder.com
Reply With Quote
  #6  
Old 05-08-2014, 08:56 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #7  
Old 05-08-2014, 11:01 AM
 
DBK Web Builder DBK Web Builder is offline
 

Advanced Member
  
Join Date: Apr 2014
Location: NJ
Posts: 67
 

Default 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 !)
__________________
4.6.2 and 4.6.3
http://www.DBKWebBuilder.com
Reply With Quote
  #8  
Old 05-08-2014, 11:09 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #9  
Old 05-08-2014, 06:25 PM
 
DBK Web Builder DBK Web Builder is offline
 

Advanced Member
  
Join Date: Apr 2014
Location: NJ
Posts: 67
 

Default 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
__________________
4.6.2 and 4.6.3
http://www.DBKWebBuilder.com
Reply With Quote
  #10  
Old 05-09-2014, 07:00 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020