These are basic and advanced instructions for how to use the SureFit BigCommerce YMM Module.
Please note
You ultimately need to have a full SureDone account in order to use the SureFit YMM Module. SureDone does not transfer fitment data to BigCommerce. Rather, the plugin dynamically queries SureDone for the information on what years, makes, models and products to display.
However, you CAN trial the module using the demonstration account information below.
TABLE OF CONTENTS
- Module Configuration & Support
- Fitment Pages
- Valid zones to place widgets
- How to edit Theme Files
- Customize your shop filters adding Custom Facets
- Hide the "My Garage" button
- Add Fitment Filter to Category Page
- Add Fits Your Vehicle and Year Make Model table to the product page
- Add Year Make Model filter to the Search Page
Module Configuration & Support
This app requires an existing SureDone account with the following to show your products:
- SureDone SureFit app installed and authorized.
- BigCommerce products imported to and/or created from SureDone.
- Fitment data loaded into SureDone.
The module will ask you for the SureDone ID, a 4 to 6 digit number. You can find it by visiting your SureDone Account ID.
You may also choose the primary color and modify margins and paddings.
If you don't have a SureDone account and would like a demonstration of this SureFit YMM module for BigCommerce, schedule a demo with us.
Test this widget with demo data!
You can see this widget working by setting the SureDone ID to 688015.
Fitment Pages
The fitment module requires 2 pages to work properly:
- One where the initial search is performed. It can be the home page, another existing page or a new page.
- A new page where the fitment search results are displayed.
Both pages will need the SureDone fitment module block installed and it is important that each page has the module only installed once.
Trouble finding the module on your template?
Your template needs to use the BigcCmmerce Page Builder. If you don't see Page Builder when customizing your template, you need to add a region. For more info check: How to add a region
For example, suppose you want to show the initial fitment search on the home page.
- Go to the BigCommerce admin and customize your storefront.
- On the Homepage add the SureDone Fitment block onto the page, dragging and dropping it.
Don't add the block to global regions
The fitment block module can be added on any place of the template except global regions. See the example image.
- Click the added widget and update your SureDone ID. You can use 688015 as the ID to see demo data. Then click Publish.
Next we need a page to display the results. - In your storefront admin navigate to Web Pages and then click on Create a Web Page. Configure it as follows:
- Page type: Contains content created using the WYSIWYG editor below.
- Page URL: Set this as /fitment/result (required).
- Navigation Menu: We do not recommend showing this page in the navigation menu.
- Go back to the BigCommerce admin to customize your storefront and select the page you just created.
- Add the SureDone Fitment module onto the page and configure it like you did in step 1.
Don't add the block to global regions
The fitment block module can be added on any place of the template except global regions. See example image
All done!
Valid zones to place widgets
How to edit Theme Files
- On the BigCommerce dashboard go to: Storefront > Themes
- Click on Advanced
- Make a copy of your current theme so you can edit it (if you already have a copy of it, skip this step)
- Click on the 3 dots of the resulting theme (the copy you just created) and go to Edit Theme Files
- The Bigcommerce theme editor should be opened
Customize your shop filters adding Custom Facets
- Log in on SureDone app
- Select the channel you want to modify from the link in the left sidebar, under Fitment.
- You will see a list with all the fields that you can use as filters (Default filters can't be removed).
- Select all the ones you want to show in your storefront. Your shop users will be able to use them to filter and search more precisely.
- Once you have selected what you want, make sure you click the "Save changes" button.
- If all went well now you need to reload so new facets can be stored correctly. For that purpose you can either:
- Relist all your products.
- Ask support to reload your fitment data
- Once above step finishes. You should see on your storefront filters your new custom facets. For example add box width as custom facets:
Hide the "My Garage" button
- Edit your theme files
- Go to assets > scss > custom.scss
- Add the following code:
.sd-myGarageButton-Aside, .sd-myGarageButton-initialSearch { display: none !important }
This code will remove the button from all pages - You may want to remove the button from only 1 place so you can do it as follows:
.sd-myGarageButton-Aside { display:none !important; }
This code will remove the button from filters.sd-myGarageButton-initialSearch { display:none !important; }
This code will remove the button from the initial year make model dropdowns
Click Save and wait until deployed
- Results:
Before
After - Click Save and wait until deployed
Add Fitment Filter to Category Page
- Edit your theme files
- Go to templates > pages > category.html
- We need to hide Bigcommerce category page in order to replace it with fitment category page. So search for the html tag that takes care of that and add to the parent div an id equals to SD-CollectionPage. You also have to add style="display: none;" so our widget can find and show it.
- Now we need to add a widget point of mount. For that add following code on categories.html right above the div of step 2:
{{#if category.id}} <script> if (!window.shopData) window.shopData = {} if (!window.shopData.storefront) window.shopData.storefront = "bigcommerce" if (!window.shopData.suredoneID) window.shopData.suredoneID = SUREDONEID if (!window.sdFitmentData) window.sdFitmentData = {} window.sdFitmentData.category = "{{category.id}}" window.sdFitmentData.categoryName = "{{category.name}}" </script> {{/if}} <div id="sd-fitment-categories-root"></div>
Please replace SUREDONEID with your SureDone id. - Lastly we need to load the widget on this page so paste following code: <script src="https://fitment.suredone.com/bundle.min.js"></script>
Add Fits Your Vehicle and Year Make Model table to the product page
- Edit your theme files
- Go to templates > pages > product.html
- Above the line {{/partial}} paste the following code:
{{#if product.sku}} <script> if (!window.shopData) window.shopData = { } if (!window.shopData.storefront) window.shopData.storefront = "bigcommerce" if (!window.shopData.suredoneID) window.shopData.suredoneID = SUREDONEID if (!window.sdFitmentData) window.sdFitmentData = { } window.sdFitmentData.sku = "{{ product.sku }}" </script> {{/if}} <script src="https://fitment.suredone.com/bundle.min.js"></script>
Please replace SUREDONEID with your SureDone id. - Now we need to add the root of the fitment table and fit your vehicle where you want to show each component.
- Go to templates > components > products > product-view.html
- We want to show Fits your vehicle right below the product details So at the end of <section class="productView-details"> paste following code:
<div id="sd-fitment-fyv-root"></div>
- We want to show the table at the bottom of product view so on the next line of closing tag of <div class="productView"> paste following code:
<div id="sd-fitment-chart-root"></div>
Click on save all files and go back to bigcommerce dashboard Theme: Storefront > Theme
On the copied theme, go to 3 dots and click on apply
Add Year Make Model filter to the Search Page
- Edit your theme files
- Go to templates > pages > search.html
- We need to hide the Bigcommerce native search page in order to replace it with the fitment search page. So search for <section class="nav"> and add an id equals to SD-SearchNav (id="SD-SearchNav"). You also have to add style="display: none;" so our widget can handle it.
Now search for <section class="page"> and do almost the same, this time add an id equals to SD-SearchPage (id="SD-SearchPage") and the style="display: none;" as well.
- Now we need to add a widget point of mount. For that, add the following code right after the elements we were editing in the previous step (replace SUREDONEID with your SureDone id)
<script> if (!window.shopData) window.shopData = {} if (!window.shopData.suredoneID) window.shopData.suredoneID = SUREDONEID if (!window.shopData.storefront) window.shopData.storefront = 'bigcommerce' </script> <div id="sd-fitment-search-page-root"></div> <script src="https://fitment.suredone.com/bundle.min.js"></script>
- After all the changes, your search.html file should look like this:
- Lastly, go to templates > components > search > product-listing.html, add the following code and click "Save & apply file".
{{#each product_results.products}} <script> if (!window.sdFitmentData) window.sdFitmentData = {} if (!window.sdFitmentData.searchResultSKUs) window.sdFitmentData.searchResultSKUs = [] window.sdFitmentData.searchResultSKUs.push('{{sku}}') </script> {{/each}}