Difference between revisions of "Wordpress Plugin"

From ISoft Wiki
Jump to navigationJump to search
(Created some basic documentation, based entirely on an email I wrote up for Big Rig Truck Salvage/BBDS)
 
m
Line 1: Line 1:
==Wordpress Plugin==
{{warning|This documentation is for the "original" plugin, and does not cover the "Looper Provider" plugin.}}
{{warning|This documentation is for the "original" plugin, and does not cover the "Looper Provider" plugin.}}
=== 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".


=== Pretty Search URIs ===
== 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 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).
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 ===
== 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"].  
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 ===
== 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 customer is using in ITrack (that's why the engine link example includes the space, encoded to %20, or as a '-' when using pretty links).
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 customer is using in ITrack (that's why the engine link example includes the space, encoded to %20, or as a '-' when using pretty links).

Revision as of 14:35, 16 December 2021

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

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 customer is using in ITrack (that's why the engine link example includes the space, encoded to %20, or as a '-' when using pretty links).