User Tools

Site Tools


Sidebar

magento_2:product_parts_finder

For more details see the Product Parts Finder for Magento 2 extension page.

Product Parts Finder for Magento 2

Enhance your store with the extended search options:

  • Create year-make-model and similar filters
  • Display part finders on home and category pages
  • Add multiple select options to each filter
  • Import values for finder options
  • Customize filter display

Create a new Product Parts Finder

To create a new product parts' Finder, navigate to in Catalog > Product Finder > Press Add New Item Button

Specify Title and a Number of Dropdowns.

Consider, that you can specify number of dropdowns only in this form. The other suggested fields will be available for editing afterwards as well.

Hit Save and Continue Edit to proceed.

Edit a Product Parts Finder

  • Title - Finder block name.
  • Template - Choose the Finder block layout from a dropdown. Can be set either as vertical or horizontal (which is responsive and set by default).
  • Custom Destination URL - determines the page to which the Finder will redirect customers when the Find button is pressed.
  • Add Finder to the Default Category - Set to Yes to manage a proper work of a finder at the home and CMS pages.
  • Add Finder to the Search Page - Set to Yes to display finder on a search result page.

  • Categories - Multi-select categories.
  • Add the finder block in - Specify where to display a finder block: a sidebar, content, or footer.
content sidebar.main

  • Code for inserting - the code for inserting in CMS block, which in its turn can be added to CMS page.
Go to Content > Block > Click Add New Block. Paste a code.
  • Code for inserting in Layout Update XML - the code for inserting in Layout Update XML.
To add a product parts finder to a category manually, navigate to Catalog > Categories > Select your category (i.e. Wheels). In the Design section find Layout Update XML field and paste the code there.

There is no limit to the number of dropdowns in a single Finder block.

  • Name - the dropdown name that will be displayed on the storefront.
  • Sort - select a sorting method for data in dropdown.
  • Range - if you enable this option and then import the data for this drop-down using ranges like “2006-2017” in CSV, the Finder will automatically create rows for each individual value in the range.
Please, note that Range will only work for data you import after the Range option is enabled.

Range

By enabling Range in the dropdown settings you'll be able to automatically generate records for numeric data, like a list of years.

Now, when you import a CSV or XLS file you can simply define a range like “2001-2017” and it will generate 17 records automatically when the file is imported.

Here's how the CSV example may look like: Make1,Model1,“2001-2017”,SKU1

The example above will create 17 records in the Finder database which will differ only by the Year value.

Add Products to a Finder

There are three ways to add products to a Finder:

  • manually fulfill product forms;
  • create and import a CSV file;
  • create and upload a CSV file to a specific folder in the Magento directory.

Manually

To add a new product parts' finder manually, go to Catalog → Product Parts Finder → Edit Parts Finder → Products

Click Add New Product button to fulfill a product form.

Import via CSV file

You can import records to the finder with CSV files.

To add a new product parts' finder via import, go to Catalog → Product Parts Finder → Edit Parts Finder → Import

Deciding on CSV format is very simple: count the number of dropdowns you have and add one more for the SKU column. For example, if you have three dropdowns, adding one makes it four-column CSV.

Below you can see an example CSV file with the data containing all the variations for Make, Model and Diameter and assign these variations to products in Magento Catalog.

Open the Import tab, drag and drop the CSV file and hit Import. After the import is done, hit the Save and Continue Edit button.

Import from the folder

This variant is useful when you want to import a large file which your web-server might not allow to upload due to size restrictions.

To import files from a folder, you should put the file to the following directory: /magento_folder/pub/media/amasty/finder/ftp_import/finder_id/

Please note that the finder_id part in the path should be replaced with the ID of the Finder you want to import the file into. After the file upload is done, open the Import tab and the file you've uploaded will appear ready to import.

Extension Settings

You will find the settings menu at Stores > Configuration > Amasty Extensions > Product Parts Finder

  • Display `Find` button when - this setting controls when the Find button will be displayed: after picking options in all dropdowns or after picking the first.
  • Use `universal` products - enables and disables Universal products in one click.
  • Show `universal` products last - when enabled, Universal products will be put at the end of filtered results.
  • Apply filter for current category only - useful when you have one Finder instance across the whole store. When enabled, filtering parameters will be reset when a customer browses different categories.
  • Custom Destination URL - Find button will redirect to the page specified in this setting. It can be set individually for each Finder instance.
  • Start search when value in the last dropdown is selected - when enabled, the Finder will automatically initiate filtering once value in the last dropdown is selected.
  • Reset finder to - sets the destination of Reset button.
  • Clear other (previous) finders conditions - when enabled and you have more than one Finder on the page, only selection in the active instance will apply filtering, all other Finders will be reset.
  • Redirect to product page when there is only one product in result - When there is only one position in the search results, it is possible to redirect straight to the product page. Instead of displaying the list with one item, you can lead the customers to a wanted product.
  • Enable 'Chosen' plugin - Set to Yes to apply responsive user-friendly design for parts finder.

