Table of Contents
Overview:
Year Make Model Professional Magento 2.0 Installation guide helps to install the powerful Ymm Pro in magento 2 edition. The goal of this product is to implement search function where a visitor may select the Year, Make, and model of their vehicle(s) using simple drop-downs and then view a list of the vehicles or parts or accessories which will fit their vehicle.
Extension Installation
1. Take a backup of the Magento files before replacing.
2. Extract the files, inside the folder “magento_ce_2.x_ymm_pro_v2.0”
3. Upload the “Globalecom” folder under app/code on Magento root.
4. Upload ymm-search-results.phtml file under vendor/magento/module-catalog/view/frontend/templates/product folder
5. Run below the commands on ssh
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Now clear all caches and var/generation folder. Login to admin panel > Stores > Configuration > Advanced Your module should be listed here now.
(OR)
Check module ‘Globalecom_Ymmp’ => 1, is listed in app/etc/config.php file.
Extension Configuration
Steps to be followed in admin panel to setup attributes
Step 1: Create Attribute
Stores -> Product->Add new Attributes
Click Add attributes button
Create attribute “makes” like below the screen,
Default Label: Make
Attribute code: makes
Use in quick search =>Yes
Search Weight => 1
Visible in Advanced Search =>Yes
Allow HTML Tags on Storefront =>Yes
Visible on Catalog Pages on Storefront =>Yes
Used in Product Listing => Yes
Used for Sorting in Product Listing =>Yes
Similarly Create attributes “v_models” and “years”
Please have Attribute Label as you like.
Note: Attribute codes should be “makes”, “v_models”, “years”. This is to avoid confusion with Magento system attribute called ‘model’.
Step 2: Assign Attributes to Attribute set
Stores-> Attributes set
Then Click on Default. Click the button Add New under Groups
You can find a pop up Explore User Prompt. Please enter the group name “YearMakeModel”
A group will be created at the end you can drag and drop to your respective location and save.
Step 3: Add year make model data in products
As per the product fitment, you can add Year Make Model data in Admin
Admin > Products >Catalog >Select product. Then scroll down to Year Make Model attribute section
You can find a new tab YearMakeModel on the left side. Fill in all the required details and assign the product to a category as needed.
Note: makes, v_models and years can take multiple values if the product has several vehicle fitments. Please enter values in comma separated format. For Example:
Make= Acura,Audi
Model= ILX,A4
Year= 2016,2017
Step 4: Add CMS page and CMS block
Content-> Pages -> Add New Page
YmmpSearch
Page Title: Year Make Model Search
Self URL: ymmpsearch
Status: Enabled
Content:
{{block class="Magento\Framework\View\Element\Template" name="catalog.product.ymmpsearch" template="Globalecom_Ymmp::product/ymmp-search.phtml}}
Similarly Add CMS block. Set the block content is same as above. This cms block can be called anywhere in the page (Left side bar or Main content page or right side bar as per your requirement)
YmmpSearch results (Optional)
Page Title: Year Make Model search results
Self URL: ymm-search-results
Status: Enabled
Content:
{{block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/ymm-search-results.phtml"}}
Note: URL should be ymm-search-results
Step 5: Refresh Magento cache
Step 6 Test Year Make Model search function in store frontend page
You can view the cms page url http://<your website>/ymmpsearch
Example screenshot is given below. View will vary based on your website theme
Additional Information
How to manage the year make model data in phpmyadmin
Make model correlation is maintained in database table and this contains universal data information, For example Civic is model of Honda. You do not need to manage this information in Magento catalog each time when you add products. While assigning the year make and model values for the products, please ensure that, these values are present in the master table year_make_model_master in php my admin.
Please use the csv file which is contained in the package itself to import the year, make and model data on master table.
Steps for inserting ymm data into master table:-
Step 1: Please Login Cpanel access
Step 2: Click phpMyadmin icon under the databases section.
Step 3: Choose your site database then you can see “year_make_model_master” table.
Please see the screen for master table
How to uninstall
Please follow the instructions for how to uninstall Year Make Model Professional Extension and remove from your website.
Step 1: Go to the location app/etc/config.xml
Find the line of code ‘Globalecom_Ymmp’ => 1,
and change it to ‘Globalecom_Ymmp’ => 0,
Step 2: Remove the “Globalecom” folder under app/code on Magento root.
Step 3: Remove the file ymm-search-results.phtml in the following location.
Vendor/magento/module-catalog/view/frontend/templates/product folder
Step 4: Refresh the Cache in admin panel ->System->Cache Management
Questions
If you have any questions or issues, please contact technical support team via http://mage-extensions-themes.com/support/