If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Product Finder: multiple category drop-downs

Product Finder: multiple category drop-downs

Started by torvista on 5 Aug 2010, 7:08 PM · Views: 49,024

Results 201 to 220 of 225
21 Nov 2019, 6:19 PM
#201
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Product Finder: multiple category drop-downs

RacingAddiction:

I downloaded and reviewed the documentation, it looks like a great plugin.

Per my screenshot, we're (trackreadyproducts.com) selling performance seats and each seat requires a seat base, sold separately. I'd configure the plugin as in the documentation: Make - Model - Year.

I don't think it does, but as each seat base can fit multiple vehicle brands and models, is this an issue? Has anyone loaded sub-categories and sub-sub-categories with a load file? There's hundreds and hundreds of seat bases.

Thank you!
Identical products can be copied to different categories as linked products. This way only one real product exists, and is being echoed to the linked products.

3 Dec 2019, 5:41 PM
#202
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

After reviewing the documentation I can't see how/where you load the products - in my case the seat bases; they conform to the example of Make / Model / Year. Does the whole lot get loaded into the product table that's part of Subcat 3?

Attachment 18740

3 Dec 2019, 6:06 PM
#203
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Product Finder: multiple category drop-downs

subcat 3 is the year range category and the products live in that category.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

3 Dec 2019, 6:06 PM
#204
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Product Finder: multiple category drop-downs

RacingAddiction:

After reviewing the documentation I can't see how/where you load the products - in my case the seat bases; they conform to the example of Make / Model / Year. Does the whole lot get loaded into the product table that's part of Subcat 3?

Attachment 18740

I think you are thinking to complex.
First you make you top categories (for drop-down nr 1). In these you create the sub-categories for the second drop down. Next you create the third sub-categories for the third drop-down. In these last sub-categories you place your products.

3 Dec 2019, 7:06 PM
#205
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

So if there are 6 Acura models, I'd create Acura in dropdown 1 and then (for the 2nd dropdown) the 6 subcategories for each model. What I don't understand is how I load the years. From my example the year ranges are all over the map. Sorry, I'm having trouble seeing it.

3 Dec 2019, 11:02 PM
#206
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Product Finder: multiple category drop-downs

RacingAddiction:

So if there are 6 Acura models, I'd create Acura in dropdown 1 and then (for the 2nd dropdown) the 6 subcategories for each model. What I don't understand is how I load the years. From my example the year ranges are all over the map. Sorry, I'm having trouble seeing it.

You can compare it to a folder structure on a hard drive containg three layers of folders, with the third layer containing the files
Attachment 18742

3 Dec 2019, 11:11 PM
#207
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

Ok, makes sense now - you do indeed need a subcat year folder for every range.

Thank you kindly for your example!

4 Dec 2019, 6:35 AM
#208
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Product Finder: multiple category drop-downs

RacingAddiction:

Ok, makes sense now - you do indeed need a subcat year folder for every range.

Thank you kindly for your example!
You're welcome glad I could help

5 Dec 2019, 3:07 PM
#209
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

Is the Product Finder documentation current? I'm working on shaping my data for import and whilst browsing I noticed that the configuration section specifies I modify certain files:

Attachment 18745

I've looked in the folders but those files don't exist; anyone else have the same?

5 Dec 2019, 3:29 PM
#210
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Product Finder: multiple category drop-downs

you should use the files on Github

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

5 Dec 2019, 3:48 PM
#211
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

Thanks - does that mean the version on the ZC forum is outdated?

5 Dec 2019, 4:36 PM
#212
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Product Finder: multiple category drop-downs

...I've done a great deal more fettling, so much that I put it up as a separate repository for Zen4All to have a look over my code and integrate/not into what he has.

I paid for the original development, but never put it on Github, hence Zen4All has been lumbered with that maintenance task.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

5 Dec 2019, 11:32 PM
#213
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

Design75:

You can compare it to a folder structure on a hard drive containg three layers of folders, with the third layer containing the files
Attachment 18742

Using Design75's great example, I looked at my data and there are three levels of subcategories under the main one - about 40 values for Subcat1 (Make), 153 for Subcat2 (Model) and 400 for Subcat3 (Year).

The thing is, the category chains are all related, some years are present for certain models and makes but not for others. What's the most expedient way to create these levels, can you use a load file? I have DbIo.

6 Dec 2019, 8:07 AM
#214
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Product Finder: multiple category drop-downs

RacingAddiction:

Using Design75's great example, I looked at my data and there are three levels of subcategories under the main one - about 40 values for Subcat1 (Make), 153 for Subcat2 (Model) and 400 for Subcat3 (Year).

The thing is, the category chains are all related, some years are present for certain models and makes but not for others. What's the most expedient way to create these levels, can you use a load file? I have DbIo.

