Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to use attributes as categories?

How to use attributes as categories?

Views: 998

Results 1 to 13 of 13
9 Apr 2016, 5:45 PM
#1
yisou avatar

yisou

New Zenner

Join Date:
May 2009
Posts:
36
Plugin Contributions:
0

How to use attributes as categories?

Say that https://www.buybestglasses.com has set option name: Color, and option values are: Black, Red, Green, White, and another option name: Size, its related option values are: big, medium, and small.

How to let all these option values as individual category as:

Category Color
Black --- display all products with black color
Red --- display all products with red color
Green --- display all products with green color
White --- display all products with white color

Category Size
Big --- display all products with big size
Medium --- display all products with medium size
Small --- display all products with small size

thanks.

9 Apr 2016, 6:12 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: How to use attributes as categories?

While not a direct answer to your question, you might consider using the Dynamic Filter plugin (https://www.zen-cart.com/downloads.php?do=file&id=1361) to accomplish something similar.

9 Apr 2016, 11:31 PM
#3
yisou avatar

yisou

New Zenner

Join Date:
May 2009
Posts:
36
Plugin Contributions:
0

Re: How to use attributes as categories?

that is not the kind I need. I need the function just as http://www.eleganteyeglasses.com/. In this site, the main categories are divided by Frame Material. All the other categories are from attributes groups.

10 Apr 2016, 10:28 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to use attributes as categories?

You need to design a structure for your products so you can keep this straight

Then use "linking" for the other categories you create which is what the site you referenced is doing
Check "Black Eyeglasses Frames" and you will see that these are the same for blue etc and have colors other than black

https://www.zen-cart.com/content.php?219-what-is-a-linked-product

10 Apr 2016, 4:50 PM
#5
yisou avatar

yisou

New Zenner

Join Date:
May 2009
Posts:
36
Plugin Contributions:
0

Re: How to use attributes as categories?

kobra:

You need to design a structure for your products so you can keep this straight

Then use "linking" for the other categories you create which is what the site you referenced is doing
Check "Black Eyeglasses Frames" and you will see that these are the same for blue etc and have colors other than black

https://www.zen-cart.com/content.php?219-what-is-a-linked-product

dear, would you mind teaching me the details?

tks

10 Apr 2016, 5:58 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to use attributes as categories?

It appears that the site you referenced has all products listed under "frame material > specific frame type

Enter all your products into their "specific frame material classification" cat

Create all other top cats and sub cats

Then "copy" and link your products into the other classifications

2 May 2016, 3:23 PM
#7
yisou avatar

yisou

New Zenner

Join Date:
May 2009
Posts:
36
Plugin Contributions:
0

Re: How to use attributes as categories?

I have tried linked product, and i found that can not meet my demands, 2 issues:

  1. different category display different product urls: cheap-eyeglasses-usa, and cheap-eyeglasses-usa?cPath=2&, although canonical is used. I think does not look good.
  2. i play to use different category template, and different product template, and let them display something differently. if use linked products, all are the same;

what i need is just like https://www.cheapglasses123.com . set all different attributes first, and choose some to let them have categories function, say: gender: man, women, kids; lenses: single, bifocal, progressive, shape: full rim, half rim, and rimlesss...

how to do, pls?

2 May 2016, 4:12 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to use attributes as categories?

if use linked products, all are the same;

what i need is just like https://www.cheapglasses123.com
They also all look the same - so more explanation on what you are wanting is in order
different category display different product urls: cheap-eyeglasses-usa, and cheap-eyeglasses-usa?cPath=2&, although canonical is used. I think does not look good.
That is only the url and you are not selling it - Focus on your page contents

Also a link to your site will assist in seeing what you have currently

2 May 2016, 10:19 PM
#9
yisou avatar

yisou

New Zenner

Join Date:
May 2009
Posts:
36
Plugin Contributions:
0

Re: How to use attributes as categories?

In this cases, any method to set one main category, and extra categories when add new products? if use linked products, we will cost a lot of time, because a product may belong to several different categories.

2 May 2016, 11:47 PM
#10
yisou avatar

yisou

New Zenner

Join Date:
May 2009
Posts:
36
Plugin Contributions:
0

Re: How to use attributes as categories?

if i still want to use attributes as categories, how to do, pls?

4 May 2016, 10:07 AM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to use attributes as categories?

because a product may belong to several different categories
Just as the sites you have posted do

Where is your site??

if i still want to use attributes as categories, how to do, pls?
Attributes are attributes and categories are categories
You can not make an attribute a category

4 May 2016, 11:10 PM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to use attributes as categories?

Okay, I had looked at this thread a while back and was a bit confused about what was desired to be done. The use of the plugin suggested by lat9 looks like it could help with the desired goal. In addition because you are using CEON uri mappings you can "hide" what is really going on. Basically what it appears that you want is say custom code for a page, that when a link is selected (call it what you will, a category, a filter, whatever) that only the desired product that meet criteria of that link are displayed. So...

If you had a page of some sort, maybe all products as an example, that can accept a filter or other information in the url (parameter) and perform the necessary search/filter on that information. With CEON URI, that entire url can be rewritten to the desired "text" and the page will respond as "expected". The filter will pull all of the product that meet the "desired" criteria. &attribute="red" (where red is actually an option_values_id. And then some other "criteria" as desired for the filter. So, the biggest thing (if it can be considered such is the page and the filter on that page. The uri, that comes later and is really nothing in comparison. Then the "upkeep" if you don't get something more automated installed/created is to generate new "filter" types/characteristics and then populate the ceon_uri_mapping table with the necessary information to redirect/filter.

5 May 2016, 12:14 AM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to use attributes as categories?

yisou,

While you are quick to reference other sites you have not provided your site as of yet

Please provide your site to continue this assistance