Results 1 to 9 of 9
  1. #1

    Default Added fields not searchable

    I have just installed fields via Numix mod. However the fields are not searchable. Is there a file to change for what fields to search?

    Thanks for any insight

  2. #2

    Default Re: Added fields not searchable

    Figured out one part to edit header.php but this only works for the website search. I would like it to work in the admin categories search so I can search for the product easy. What file would this need to edit and any ideas where to start. Thanks




    Here is what I added for others if needed for SKU product only. I no nothing about coding but now search at least works on the website for SKU. I only guess at what I seen in the file.

    In file includes/modules/pages/advanced_search_result/header.php

    Line 162 added
    case 'PRODUCT_LIST_SKU':
    $select_column_list .= 'p.products_sku';

    Line 169 added
    case 'PRODUCT_LIST_SKU':
    $select_column_list .= 'p.products_sku';
    break;

    Line 320 added
    LIKE '%:keywords%'
    OR p.products_sku

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Added fields not searchable

    It is so pleasing to see someone using clear logic and common sense to solving a problem. Even when they do not fully understand the methods they are using - but by looking for patterns in the code, they come up with potential solutions.

    Well, done... your efforts are a lesson to all of us...

    And thank you for coming back to this thread to show us the solution you discovered.
    20 years a Zencart User

  4. #4

    Default Re: Added fields not searchable

    I might be technically inclined, but I'm code stupid. Try things enough times and eventually you will find a solution. Heck I even learned a little bit in the process.

    Still can't get the search in the admin interface under catalog items to search the sku. Also am trying to do the same in super orders for Purchase orders with no luck. Not sure how to reference a second table, which I think is what I do not understand yet.

    Any ideas?



    Thanks

  5. #5
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Added fields not searchable

    If you still need the answer...
    admin/includes/modules/category_product_listing.php

    Add your_sku_db_field name to the $products_query_raw list

    Then add a filter at the bottom that reads:
    or p.products_YOUR_SKU_FIELD_HERE like '%" . zen_db_input($_GET['search']) . "%'
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  6. #6

    Default Re: Added fields not searchable

    Hi Twitch Too,
    Thanks for posting this even though it was really old! I still need to get this working. I will try it out this weekend.

  7. #7

    Default Re: Added fields not searchable

    Twitchtoo you are the man. I got this working with what you posted and did some other stuff with it that was pretty cool (at least I think) here is the page I posted on zencart to try and help someone else out with this topic if they need it Link to Zencart post.

  8. #8

    Default Re: Added fields not searchable

    Oh FYI I am sending you a donation for helping me out on this as well! Thank you!

  9. #9
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Added fields not searchable

    Quote Originally Posted by jpietrowiak View Post
    Oh FYI I am sending you a donation for helping me out on this as well! Thank you!
    Greatly appreciated thank you!
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

 

 

Similar Threads

  1. v154 Product ADDED but not searchable? - WHAT DID I DO WRONG
    By Jeff_Mash in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 24 Aug 2015, 03:20 PM
  2. Order Process vs added fields
    By sappster in forum Managing Customers and Orders
    Replies: 0
    Last Post: 3 Nov 2011, 05:18 PM
  3. Added new product fields successfuly -Name of field not showing
    By musicnow in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 21 Jan 2011, 06:45 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