Page 2 of 20 FirstFirst 123412 ... LastLast
Results 11 to 20 of 195
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,474
    Plugin Contributions
    6

    Default Re: Product Finder: multiple category drop-downs

    Another way to look at the master_categories_id is to think of your Categories as more than just navigation to Products ...

    If a Product belongs to 1 Category ... then that Category will have a categories_id that will match the master_categories_id ...

    If a Product belongs to 2 or more Categories ... then only 1 of the 2 Categories can "own" the Linked Product ... it is the Category that "owns" the Product that is the categories_id for the master_categories_id ...

    The purpose of that is for when it is not known where to go in navigation or for pricing information, such as SaleMaker, etc.

    When navigating through the Categories, the immediate Category is known, as torvista has indicated, by the $cPath ...

    To further specify the immediate Category there is the $current_category_id ... which helps in directing Products to the right Category ...

    However, sometimes, the Category ... $cPath or $current_category_id ... is not known such as on a search or random creation of Products for display ...

    This is where the $master_categories_id comes in ...

    If you do not use Linked Products, this is simple to fix, by going to the Tools ... Store Manager ... and using the:
    Reset ALL Products Master Categories ID
    to be used for Linked Products and Pricing: Reset
    Which you then want to follow up with:
    Update ALL Products Price Sorter
    to be able to sort by displayed prices: Update
    The Products Price Sorter is used to help with sorting by price without having to do all kinds of calculations in the Catalog, as this is kept current in the Admin, as Products are added/edited ...

    If you have Linked Products, then the master_categories_id may not be set right by using the update in the Store Manager, as it is updating based on the first categories_id that is found in the products_to_categories table ... and that table is ordered by categories_id ...

    So if a Linked Product is linked to categories_id 23 and then to categories_id 3 ... categories_id 3 would be picked for updating the master_categories_id ...

    Now, if you can run the Update Master Categories ID and then go to Catalog ... Categories/Products ... you will see an C for Copy on the Products ... hit the Multiple Categories Link Manager ...

    At the bottom of the screen, you will see a place to update all of the Products in a Category to use that categories_id as its master_categories_id ...
    Reset ALL Products in the selected Category to use the selected Category as the new Master Categories ID ...
    Example: Resetting Category 22 would set ALL Products in Category 22 to use Category 22 as the Master Category ID
    Reset the Master Categories ID for All Products in Category:
    You can always set the master_categories_id yourself when editing the Product ...

    NOTE: the option for setting the master_categories_id is only available if the Product is in 2 or more Categories and then you can only choose from those Categories ...

    NOTE: always backup your database before using these features ...

    NOTE: it is better to have a wrong master_categories_id than no master_categories_id where the master_categories_id is set to 0 ... you can always clean these up ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

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

    Default Re: Product Finder: multiple category drop-downs

    Thanks for the help torvista and ajeh. I thought I had the product finder set but find now that I do not.

    My problem is it installed ok but nothing is appearing as shown in the readme file. In other words the product finder does not appear to be working. I have gone over the install and see no problems there.

    I am using a site template, will that or can that cause a problem. I guess I am confused on the category and sub category setup. A block diagram would help me being a retired tech.


    jerr

  3. #13
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,992
    Plugin Contributions
    29

    Default Re: Product Finder: multiple category drop-downs

    nothing is appearing as shown in the readme file
    The images in the readme are from my site, yours wont look like that.

    If you have three drop downs in which 2 and 3 auto-update and you can search the categories and it produces a results page it is working.

    "If at first you don't succeed - use the classic template"

    or better still, make a copy of it for occasions like this where you don't know if the problem is the mod or your template.
    Use the classic copy as a testbed.

    If it does not work, the install is not correct. Check the reported files sizes of uploaded files.

    You have not actually said what the problem is.
    Link to your site?

  4. #14
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,992
    Plugin Contributions
    29

    Default Re: Product Finder: multiple category drop-downs

    Another way to look at the master_categories_id is to...

    Thanks for that answer Ajeh, it looks like it should be in a wiki not buried here.

  5. #15
    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

    You have not actually said what the problem is.
    Link to your site?
    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

  6. #16
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,992
    Plugin Contributions
    29

    Default Re: Product Finder: multiple category drop-downs

    It would be putting the cart before the horse to build your categories so this mod works with them.

    All I can say is to repeat what I have stated earlier as to how my site is arranged and how this mod works with it.
    If that does not square with your plan, then mod the mod (or get someone to do it).

    My Top-level categories are:

    1 - Manufacturers: all my products are defined here (master cats) and structured in subcategories reflecting the manufacturers product families and how my invoicing software is set up in the hope that one day they will be connected....
    Note that this has nothing to do with the usual Zen Cart manufacturers information which is treated apart. I use a custom sidebox to display this category similarly to the standard Manufacturers sidebox but it works better (in my opinion).

    2 - Products: the "traditional" idea of type-of-product categories. Everything here is linked from the Manufacturers section.
    I use a custom sidebox which shows only the first level of description, subcategory navigation is done on the main page content.

    3 - Your Bike
    subcat1:eg. Aprilia
    subcat2:eg. Pegaso
    subcat3:eg. 2003-2005
    Everything here linked from the Manufacturers section.

    I use the Product Finder to give me drop down selects for subcat1, subcat2 and subcat3. So note that there are four category levels in use with the Product Finder.

  7. #17
    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 ?

  8. #18
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,992
    Plugin Contributions
    29

    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.

  9. #19
    Join Date
    Aug 2010
    Posts
    30
    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???

  10. #20
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,992
    Plugin Contributions
    29

    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

 

 
Page 2 of 20 FirstFirst 123412 ... 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

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