Re: Attributes v2 search lookup
Quote:
Originally Posted by
yellow1912
You can certainly use Zen built in attributes to do that, and it can be fast.
Here is part of the code I used:
PHP Code:
$options_ids = zen_db_input(implode("','", $options_ids));
global $db;
$products_ids = $db->Execute("SELECT products_id, options_values_id FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE options_values_id IN($options_ids)");
$attributes = array();
while(!$products_ids->EOF){
$attributes[$products_ids->fields['options_values_id']][] = $products_ids->fields['products_id'];
$products_ids->MoveNext();
}
$result = array();
foreach($attributes as $row){
if(empty($result))
$result = $row;
else
$result = array_intersect($result, $row);
}
$products_ids = implode("','", $result);
$where = "p.products_id IN('$products_ids')";
I would like to give my customer the option to select a category and the wanted attributes so only that result will be displayed.
Where do i put this code ? and is this all i need ?
Thanks alot
Re: Attributes v2 search lookup
How do I add this code to my website? I offer a lot of product design options and I really need to give my customers a way to search for product options.
Please let me know.