Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 52
  1. #31
    Join Date
    Apr 2008
    Posts
    121
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    Quote Originally Posted by rajoo.sharma View Post
    It may not be appropriate for everyone, but I think it can be very simple. Do not add any extra text boxes for custom fields for example products_author.

    1. includes/modules/pages/advanced_search_result/header_php.php

    Find:
    $where_str .= "(pd.products_name LIKE '%:keywords%'

    After:

    OR p.products_model
    LIKE '%:keywords%'

    Add:
    OR p.products_author
    LIKE '%:keywords%'

    2. includes/languages/your_template/advanced_search.php

    Replace:

    define('HEADING_SEARCH_CRITERIA', 'Choose Your Search Terms');

    with:

    define('HEADING_SEARCH_CRITERIA', 'Title, Author, ISBN/ISSN');
    I have tried this, and other things, but can't get it to work. I added a field named "item_number" to my products table, and just want to make that searchable - I am running v1.3.8a

    Thanks

  2. #32
    Join Date
    Aug 2009
    Posts
    137
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    z3n,
    I have tried this, and other things, but can't get it to work.
    I didn't get that, you meant you searched for a value stored in the field you added? and it didn't return that?

    Since it is simple and should work without any problem, I'm not able to guess what went wrong.

    Please zip all the files in which you made changes with a comment and attach them here, I'll check it at my end.

    Rajeev Sharma

  3. #33
    Join Date
    Sep 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    I have managed to implement custom advanced search which search to and from (like price), I had to add some additions to th JS file also to stop the popup message causing an error....

    My problem is I have alot of custom fields and I need to implement an if or case statement that will prevent all of my new fields showing up if they are not there(empty). I have customized the product listing page to do this, but the header_php (advanced search result page) file is set up differently.

    in the product listing i have achieved it like this

    case 'PRODUCT_LIST_D':
    if ($listing->fields['products_D']=='0') {
    //hide image column
    $lc_text = '';
    $lc_align = '';
    $params= 'class="productListing-invis"';
    } else {
    $lc_text = '<div title="D (mm)">' . $listing->fields['products_D'] . '</div>';
    $lc_align = 'right';
    $params= 'class="productListing-heading"';
    $zc_col_count_description++;}
    break;


    however it is stuctured completly differently in header_php


    case 'PRODUCT_LIST_D':
    $order_str .= "p.products_D";
    break;

    etc

    Has anyone customized the advanced search result to do this? EG not show empty custom fields/columns.....

  4. #34
    Join Date
    Sep 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    What I think I need to do is use the php unset function to take out fields from the array if the result has no value....

    Below i am trying to take out AP

    - Its not working



    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
    'PRODUCT_LIST_THREAD_M' => PRODUCT_LIST_THREAD_M,
    'PRODUCT_LIST_D' => PRODUCT_LIST_D,
    'PRODUCT_LIST_L' => PRODUCT_LIST_L,
    'PRODUCT_LIST_H' => PRODUCT_LIST_H,
    'PRODUCT_LIST_AP' => PRODUCT_LIST_AP,
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);




    if ($listing->fields['AP']=='0')

    {
    unset($define_list ['PRODUCT_LIST_AP']);
    }



    - I think I need to change $listing->fields to something but dont know what - I know it is $product_info->fields on product info pages etc but dont know on this one. If there is a better way then, please let me know the solution...
    Last edited by Bikeforce; 13 Apr 2010 at 05:35 PM.

  5. #35
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Advanced Search - customized product fields?

    Has anyone managed to get this to work?

    I have added a UPC, ASIN, PID, SKU & Even a Vendor SKU product field to my Products Info Page using custom fields.

    Can see it here

    My customers can search and get exact match for UPC, ASIN, PID, SKU and other hidden fields that I am testing to further categorize product without creating categories.

    Is this what you are trying to do?

  6. #36
    Join Date
    Sep 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    I dont know if your question was addressed at me but I still would like any ideas regarding my situation.

    I have successfully customized advanced search

    http://www.fastenerforce.co.uk/

    however the results page runs from the product listing template - which should display css-column collapse - it does in the product listing but the advanced search list columns arent registering it and displaying empty columns which is clunky......

  7. #37
    Join Date
    Oct 2008
    Posts
    1
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    Hi

    I am also trying to amend the search function. I am working on a site that sells tyres. Tyres have certain characteristics that are used when searching for the tyres for your vehicle:
    Width
    Profile
    Wheel Size
    Load Index
    Speed Rating

    I have created a new table PRODUCTS_TYRES with products_id as the key and then products_width, products_profile, products_wheel_size, products_load_index, products_speed_rating as fields within the table.

    I do not want to search on any of the traditional search variables as these are not required.

    I believe that I have created the correct result array and that the array is sorted alphabetically. I have created the SELECT, FROM and WHERE strings.

    However when I try the page, using just the width search term (I will add the code for the other fields once I know that is working correctly) I get an error message that "At least one of the fields in the search form must be entered".

    Here is the page:
    http://www.tyrexchange.co.uk/index.p...dvanced_search

    Has anybody got any ideas that may help me as I have been scratching my head on this for two days now?

    Thanks in advance

    Mike

  8. #38
    Join Date
    Sep 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    I had this problem, cant remember but think you add your fields at the top eg.

    (isset($_GET['s_dfrom']) && !is_numeric($_GET['s_dfrom'])) &&
    (isset($_GET['s_dto']) && !is_numeric($_GET['s_dto']))&&


    think you add your code at the top. You could delete the message stack or add your own custom ones eg...

    if (($L_D_check_error == false) && is_numeric($L_dto) && is_numeric($L_dfrom)) {
    if ($L_dfrom >= $L_dto) {
    $error = true;

    $messageStack->add_session('search', " L (mm) From value should be less than L (mm) To value");
    }
    }

  9. #39
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: Advanced Search - customized product fields?

    help!

    I've followed zvenson code from earlier in this thread but it doesn't seem to be working for me.
    The biggest issue seems to be the extra table I have isn't be included in the sql query (I'm echoing it to the page for testing).

    I have an extra table with a product_id which matches products table id's, each record has an extra field called p_added_make which is what I'm searching against.


    USING(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )
    LEFT JOIN " . TABLE_ADDED_FIELDS. " pu
    ON pu.products_id= p2c.products_id

    LEFT JOIN " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd
    ON mtpd.products_id= p2c.products_id
    AND mtpd.language_id = :languagesID";


    on the site the extra table is not appearing in the query.


    USING(manufacturers_id), z_table_products_description pd, z_table_categories c, z_table_products_to_categories p2c ) LEFT JOIN z_table_meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1


    the table prefix is correct (TABLE_ADDED_FIELDS) but am I missing something else.

    Should there be something in the SELECT DISTINCT part of the query?

  10. #40
    Join Date
    Jul 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Advanced Search - customized product fields?

    Quote Originally Posted by Bikeforce View Post
    I dont know if your question was addressed at me but I still would like any ideas regarding my situation.

    I have successfully customized advanced search

    http://www.fastenerforce.co.uk/

    however the results page runs from the product listing template - which should display css-column collapse - it does in the product listing but the advanced search list columns arent registering it and displaying empty columns which is clunky......
    Hy, indeed youhave customized advanced search.Can you share with us how this is done?
    Thank you!

 

 
Page 4 of 6 FirstFirst ... 23456 LastLast

Similar Threads

  1. v139h Custom Advanced Search Fields
    By divinelighting in forum General Questions
    Replies: 0
    Last Post: 27 Jul 2012, 08:22 PM
  2. Modify Advanced Search Fields
    By JimRoster in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 9 Oct 2011, 07:41 AM
  3. Modifying the Advanced Search Form Fields?
    By uruharacosplay in forum General Questions
    Replies: 0
    Last Post: 4 Mar 2008, 06:43 PM
  4. Modify Advanced Search Fields
    By icebox500 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Aug 2007, 10:20 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