With a plugin
  • Display Compatible Options At The Product Page - Enable the feature to display a compatibility tab on a product page. The tab displays all the finder's options, the product is compatible with. The tab is active on the product pages after a search by Finder.

A sample of a compatibility tab

  • Import history lifetime (days) - sets the lifetime of import error log.
  • Max rows per import - a batch size in lines which the import script will try to process during one run.

API support

API support implies that you can utilize Magento web API functionality. You can find more information on Magento site.

DropdownRepositoryInterface

  • save(\Amasty\Finder\Api\Data\DropdownInterface $dropdown) - saves a dropdown;
  • getById($id) - gets a dropdown by ID;
  • getDropdownModel() - gets a dropdown's model;
  • getByFinderId($finderId) - gets a dropdown by Finder ID;
  • delete(\Amasty\Finder\Api\Data\DropdownInterface $dropdown) - deletes a dropdown;
  • deleteById($id) - deletes a dropdown by ID;
  • getList() - gets a list of all dropdowns.

FinderRepositoryInterface

  • save(\Amasty\Finder\Api\Data\FinderInterface $finder) - saves a finder;
  • isDeletable($mapId) - checks if a finder is deletable;
  • getById($id) - gets a finder by ID;
  • importUniversal($finder, $file) - imports Universal Products;
  • getFinderModel() - gets a finder's model;
  • addConditionToProductCollection($collection, $valueId,$countEmptyDropdowns, $finderId,$isUniversal,$isUniversalLast) - sets a filtration;
  • getWithoutId($id) - gets all the finders without a current;
  • delete(\Amasty\Finder\Api\Data\FinderInterface $finder) - deletes a finder;
  • deleteByIds($ids) - deletes various finders by IDs;
  • deleteById($id) - deletes a finder by ID;
  • getFindersByIds($ids) - gets various finders by IDs;
  • getList() - gets all the finders by the list;
  • updateLinks() - updates links to dropdowns in a database;
  • getFindersOnDefaultCategory() - gets finders for display on a default category;
  • getFindersCategory($categoryId) - gets finder for a current category;

MapRepositoryInterface

  • save(\Amasty\Finder\Api\Data\MapInterface $map) - saves a mapping;
  • saveMap($valueId, $sku) - saves with updated data;
  • getById($id) - gets a mapping by ID;
  • getByValueId($id) - gets a mapping by value;
  • delete(\Amasty\Finder\Api\Data\MapInterface $map) - deletes a mapping;
  • deleteById($id) - deletes a mapping by ID;
  • getList() - gets a list of all mapping;

UniversalRepositoryInterface

  • save(\Amasty\Finder\Api\Data\UniversalInterface $universal) - saves a universal product;
  • getById($id) - gets a universal product by ID;
  • delete(\Amasty\Finder\Api\Data\UniversalInterface $universal) - deletes a universal product;
  • deleteById($id) - deletes a universal product by ID;
  • deleteByIds($ids) - deletes universal products by IDs;
  • getList() - gets all the universal products;

ValueRepositoryInterface

  • save(\Amasty\Finder\Api\Data\ValueInterface $value)
  • saveValue($parentId, $dropdownId, $name)
  • saveNewFinder(array $data) - saves a new finder;
  • getValueModel() - gets a model;
  • getById($id) - gets by ID;
  • getByParentAndDropdownIds($parentId, $dropdownId)
  • getByParentId($id)
  • getSkuById($newId, $finderI) - gets SKU by finder's ID;
  • delete(\Amasty\Finder\Api\Data\ValueInterface $value)
  • deleteById($id)
  • deleteOldData($finder)
  • getList()

Troubleshooter

  • The finder block should be added to the results page. Filtering will work only when the Finder block is on the same page with resulting products. If you don't want it to be displayed you can hide it with CSS, but you still need to place the block on the results page.
  • Make sure that there are products to filter on the page which the finder uses to display results. The finder works as a product filter. If there are no products to filter the Finder won't be able to do much.
Also, try our Magento 2 search filter to make shopping process even faster and simpler for visitors.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/product_parts_finder.txt · Last modified: 2018/07/26 08:09 by milosh