Buythis.co.za is an online store that specializes in machinery sales.
Third party service description
This plugin provides a shortcode to interface between WordPress and Buythis.co.za.
This plugin relies on Buythis.co.za as a third party service, in order for the plugin to work.
The reason for using the third party service, is to access JSON product data from the Buythis.co.za store.
No personal data is collected during the process.
As can be seen in the plugin’s source code, this plugin only uses information that is directly and knowingly provided by the user themselves, i.e. the
affiliate shortcode parameters.
No other data of any kind, whatsoever, is used by this plugin, other than the parameters provided by the user to the plugin shortcode.
The only data currently submitted to the third party service via HTTP is the
Links to the third party service:
To use the Buythis Shortcode plugin:
[buythis sku="sku" value="path" affiliate="affiliate_id"]
affiliate_id is used to generate revenue for a given affiliate, by using this plugin’s
[buythis] shortcode on their WordPress site.
A site-wide default Affiliate ID can be configured on the Buythis Shortcode settings page, that will be used as a fallback value for the
affiliate_id attribute, should one not be provided. This makes it easy to change the affiliate ID for a site, and prevents the need to duplicate the
affiliate_id in each usage of the shortcode.
Depending on the path specified in the
value parameter, one or more API calls will be made to the following endpoints (sources), where [sku] is the provided
Dynamic fixed data
The API response from a source is JSON-decoded, and the path specified by the
value parameter is extracted from the JSON response.
Thus, to extract custom JSON data from a source’s API response, use a custom path in the
value parameter to specify (describe) the source API and the JSON data to extract from it, as shown in each example
value parameter above.
The following shortcut
value options are available:
| Shortcut | Substituted path (
value parameter) |
<a href="https://buythis.co.za/(display.slug)#(other.affiliate)">(data.name.full|data.name.simple)</a> |
In order of precedence:
()(round braces) is used to treat a path as a format string, by only evaluating sub-paths in the format string that are contained within round braces, and leaving text in the rest of the format string that are outside round braces, intact. Nested braces, i.e. braces inside braces, are not supported, i.e. a sub-path cannot contain a format string. Round braces can contain shortcuts as sub-paths.
|(OR) is to coalesce the first non-null result of a sub-path out of a set of path expressions. A sub-path can be a shortcut, but cannot contain round braces.
.(period) is the JSON separator in a path.
Is this plugin free to use?
Yes, this plugin is free to use. The source code is also available for you to examine what the plugin does and how it works.
Contributors & Developers
“Buythis Shortcode” is open source software. The following people have contributed to this plugin.Contributors
- 15% VAT is added to price data received from sources, since the prices are VAT exclusive.
- “Affiliate code” changed to “Affiliate ID”.
- Added more source endpoints for use in the “value” parameter.
- Added more shortcuts.
- Added format string (round brace) syntax.
- Added OR (pipe) syntax.
- Initial release.