Page 1 of 2 12 LastLast
Results 1 to 10 of 225

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    5
    Plugin Contributions
    0

    Default Re: Product Finder: multiple category drop-downs

    Quote Originally Posted by Jerr View Post
    Thanks Torvista. I do not have the site posted publicly yet, I am using my PC as a server until I have it developed.

    I will try the classic and see if it works there for me. If not then I will go over the install again.

    Basically my problem is how to input data, "category1, category2, category3" or "category, sub-category, sub-category- sub-category, product". I hope that makes sense.

    jerr
    Hi to all.
    I have the same problem like JERR
    -how to input data? : "category1, category2, category3" or "category, sub-category, sub-category- sub-category, product".
    Is anybody here to explain how ?

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,826
    Plugin Contributions
    31

    Default Re: Product Finder: multiple category drop-downs

    This mod uses a category set-up like this

    top-category -
    sub-category level 1 -
    subsub-category level 2 -
    subsubsub-category level3 which contains the product

    Each subcategory is a drop-down.

  3. #3
    Join Date
    Aug 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: Product Finder: multiple category drop-downs

    !!! IMPORANT...you HAVE to have a product listed for the Main Cat or Subcats to pick up!!!

    I thought it wasn't working either until I added a product to my site....it works great now.




    Torvista, does yours show up the same in ALL browsers(chrome/FF/IE) my drop-down menus move around in different browsers.........any idea why???

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,826
    Plugin Contributions
    31

    Default Re: Product Finder: multiple category drop-downs

    !!! IMPORANT...you HAVE to have a product listed for the Main Cat or Subcats to pick up!!!
    Can you explain that in a different way, I don't understand.
    Do you mean the product has to be enabled or it has to exist in another category?

    Browsers: The code formatting and accompanying css in the original version available for download is somewhat "inelegant".
    I have since cleaned it up a bit which (illogically) fixed an issue with the main search at the end of the bar requiring a significant negative top margin in IE6 and IE7 to line it up correctly
    I did not have any problems with other browsers though.
    Your page width may cause overflow issues.

    Updated code:
    PHP Code:
    <!--BOF Product Finder-->
    <div class="clearBoth"></div>
    <div id="product_finder_wrapper">
      <div id="product_finder">
        <?php 
         
    echo "<form action=''>";            
    ?>
        <ul>
          <?php
       
    echo "<li>";
       
    $model1[]=array('id'=>'','text'=>TEXT_PLEASE_SELECT);
         if(isset(
    $_REQUEST['cPath1'])){
         
    $value=$_REQUEST['cPath1'];
         }     
         echo 
    '<span id="pf_title">'.strip_tags(TEXT_FIND_ALL_PRODUCTS).'</span>
         <span class="pf_selectbox_name">'
    .TEXT_MAKE '</span>' zen_draw_pull_down_menu('cPath1',array_merge($model1,zen_get_category_tree()),$value'id="cPath" class="searchSelectClass"'); 
         echo 
    "</li>";
       
        echo 
    "<li>";   
        echo 
    "<noscript>";
        echo 
    zen_my_image_submit(PF_NOSCRIPT_SUBMIT);
    //echo zen_draw_input_field("submitButton","Go",'','submit');
             
    if($_REQUEST['cPath1']!=""){
                   
    $value=$_REQUEST['cPath1'];
                   
    $dropdownArray=zen_get_category_tree($value);
             }
    echo 
    "</noscript>";
    echo 
    "</li>";      

    echo 
    "<li>";
          
    $modulePath="".DIR_WS_CATALOG;
          echo 
    zen_draw_hidden_field('basemodulepath',$modulePath,'id="basemodulepath" ');
         
    $model=array();
         
    $model[]=array('id'=>'',
                         
    'text'=>TEXT_PLEASE_SELECT
                         
    );
           if(
    $_REQUEST['cPath1']!=""){
            
    $model=array_merge($model,$dropdownArray);
            }
        if(isset(
    $_REQUEST['select_model'])){
        
    $value=$_REQUEST['select_model'];
        }
         echo 
    '<span class="pf_selectbox_name">' TEXT_MODEL .'</span>' 
         
    zen_draw_pull_down_menu('select_model'$model$value,  'id="select_model" class="searchSelectClass"'); 
    echo 
    "</li>";

    echo 
    "<li>";
    echo 
    "<noscript>";
    if(
    $_REQUEST['select_model']!=""){
                   
    $value=$_REQUEST['select_model'];
                   
    $dropdownArray=zen_get_category_tree($value); 
             }
    echo 
    zen_my_image_submit(PF_NOSCRIPT_SUBMIT);         
    //echo zen_draw_input_field("submitButton","Go",'','submit');
    echo "</noscript>";
    echo 
    "</li>";

    echo 
    "<li>";
         
    $year=array();
         
    $year[]=array('id'=>'',
                         
    'text'=>TEXT_PLEASE_SELECT
                         
    );
          if(
    $_REQUEST['select_model']!=""){
            
    $year=array_merge($year,$dropdownArray);
            }                                  
    if(isset(
    $_REQUEST['cPath'])){
              
    $value=$_REQUEST['cPath'];
    }
    if(
    $_REQUEST['select_model']!=""){
         echo 
    '<span class="pf_selectbox_name">' TEXT_YEAR '</span>' 
         
    zen_draw_pull_down_menu('cPath',$year $value,  'id="select_year" class="searchSelectClass"');
         }
    else {
         echo 
    '<span class="pf_selectbox_name">' TEXT_YEAR .'</span>' .
         
    zen_draw_pull_down_menu('cPath22',$year $value,  'id="select_year" class="searchSelectClass"');
    }     
    echo 
    "</li>";

    echo 
    "<li>";
    echo 
    "<noscript>";
    if(
    $_REQUEST['cPath']!=""){
             
    $value=$_REQUEST['cPath'];
             }
    echo 
    zen_my_image_submit(PF_NOSCRIPT_SUBMIT);
    echo 
    "</noscript>";
    echo 
    "</li>";
    ?>
    </ul>
        </form>
        <div id="navMainSearch">
          <?php require(DIR_WS_MODULES 'sideboxes/search_header.php'); ?>
        </div>
        <!--close navMainSearch div--> 
      </div>
      <!--close product_finder div--> 
    </div>
    <!--close product_finder_wrapper div-->
    <div class="clearBoth"></div>
    <!--EOF Product Finder-->
    Updated style_product_finder.css
    Note this is MY unadulterated css with white text, I include it so you can edit the correct selectors.

    @charset "utf-8";
    /* CSS Document */
    /*styles for Product Finder mod*/
    #product_finder_wrapper {
    background-image:url(../images/background_bg.gif);
    background-repeat:repeat;
    margin:0 auto;
    width:960px;
    padding:10px 0 0 0;
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: white;
    }
    #product_finder {
    background-image: url(../images/search_bar.png);
    background-repeat:no-repeat;
    height:41px;
    width:100%;
    padding:8px 0 0 0;/*otherwise text is top-aligned*/
    font-weight:bold;
    color:#FFFFFF;
    }
    #product_finder ul {
    }
    #product_finder ul li {
    list-style:none;
    float:left;
    margin-right:10px;/*space between the drop-down items*/
    }
    #pf_title {/*"Show Products for..."*/
    font-weight:bold;
    font-family:arial;
    font-size:14px;
    color:#FFFFFF;
    margin-right:5px;
    }
    .pf_selectbox_name {/*text in front of drop-down select box*/
    font-weight:bold;
    font-family:arial;
    font-size:13px;
    color:#FFFFFF;
    margin-right:2px;/*space beween the drop-down name and the drop-down box*/
    }
    #navMainSearch {
    float: right;
    }
    regards
    Steve

  5. #5
    Join Date
    Sep 2010
    Location
    California
    Posts
    22
    Plugin Contributions
    0

    Default Re: Product Finder: multiple category drop-downs

    I am using V 1.3.9e, I have no other mods at this time.

    I think I understand the input structure but what I am not getting is the drop down options.

    All I see is this just below the header:

    -----------------------------------------------------------------------
    Powered by Zen Cart :: The Art of E-Commerce [home link]
    Sales Message Goes Here

    * Make * Model * Year
    -----------------------------------------------------------------------
    What I have for structure right now for testing is.

    3 master cats: Make Model Year

    At the Year level I have 3 Sub Cat: test1 test2 and test3

    IN sub cat 3 or test3 , I have added 3 products; test1 test2 test3.
    ---------------------------------------------------------------------
    What I can do is go ahead and post this structure online in a non working shop to see if that will help me with advice. I will do this on Monday unless I get the answer I need before then.

    Jerr Thank you in advance

  6. #6
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,826
    Plugin Contributions
    31

    Default Re: Product Finder: multiple category drop-downs

    the structure is correct, have you changed the start category in the code to match the year master cat number?
    (I will not be replying further for 3 days, on a trip.)

  7. #7
    Join Date
    Sep 2010
    Location
    California
    Posts
    22
    Plugin Contributions
    0

    Default Re: Product Finder: multiple category drop-downs

    Quote Originally Posted by torvista View Post
    the structure is correct, have you changed the start category in the code to match the year master cat number?
    (I will not be replying further for 3 days, on a trip.)
    Hmmm

    I have changed the code for the Make cat, no others.
    Make is my first or master cat.?

    Thanks for the reply

  8. #8
    Join Date
    Aug 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: Product Finder: multiple category drop-downs

    Quote Originally Posted by Jerr View Post
    I am using V 1.3.9e, I have no other mods at this time.

    I think I understand the input structure but what I am not getting is the drop down options.

    All I see is this just below the header:

    -----------------------------------------------------------------------
    Powered by Zen Cart :: The Art of E-Commerce [home link]
    Sales Message Goes Here

    * Make * Model * Year
    -----------------------------------------------------------------------
    What I have for structure right now for testing is.

    3 master cats: Make Model Year

    At the Year level I have 3 Sub Cat: test1 test2 and test3

    IN sub cat 3 or test3 , I have added 3 products; test1 test2 test3.
    ---------------------------------------------------------------------
    What I can do is go ahead and post this structure online in a non working shop to see if that will help me with advice. I will do this on Monday unless I get the answer I need before then.

    Jerr Thank you in advance

    Do you have modellist.php in your root folder?

    No offense but you do have all the TEMPLATE files under "your own" template directory?
    Last edited by sonik_fury; 17 Sep 2010 at 08:13 AM.

  9. #9
    Join Date
    Sep 2010
    Location
    California
    Posts
    22
    Plugin Contributions
    0

    Default Re: Product Finder: multiple category drop-downs

    Quote Originally Posted by sonik_fury View Post
    Do you have modellist.php in your root folder?

    No offense but you do have all the TEMPLATE files under "your own" template directory?
    This may be what has me confused, I have TEMPLATE located here:

    catalog/includes/templates/TEMPLATE

    Also catalog is my root directory or should be so I have modellist.php located there.

    This is the current url: http://localhost/zencart/catalog/


    jerr

  10. #10
    Join Date
    Aug 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: Product Finder: multiple category drop-downs

    Quote Originally Posted by torvista View Post
    Can you explain that in a different way, I don't understand.
    Do you mean the product has to be enabled or it has to exist in another category?

    When I originally installed this on a new site with no product, I had the drop down menu, but nothing would populate them. I had all categories set up/defined but no product added yet........without product the drop-down menu's will not populate. As soon as I added the very first product the drop-down menu's began working, for the categories with product listed. So the product has to exist/be enabled to work. If your testing this on a site with no product added yet it won't populate the drop-down menus. Kinda obvious but, I thought it worked based on category structure, while that's true there has to be product in said categories.


    And thanks I'll try the CSS stuff tonight.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Product Quantities as Drop Downs?
    By ehdesign in forum General Questions
    Replies: 3
    Last Post: 25 Jun 2011, 06:21 PM
  2. 2 questions on tab category drop downs
    By deemurphy in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Apr 2010, 02:29 PM
  3. I'm new ~ Trying to enter product with several drop downs
    By skirch in forum General Questions
    Replies: 2
    Last Post: 25 Mar 2009, 01:24 AM
  4. Category Heading - can't remove w/drop downs
    By Terry111 in forum Basic Configuration
    Replies: 3
    Last Post: 20 Sep 2008, 09:46 PM

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