Forums / Setting Up Categories, Products, Attributes / Search for all products that use 1 specific attribute

Search for all products that use 1 specific attribute

Locked

Views: 1,603

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
20 Apr 2007, 4:29 PM
#1
crosswraith avatar

crosswraith

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Search for all products that use 1 specific attribute

When your webshop gets filled up with loads of items, then the search function becomes essential. I tried the search box in the admin area, but it actually doesn't
search in the attributes.:no:
A very useful feature would be if it could be possible to lets say for example:
search for all products that use the attribute Red, or size 15...:clap:

I'd not mind doing the search from the interface provided by PHPMyAdmin:cool: , but I'm unsure of the name of the column that contains all the unique attribute ID's.:lookaroun Does anyone know what column this is, and in which table it's located? For example, each unique ID should be given to each unique attribute. So if you've got only 1 attribute called: "size 15", then searching for ID 3333 would list all products that use attribute "size 15".:smile:

This would be a real timesaving and nice feature, almost critical when you have many products. :yes:

ZenCart? Oh yeah sure!

20 Apr 2007, 5:38 PM
#2
crosswraith avatar

crosswraith

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Search for all products that use 1 specific attribute

Yuppi :jump: just found out where in the DataBase this info is located.

To find out the ID that the Option Value gets, just look in the source code HTML on any page that contains that attribute-value you're searching for (example: a product that uses that attribute value).

Actually you can also get a very nice overview in this table:
zen_products_options_values
here you can see each ID every attribute-option-value has received (the value names youll recognize because you where the one that made those names).

In PHPMyAdmin you can then search for all entries that contain, let's say for example "70" in the
table called: zen_products_attributes
and in the column: options_values_id

ZenCart? Oh yeah sure!

20 Apr 2007, 6:42 PM
#3
crosswraith avatar

crosswraith

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Search for all products that use 1 specific attribute

Anyone knows how to build a SQL query that can list all products that use attribute values X and Y, but not attribute values A and B.

I tried to think of how the SQL query should be built, but until now I keep banging my head in the wall:frusty: , cause it's a bit tricky to achieve. Imagine the following:
return a list of all rows where Attribute Value is X and Y, not X, Y, B and A.::wacko:

Notice: What makes this query a bit complicated is that X, Y, B and A are never on the same row (for example each row contains either only X, Y, B OR A).

ZenCart? Oh yeah sure!

20 Apr 2007, 6:44 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Search for all products that use 1 specific attribute

"Where" do you want to do this search ... this is not a fun one by any stretch ... :blink:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

20 Apr 2007, 6:50 PM
#5
crosswraith avatar

crosswraith

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Search for all products that use 1 specific attribute

Ajeh:

"Where" do you want to do this search ... this is not a fun one by any stretch ... :blink:

Anywhere would do fine, as long as "the tool" allows me to make lists of products where Attribute Value is only X and Y (if for example the product has X, Y, B and A it should not be listed), or return a list of any products that contain Attribute Value X (can also contain other Attribute Values as well).

The lists are only for finding products with special characteristics easily and fast.

ZenCart? Oh yeah sure!

21 Apr 2007, 3:21 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Search for all products that use 1 specific attribute

Let's try this another way ...

"where", as in, the Catalog for the customer? or the Admin for you? :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Apr 2007, 3:28 PM
#7
crosswraith avatar

crosswraith

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Search for all products that use 1 specific attribute

Ajeh:

Let's try this another way ...

"where", as in, the Catalog for the customer? or the Admin for you? :smile:

Admin for me (well anywhere it's possible).

ZenCart? Oh yeah sure!

21 Apr 2007, 3:32 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Search for all products that use 1 specific attribute

This is a difficult search, to say the least ... :blink:

I will have to chew on this a bit to make it a useful search in some manner and not go wild trying to apply it in the Admin ...

NOTE: in the Catalog for the customer it is even worse ... :eek:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!