Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    Nov 2008
    Posts
    53
    Plugin Contributions
    0

    Default Re: Attributes v2 search lookup

    Quote Originally Posted by yellow1912 View Post
    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

  2. #12
    Join Date
    Mar 2009
    Posts
    38
    Plugin Contributions
    0

    Default 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.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Database lookup, cross reference lookup, exist?
    By chowardart in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Aug 2014, 07:05 PM
  2. v150 Search script for lookup item and get price?
    By comsystics in forum General Questions
    Replies: 0
    Last Post: 17 Sep 2012, 04:15 PM
  3. UK Postcode Lookup
    By MaryF in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 7 Feb 2009, 12:42 PM
  4. UK Postcode Lookup
    By Fuzion in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 23 Jan 2008, 01:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR