Year Make Model Search 1.0.12  


With this plugin store visitor can search for a product (usually a replacement part) that applies to specific vehicle.
For example if the product is a car bulb the visitor can select car make and model in the YMM selectors box.
Then he will be redirected to the search results page where all matching products will be listed.




Index:


Installation

1) Wordpress dashboard -> Plugins -> Add New
Click the "Upload Plugin" button (screenshot)
Select the ymm.zip file and click the "Install Now" button (screenshot)

Also you can install it manually.
Unzip the ymm.zip archive and upload 28 new files into "wp-content/plugins" directory of WordPress:

wp-content/plugins/ymm-search/Block/Adminhtml/Product/Edit/Restriction.php
wp-content/plugins/ymm-search/Block/Adminhtml/Ymm/Selector.php
wp-content/plugins/ymm-search/Block/Product/View/Tabs/Restriction.php
wp-content/plugins/ymm-search/Block/Selector.php
wp-content/plugins/ymm-search/Controller/Adminhtml/Ymm/Selector.php
wp-content/plugins/ymm-search/Controller/Product.php
wp-content/plugins/ymm-search/Controller/Selector.php
wp-content/plugins/ymm-search/etc/config.php
wp-content/plugins/ymm-search/i18n/languages/ymm-search.pot
wp-content/plugins/ymm-search/Model/Db/CsvImportHandler.php
wp-content/plugins/ymm-search/Model/Db.php
wp-content/plugins/ymm-search/readme.txt
wp-content/plugins/ymm-search/Setup/Install.php
wp-content/plugins/ymm-search/uninstall.php
wp-content/plugins/ymm-search/view/adminhtml/templates/ymm/selector.php
wp-content/plugins/ymm-search/view/adminhtml/web/product/edit/main.css
wp-content/plugins/ymm-search/view/adminhtml/web/product/edit/main.js
wp-content/plugins/ymm-search/view/adminhtml/web/ymm/main.css
wp-content/plugins/ymm-search/view/frontend/templates/horizontal_selector.php
wp-content/plugins/ymm-search/view/frontend/templates/product/view/tabs/restriction.php
wp-content/plugins/ymm-search/view/frontend/templates/selector.php
wp-content/plugins/ymm-search/view/frontend/web/main.css
wp-content/plugins/ymm-search/view/frontend/web/main.js
wp-content/plugins/ymm-search/view/frontend/web/product/restriction.css
wp-content/plugins/ymm-search/Widget/HorizontalSelector.php
wp-content/plugins/ymm-search/Widget/Selector.php
wp-content/plugins/ymm-search/ymm-search.php
wp-content/plugins/ymm-search/ymm_ajax.php


2) Activate YMM plugin in:
Wordpress dashboard -> Plugins
(screenshot)

3) Add it with a Shortcode Block (if your theme supports blocks):
Wordpress dashboard -> Appearance -> Editor -> select template -> select page
Add a Shortcode block with the following shortcode:

  [ymm_selector template="horizontal_selector.php"]


(screenshot)

Or add it as a widget (if your theme supports widgets):
Wordpress dashboard -> Appearance -> Widgets
(screenshot)

4) Add restriction to a product:
Go to Wordpress dashboard -> Products
Select any product or create a new one.
In the YMM tab of the Product Data section add a restriction like:

Acura, CL, 2003, 2005
Jeep, Cherokee, 2001, 2002

(screenshot)

NOTE: For more information read the Restriction format section.

Click the "Update" button to save the product.

5) Check the result on front-end:
The YMM search box should appear on the sidebar of your website.
You should be able to select Acura CL Base 2003 in drop-down selects and find the product with the "Acura CL 2003" restriction.
(screenshot)


Back to the index


Display it with a shortcode

You can insert the YMM search box into the page content with this shortcode:

  [ymm_selector template="horizontal_selector.php"]


(screenshot)

Or with a Shortcode block (if your theme supports blocks):
(screenshot 2)

Result on the front-end: (screenshot)


Shortcode parameters:

If you need a horizontal selector box:
[ymm_selector template="horizontal_selector.php"]

To enable the "garage" feature:
[ymm_selector garage=1]

