The Partbot Vehicle Search plugin for WooCommerce connects the blazingly fast Partbot MMY Vehicle Search component with the vehicle application data catalogued on your WooCommerce products.
Installation
Download partbot-vehicle-search-1.0.2.zip
If you’re familiar with installing Wordpress plugins via a ZIP file upload then fetch, install, and activate the latest version of the plugin above, and head to the next section.
If not, we’ll walk you through the steps:
Download the latest version of the plugin above.
Head to the Plugins section in the Admin dashboard of your WooCommerce store.
Click on Add New then Upload Plugin.
Click on Choose file and location the ZIP file you downloaded in the first step.
Click on Install Plugin, and once installed, Activate Plugin.
Updating the plugin can be achieved by repeating steps 1 through 4, and Install Plugin in step 5. To update, click on Replace current with uploaded.
Configuration
The Partbot MMY Vehicle Search component appends fields to the URL as query parameters when your customer is searching for their vehicle.
The URL query parameters the component uses by default can clash with Wordpress, or other plugins you may have installed. To workaround this, we provide a Field Prefix option you can configure.
After installing and activating the plugin, head to the settings page via the new Partbot icon that has been added to the Wordpress admin menu. The Field Prefix has a default value of pb_.
Take note of what Field Prefix value you set, as it may be needed again later when adding the component into your theme.
That’s all the backend configuration required. Now we’ll get the Partbot MMY Vehicle Search component working on the frontend.
Usage
Familiarise yourself with the Get Started and Configuration sections on the Partbot MMY Vehicle Search website.
✅ The vehicle-search.js file is automatically added by the plugin for you, so you can skip the first Get Started step.
You can add the search component to your Wordpress theme in two ways:
Using the web component directly
<vehicle-search
data-api_key="YOUR_API_KEY"
data-makes=""
data-models=""
data-callback-url="/shop" # set to your shop page
data-fields=""
data-field-prefix="pb_" # mandatory when using web component
data-show-labels="true"
></vehicle-search>Using the provided [partbot_mmyvs] shortcode
[partbot_mmyvs
api_key="YOUR_API_KEY"
callback_url="/shop" // set to your shop page
makes=""
models=""
fields=""
field_prefix="pb_" // optional when using shortcode
show_labels="true"
]
Regardless of the method you choose, there are a few configuration attributes that need some extra attention.
Callback URL web component:data-callback-url | shortcode:callback_url
The callback url is where the search component will make redirect to when the Search button is clicked. The plugin works by extending the existing WooCommerce product query, so the callback url should be your shop page — usually "/shop"
(don’t forget the leading slash), or "/"
.
Field Prefix web component:data-field-prefix | shortcode:field_prefix
The search component uses the prefix to generate the field names in the URL that the plugin is expecting.
If you are using the web component directly, you need to ensure that you set the data-field-prefix attribute, and that it matches the Field Prefix set in the Partbot admin area.
If you are using the shortcode, the plugin will automatically use the Field Prefix set in the Partbot admin area, so it is does not need to be set. If you do set it, ensure that the value matches the Field Prefix set in the Partbot admin area.
Results
More Info
See the Configuration section on the Partbot MMY Vehicle Search website for a more detailed overview of the options.