Difference between revisions of "Wordpress Plugin"

From ISoft Wiki
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{warning|This documentation is for the "original" plugin, and does not cover the "Looper Provider" plugin. Instructions for the "Looper Provider" version can be found here: https://docs.google.com/document/d/1jKr1i_ZckyyqCz_-7svn4_1hq7attcXHGCrR8y_V6fQ/edit#heading=h.6chpworgfw6x
{{warning|This documentation is for the "original" plugin, and does not cover the "Looper Provider" plugin.}}
}}
Instructions for the "Looper Provider" version are saved in the ISoft Google Drive.
== Installation ==
== Installation ==
To install the plugin, just unzip it to your Wordpress plugins directory, like normal.  The plugin talks to our HeavyTruckParts.Net API to power its searches and results, so you'll need a bit of configuration after it's installed before it'll actually be useful.  You can find these settings in your Wordpress Admin panel under "Heavy Truck Search".
To install the plugin, just unzip it to your Wordpress plugins directory, like normal.  The plugin talks to our HeavyTruckParts.Net API to power its searches and results, so you'll need a bit of configuration after it's installed before it'll actually be useful.  You can find these settings in your Wordpress Admin panel under "Heavy Truck Search".

Latest revision as of 17:12, 21 December 2022

Warning
This documentation is for the "original" plugin, and does not cover the "Looper Provider" plugin.

Instructions for the "Looper Provider" version are saved in the ISoft Google Drive.

Installation

To install the plugin, just unzip it to your Wordpress plugins directory, like normal. The plugin talks to our HeavyTruckParts.Net API to power its searches and results, so you'll need a bit of configuration after it's installed before it'll actually be useful. You can find these settings in your Wordpress Admin panel under "Heavy Truck Search".

Pretty Search URIs

If you turn on "Pretty Search URIs", it'll use "pretty" links for searches and details, so searches will be based on "/search/<part type>/<manufacturer>/<model>" style links, and item details on "/item/<manufacturer>/<model>/<part type>/<inventory id>" style links. Since these links don't have the name of the page with the search form or the results section, the configuration includes "Search Page Name" and "Details Page Name" entry blanks to let you fill in what you have set up on your site. I would encourage you to avoid naming your search page "search," that can cause issues with the pretty permalink rewriting.

If you want to use Pretty Search URIs, please notify the ISoft web development team so that the HeavyTruckParts.Net API can be configured correctly (or your part types will be "named" by their IDs instead of their names).

Basic Use

Using the plugin is (hopefully) pretty straightforward. This is all documented on the plugin settings page also, if you want to use it for reference. You will need to create a Wordpress Page, and place the shortcodes on it as desired. Usually the search form and the results block are placed on the same Wordpress Page. This is done with the [heavytrucksearch] shortcode and the [heavytruckresults] shortcode. By default, [heavytrucksearch] provides a keyword search with a submit button. If you want a complete search form with drop-down selection boxes for part type, manufacturer, and model, set the "advanced" parameter to "true": [heavytrucksearch advanced="true"].

Pre-populated searches

If you want to link to a pre-populated search (like, say, for Engines), you can link to the results page and add the part_type query parameter (/results-page?part_type=Engine%20Assembly, or, with pretty links, /search/Engine-Assembly). Part type names are based on what the vendor is using in ITrack (that's why the engine link example includes the space, encoded to %20, or as a '-' when using pretty links).