To enable the "remove from garage" link:
[ymm_selector remove_from_garage_enabled=1]

To disable the "filter category page" mode:
[ymm_selector filter_category_page=0]


Also you can insert it in a PHP template file as:

<?php echo do_shortcode('[ymm_selector template="horizontal_selector.php"]'); ?>


Back to the index


Import Product Restrictions

1) Prepare all the data with the Excel program.
The first row in the .csv file should contain column names:
"product_sku","make","model","year_from","year_to"

If a product does not have a SKU use product ID number.

Check a sample import file.

2) Go to Wordpress dashboard -> YMM Search -> Import YMM Data
3) Choose your .csv file and click the "Import CSV" button.
(screenshot)


Back to the index


Export Product Restrictions

1) Go to Wordpress dashboard -> YMM Search -> Export YMM Data
2) Click the "Export CSV" button and download the .csv file with your web browser.
(screenshot)


Back to the index


Product Restriction Format

Restriction means what a user selects on front-end.
If the user selects "Acura Legend SE 1995" then all products with restriction "Acura, Legend SE, 1995, 1994" will be found.

Restriction can not be lower case like:
acura legend se 1995

because this extension displays restriction values as drop-down options on fron-end.

Year From and Year To values should always have four digits like 1999

Commas in the restriction is mandatory. Each new restriction phrase should go on a new line the same as in a .csv file.
All values are optional.
So instead of complete restriction "Acura, Legend SE, 1995, 1996" it is possible to use:

Acura, Legend SE,,

or:
Acura,,1995,

or:
Acura,,,

The restriction "Acura,,," means that the product will be displayed for all models and years of the Acura make.
The restriction "Acura, Legend SE,," means that the product will be displayed for all years of the Acura Legend SE.

The restriction "Acura, Legend SE, 1992, 1995" means that the product will be displayed for "Acura Legend SE" with any of the years: 1992, 1993, 1994, 1995.

It is possible to use restriction with empty values (just three commas) like ",,," to make a product "universal"
This product will be displayed for any make and model selected.

One product can have multiple restrictions but each should be on a new line:

Jeep,,,
Ford,,,
Acura, CL, 2003, 2005
Acura, Integra GS,,
Acura, Legend Base, 1986, 1992
Honda, Civic LX,,
Honda, CR-V EX, 1999,,
Honda, Odyssey Cargo, 1999, 2002
Honda, Passport EX,,
Toyota, Celica GT, 1992, 1995


Back to the index


Configuration

You can disable the vehicle fitment tab, category drop-downs and search text field in:
WordPress dashboard > YMM Search > Configuration:
(screenshot)


Back to the index


Disable the Garage feature

You can disable the "Garage" feature in:
WordPress dashboard > Appearance > Widgets > your YMM widget > Enable Garage feature
(screenshot)


Back to the index


Translate

1) Open the .pot template file:
wp-content/plugins/ymm-search/i18n/languages/ymm-search.pot

with some text editing program.

2) Translate strings in it. Example:
msgid "(What is an API key?)"
msgstr "(Ce este o cheie API?)"

3) Save translated file as .po file on your computer.

4) Convert the .po file into a .mo file with some program like PoEdit, Loco Translate plugin or online service (google for "convert .po to .mo").

5) Save the .mo file as ymm-search-YOURLOCALECODE.mo into the ymm-search/i18n/languages directory.
Example for Romaninan language:
wp-content/plugins/ymm-search/i18n/languages/ymm-search-ro_RO.mo

6) Enable your language in WordPress dashboard:
Dashboard > Settings > General
(screenshot)


If your translation is ready you can share it with other WordPress users on translate.wordpress.org
When you translation is approved on translate.wordpress.org the files will be automatically downloaded into wp-content/languages/plugins directory when WordPress language is changed.
Example of auto-downloaded files for Romanian language:
wp-content/languages/plugins/ymm-search-ro_RO.mo
wp-content/languages/plugins/ymm-search-ro_RO.po

The translations from the plugin directory:
wp-content/plugins/ymm-search/i18n/languages/ymm-search-ro_RO.mo
override the auto-downloaded translations.



Back to the index


Troubleshooting



Back to the index