Page 13 of 17 FirstFirst ... 31112131415 ... LastLast
Results 121 to 130 of 169
  1. #121
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: product filter module addon

    HI! thanks so much for the response.

    I did do as you said...

    I defined

    define('BUTTON_IMAGE_PRODUCT_FILTER', 'button_search.gif');

    In both

    /includes/languages/english/button_names.php

    AND

    includes/languages/english/extra_definitions/template29011/product_filter_defines.php
    But my issue is that the template itself needs to call up this button and I dont know how to change the code.

    Normally its some kind of php echo zen_image type of statement - any ideas how to rewrite that one line of code?

  2. #122
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: product filter module addon

    SORTED THE BUTTON ISSUE!!!

    Besides defining your button in the files I mentioned before amend the $content .= '<br /><input type="submit"..... line to:

    something along the lines of:

    $content .= zen_image_submit ('button_search.gif',BUTTON_IMAGE_PRODUCT_FILTER);

    change to suit your image defined name and file name.

    NOW! what about the PRONGE issue mentioned above cmon guys and girls dont I deserve a bit of help just a tiny issue remaining cmon I read this thread twice

    HELPPP is coming I can feel it I can see it in the image of a lil green elf

  3. #123
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: product filter module addon

    ALL SORTED! no need for help

    My header_php.php was missing case 6:

    So instead of just adding


    $pfrom = PRANGE6_MIN;
    $pto = PRANGE6_MAX;
    break;


    I should have added

    case 6:
    $pfrom = PRANGE6_MIN;
    $pto = PRANGE6_MAX;
    break;

    What a rookie...

  4. #124
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: Zen cart product filter module

    Quote Originally Posted by Fireflyz View Post
    Thanks! exactly what I was looking for.
    Is there a way to exclude certain attributes?
    Way way back people wanted to know if there was a way to exclude certain attributes from the filter while leaving some on.

    I would like to brain storm on this and see if anyone can develop on my idea to see how to implement it in php.

    As far as I can see there are 2 main areas of code that control how attributes are called and displayed by the template module:

    In includes/modules/pages/product_filter_result/header_php.php

    PHP Code:
    $enable_attribute_filter true ;
    if(
    sizeof($option_ids)>0){
    for(
    $i=0;$i<sizeof($option_ids);$i++){
    if(!(empty(
    $option_values[$i])))
    {
    $where_str .= " AND pa.options_id = ".$option_ids[$i];
    $where_str .= " AND pa.options_values_id = ".$option_values[$i];
    }    
    }
    }

    if(
    $enable_attribute_filter){
    $where_str .= " AND p.products_id = pa.products_id ";


    But then I realised that in the process of loading the attribute dropdown menus this statement is probably irrelevant since this file controls the search/filter results and how they are displayed and not the selection of dropdown menus, its all done AFTER the sidebox has already been loaded with all the various filter options.

    So I took a look at the actual tpl file.

    PHP Code:
    /*start attributes drop down*************************************************/
        
    if(SHOW_ATTRIBUTES){
            
    $option_names $db->Execute("SELECT products_options_id,products_options_name FROM "TABLE_PRODUCTS_OPTIONS);
            while (!
    $option_names->EOF) {
            
    $options_array = array (array("id"=> """text" => $option_names->fields['products_options_name']));
            
    $option_names_values $db->Execute("select pov.products_options_values_id, pov.products_options_values_name from "TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." povp,".TABLE_PRODUCTS_OPTIONS_VALUES." pov where povp.products_options_values_id = pov.products_options_values_id AND povp.products_options_id =".$option_names->fields['products_options_id']);
                while (!
    $option_names_values->EOF) {
                    
    $options_array array_pad($options_array,sizeof($options_array )+1,array("id"=>$option_names_values->fields['products_options_values_id'],"text"=>$option_names_values->fields['products_options_values_name']));
                    
    $option_names_values->MoveNext();
                }
            
    $content .= zen_draw_pull_down_menu('options_'.$option_names->fields['products_options_id'], $options_array, (isset($_GET['options_'.$option_names->fields['products_options_id']]) ? $_GET['options_'.$option_names->fields['products_options_id']] : ''), '') . zen_hide_session_id();
            
    $option_names->MoveNext();
            }      
        }
        
    /*end  attributes drop down*************************************************/ 
    Ah ha! so from here we can see that this part of the code has functions that read through the attributes we have set up and sees their "option name ID" as is displayed on admin>>catalog>>Attribute controller>>product options on the left side under ID column.

    So the lowest ID option would be displayed first (in my case www.majesticsilver.co.uk/store) its Colour.

    Wouldnt it be great if we could break into this process and tell the template instead of calling up ALL the attributes one by one to say start from attribute ID 10, thereby masking attributes 1 to 9.

    Im not a programmer but cant we put an IF statement to enclose the whole process to say that

    IF ($option_names_values >10){

    only then start to call up the attributes.

    borrowing from the code in header_php.php

    if(sizeof($option_ids)>0){

    why not say instead

    if(sizeof($option_ids)>10){


    maybe that statement would work best

    but its clear that the Attributes ID are called as an array and incremented one by one as the function loops around until all attribute IDs are called up and displayed.

    All Im suggesting is cant we make this process start from a certain ID number thereby masking all the lower ID numbers in effect allowing us to be somewhat selective about which attributes to display.

    Im no programmer and I did try to play around with the code but seems futile exercise. Can anyone good with PHP follow up on my idea and suggest how I can revise the code in the above files to produce the desired results.

    Any input would be greatly appreciated!

  5. #125
    Join Date
    Oct 2009
    Location
    Texas
    Posts
    194
    Plugin Contributions
    0

    Default Re: product filter module addon

    Quote Originally Posted by aozhaver View Post
    ALL SORTED! no need for help

    My header_php.php was missing case 6:

    So instead of just adding


    $pfrom = PRANGE6_MIN;
    $pto = PRANGE6_MAX;
    break;


    I should have added

    case 6:
    $pfrom = PRANGE6_MIN;
    $pto = PRANGE6_MAX;
    break;

    What a rookie...
    Thank you for the compliments, sorry I was late to the party but I'm glad you got it figured out.
    Yes, I have given up on the filter by price option since it simply will not get items that are priced by attribute.
    Since the ZC core Search function does get items priced by attribute, I would think it would only be a matter of copying some of that code into this module.

    As for attribute drop downs showing Required text, I think it would be easy, for someone with php knowledge, to write an exclusion for just the Required text attribute.

    Oh, thanks for posting your button replacement code!
    Fine Jewelry For Any Budget
    Sterling Leaf Jewelry
    Rolling in the Zen

  6. #126
    Join Date
    Apr 2010
    Posts
    23
    Plugin Contributions
    0

    Default Re: product filter module addon

    Ok... I found the bit of code that controls the values of the category drop-down on the page: tpl_product_filter.php
    "/*start categories drop down*************************************************/
    if(SHOW_CATEGORIES){
    $content .= zen_draw_pull_down_menu('categories_id', zen_get_categories(array(array('id' => '', 'text' => PRODUCT_FILTER_TEXT_ALL_CATEGORIES)), '0' ,'', '1'), (isset($_GET['categories_id']) ? $_GET['categories_id'] : ''), '') . zen_hide_session_id();
    }
    /*end categories drop down*************************************************/"
    I'm an asp guy myself and know nothing of php. Anyway, how can one make the dropdown a hidden field with the value being equal to the current category.
    eg.
    "/*start categories drop down*************************************************/
    if(SHOW_CATEGORIES){
    $content .= zen_draw_hidden_field('categories_id', zen_get_categories($cPath), (isset($_GET['categories_id']) ? $_GET['categories_id'] : ''), '') . zen_hide_session_id();
    }
    /*end categories drop down*************************************************/"

  7. #127
    Join Date
    Jun 2008
    Location
    Warrenpoint, United Kingdom
    Posts
    44
    Plugin Contributions
    0

    Default Re: product filter module addon

    Followed everyones instructions but cant get this to work with my version of zen v1.3.9f on my site http://www.champagnewineonline.com

    I'm not using any attributes! ...but does anyone have a working solution for this version of zen?

  8. #128
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: product filter module addon

    Hi!

    Honestly its nothing to do with your version. I never had issues with addons because of version.

    Truth is I just realised I might have similar problem to yours.

    You say you dont use any attributes so I'm assuming you would use the filter to say filter a price range within a general category.

    This works fine for me for sub-categories but not for the top categories.

    So I can filter products based on say Rings->Cubic Zirconia
    for example for a price range 10 - 20

    but not just Rings.

    I realise the reason for this is because the Rings top category doesnt actually and directly contain any items it only contains subcategories.

    But this really sucks as its confusing since someone might want to see ALL rings in size 8 and not just rings in a specific subcategory.

    This seems to be a general problem with the way Zen Cart works and the way this add on was designed.

    Is anyone feeling me here?
    Silver Jewellery

    RESPECT to the Zen Cart Team, I'm PERFECTLY Zenned!

  9. #129
    Join Date
    Sep 2010
    Posts
    129
    Plugin Contributions
    0

    Default Re: product filter module addon

    Quote Originally Posted by wt05 View Post
    Has anyone fixed the problem of filtering subcategories?

    For example:

    All Categories - Sub -- Subsub --- Subsubsub

    The filter only works in "All Categories" and "Subsubsub" - only if Subsubsub contained products.

    Sub and Subsub will not filter if no product listed in these subcategories.
    YES!! I have same problem see my other post ABOVE



    ANY IDEAS??
    Last edited by aozhaver; 9 Nov 2010 at 12:19 PM.
    Silver Jewellery

    RESPECT to the Zen Cart Team, I'm PERFECTLY Zenned!

  10. #130
    Join Date
    Jul 2009
    Posts
    126
    Plugin Contributions
    0

    Default Re: product filter module addon

    @jabbawest please!

    Hi Jabbawest!
    I have been following this thread, not speaking english very well, so forgive me please! And i am envious at your webshop! ( at least how you use this module) Because i have no clue how you did this!
    I downloaded it, installed it and now i'm in the dark.
    I have tried but i have no idea where to go, from the basic install.
    I know it is bold, but is it not possible, for you, to write us a short manual how you managed this?? the module doesn't have any read me files.. and i feel so lost.
    I love the selecting, the dropdowns.. i could use this so well, ( and i'm sure not 'me' alone!)
    I would even pay you for it, to get it done and explain me how i can do it in the future!
    Regards
    Kern

 

 
Page 13 of 17 FirstFirst ... 31112131415 ... LastLast

Similar Threads

  1. Product filter Module: Advanced search results page not working
    By WWRepair in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 5 Mar 2013, 11:51 PM
  2. v139h 1064 SQL error in product filter addon?
    By 4jDesigns in forum All Other Contributions/Addons
    Replies: 12
    Last Post: 17 Jan 2013, 07:59 PM
  3. Product Filter Module - 1109:Unknown table 'p' in field list
    By moesoap in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 28 May 2012, 01:40 PM
  4. modified product filter / alpha filter help please
    By bn17311 in forum General Questions
    Replies: 1
    Last Post: 5 Oct 2011, 09:43 PM
  5. SQL problem with filter by attributes addon
    By daparky in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 6 Jan 2010, 10:16 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