Yes you can use DbIo, or easypopulate 4

6 Dec 2019, 8:08 AM
#215
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Product Finder: multiple category drop-downs

torvista:

...I've done a great deal more fettling, so much that I put it up as a separate repository for Zen4All to have a look over my code and integrate/not into what he has.

I paid for the original development, but never put it on Github, hence Zen4All has been lumbered with that maintenance task.
If you put it up to GitHub, I'll do the hard work :cool:

6 Dec 2019, 9:22 AM
#216
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Product Finder: multiple category drop-downs

What's the most expedient way to create these levels
I decided to make the products master category under the products manufacturer, unrelated to the triple category search.
Then I created the categories. Manually.
Then I link each product into the relevant category. Manually.
These two add-ons are extremely useful:

https://www.zen-cart.com/showthread.php?172698-Multiple-Categories-Link-Manager-Sorted
https://www.zen-cart.com/showthread.php?180447-Multiple-Products-%28Copy-Move-Delete%29
Both of which I am up to my neck in, getting them core-ready.

Updates for price and stock do not need category information.
If you want to update product compatibility (category links) then you need to massage the source file to match your categories before using DBIO. That can be automated.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

18 Dec 2019, 7:06 PM
#217
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

We sell a variety of products and we're going to use Product Finder for the seat bases, not the entire site. Reason being is Product Finder is perfect for the seat bases to determine Make/Model/Year, but for other items such as T-shirts and Gear Bags it doesn't apply.

Is it feasible to make Product Finder only display when the user views the Seat Base master category? It's the same category as the category # value used when you configure Product Finder.

18 Dec 2019, 9:16 PM
#218
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Product Finder: multiple category drop-downs

It is possible. You could add an if statement. Something like: if categories id is ## show sidebox is true.
I am currently not ably to give you the exact code, but tomorrow i'll be behind my pc again, and will look it up for you

RacingAddiction:

We sell a variety of products and we're going to use Product Finder for the seat bases, not the entire site. Reason being is Product Finder is perfect for the seat bases to determine Make/Model/Year, but for other items such as T-shirts and Gear Bags it doesn't apply.

Is it feasible to make Product Finder only display when the user views the Seat Base master category? It's the same category as the category # value used when you configure Product Finder.

19 Dec 2019, 11:38 PM
#219
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Product Finder: multiple category drop-downs

Is anyone using Product Finder with one of Picaflor's responsive templates? We're using Sheffield Blue and ran into a potential issue, I'm not certain that the two are fighting but about the time we installed Product Finder and started using it (e.g. loading the data and trying it) we noticed the top part of the web pages were gone. Everything worked on the site but it was as if you couldn't scroll up. Anyone run into this?

Attachment 18762

20 Dec 2019, 8:21 AM
#220
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Product Finder: multiple category drop-downs

@RacingAddiction I promised you the some code.
Here it is:

Open the file \includes\modules\sideboxes\product_finder.php in a text editor like notepad++

find "$show_product_finder = true;" at the beginning of the file and add below
The numbers in the array is where you add the cPath of the categories where you want the sidebox to show. 1_4 and 1_17 are fictional.

$showCats = ['1_4', '1_17'];
if (!in_array($_GET['cPath'], $showCats)) {
   $show_product_finder = false;
}

So it looks like this

<?php
/* Product Finder module * @version 1.0.0 * @author Zen4All * @copyright (c) 2014-2019, Zen4All * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0 */
// test if box should display$show_product_finder = true;
$showCats = ['1_4', '1_17'];
if (!in_array($_GET['cPath'], $showCats)) {
   $show_product_finder = false;
}
if ($show_product_finder == true) {

  $pf_base_category = PRODUCT_FINDER_PARENT_ID; //USER defined base category
  $pf_category_depth = PRODUCT_FINDER_CATEGORY_DEPTH; //USER defined base category
//check the current page location and separate the category and subcategory cPaths into an array
  if (isset($_GET['cPath']) && $_GET['cPath'] != '') {
    $pf_cPaths = explode("_", $_GET['cPath']);
  }

//check if the current page is a possible Product Finder category to pre-populate the dropdowns with the current category id/values
  if ((int)$pf_cPaths['0'] == $pf_base_category && count($pf_cPaths) == $pf_category_depth) {
//do nothing
  } else {//otherwise it is some other category 
    unset($pf_cPaths); //this location is NOT a Product Finder category so do not pre-populate the dropdowns
  }

  require($template->get_template_dir('tpl_product_finder.php', DIR_WS_TEMPLATE, $current_page_base, 'sideboxes') . '/tpl_product_finder.php');
  $title = BOX_HEADING_PRODUCT_FINDER;
  $title_link = false;
  require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base, 'common') . '/' . $column_box_default);
}