Buythis Shortcode

Buythis Shortcode

Wordpress plugin

Install on Wordpress

App Details

Buythis.co.za is an online store that specializes in machinery sales.

Website

Visit the plugin website for online documentation.

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 sku, variant, value, search, format and 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 sku parameter, or the search and format parameters, depending on which of those parameters are explicitly provided to the shortcode.

Links to the third party service:

https://buythis.co.za
https://data.buythis.co.za
Data definition

AWS S3 is used to serve cached data when one of the above primary third party service data sources are not available.

Data received by the plugin via HTTP, is cached in the site’s local WordPress database, and deleted again when the plugin is uninstalled.

Third party services’ terms of use and privacy policies:

https://buythis.co.za/terms
https://buythis.co.za/privacy

Usage

To use the Buythis Shortcode plugin:

[buythis sku="sku" variant="variant" value="path" affiliate="affiliate_id"] 

or

[buythis sku="sku" variant="variant" value="path" affiliate="affiliate_id"][/buythis] 

The provided 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 parameter, should one not be provided. This makes it easy to change the affiliate ID for a site, and prevents the need to duplicate and maintain the affiliate parameter 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 sku parameter:

Source
Endpoint URL
Example value parameter

data
https://data.buythis.co.za/product/[sku].json
data.name.full

display
https://data.buythis.co.za/product/[sku]/display.json
display.content

price
https://data.buythis.co.za/product/[sku]/price.json
price.2024-01-01.sale

other
Dynamic fixed data
other.affiliate

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.

Product listing usage

[buythis search="RDWorks_Upgrade" format="cart"] [buythis search="sku1, sku2, sku3" format="list"] [buythis search="sku1|sku2.variant sku3" format="table1"] 

An HTML-formatted table of products will be generated, as per the specified format parameter, and any product whose SKU matches either RDWorks_Upgrade, sku1, sku2, sku2.variant, or sku3, will be displayed in the generated table.

Generated listing table format definitions:

Table format
Generated table column headers

cart
Select, Image, SKU (and Name), Price, Quantity

list
Image, Description, Price (incl), Buy

table1
Image, SKU, Description, Price (VAT Incl.), Buy

Usage with WordPress Ajax

To render [buythis sku="sku" variant="variant" value="price" search="search" format="format" affiliate="affiliate_id"][/buythis] dynamically using jQuery:

> jQuery.post(
> ‘/wp-admin/admin-ajax.php’,
> {
> action: ‘buythis_shortcode_ajax’,
> _ajax_nonce: ”,
> sku: ‘sku’,
> variant: ‘variant’,
> value: ‘price’,
> search: ‘search’,
> format: ‘format’,
> affiliate: ‘affiliate_id’
> },
> data => data && jQuery( ‘#buythis_plugin_content’ ).html( data )
> );
>

Shortcuts

The following shortcut value options are available:

| Shortcut | Substituted path (value parameter) |
|—————–|———————————————————————————————————-|
| buy | <a href="https://buythis.co.za/(display.slug)#(other.affiliate),cart,1,(other.variant) |
| content | display.content |
| link | https://buythis.co.za/(display.slug)#(other.affiliate) |
| link_name | <a href="https://buythis.co.za/(display.slug)#(other.affiliate)">(data.name.full|data.name.simple)</a> |
| name | data.name.full|data.name.simple |
| price | R (data.price.sale|data.price.regular) |
| regular_price | R (data.price.regular|data.price.sale) |
| sale_price | R (data.price.sale|data.price.regular) |

Syntax

In order of precedence:

  1. () (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.
  2. | (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.
  3. . (period) is the JSON separator in a path.

Pricing

Starting from $0 per month.

Check Out the Personality Quiz Widget

By Common Ninja

Personality QuizTry For Free!

App Info

Rating

Reviewers

1 reviews

Tags

No tags

Developed By

Fulfillment.Global

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Personality Quiz for Wordpress logo

Personality Quiz

Create interactive personality quizzes with custom results and flexible design to boost engagement and help visitors explore tailored outcomes easily.

Cookies Consent Bar for Wordpress logo

Cookies Consent Bar

Display a cookies consent bar that explains usage and supports GDPR compliance, enhancing user trust and legal clarity.

Countdown to Download for Wordpress logo

Countdown to Download

Use a countdown to download widget that reveals files after the timer ends, builds anticipation, and guides visitors toward higher engagement.

AI Chatbot for Wordpress logo

AI Chatbot

Add an AI chatbot that answers user questions by crawling your site, using uploaded content, and collecting chat interactions.

Contact Form for Wordpress logo

Contact Form

Use a contact form so visitors can send messages, submit inquiries, and help you collect leads and improve user experience.

Vimeo Slider for Wordpress logo

Vimeo Slider

Show Vimeo videos with a Vimeo slider that displays clips in a smooth slider to boost engagement and keep visitors watching.

Popup Builder for Wordpress logo

Popup Builder

Add customizable popups to your site to capture attention, deliver messages, and drive actions like signups or conversions.

Device Mockup for Wordpress logo

Device Mockup

Show products, apps, or designs inside a clean device mockup that improves visualization, builds credibility, and helps visitors make confident decisions.

Pricing Slider for Wordpress logo

Pricing Slider

Use a pricing slider to show dynamic prices by quantity, help visitors compare options, and support confident purchases.

Podcast Player for Wordpress logo

Podcast Player

Add a podcast player to your site to embed and organize episodes, provide responsive playback, and keep listeners engaged.

Multi-Row Image Slider for Wordpress logo

Multi-Row Image Slider

Showcase visuals with a multi row image slider that displays images in layered rows, improves design, and helps visitors explore content more easily.

Bluesky Feed Carousel for Wordpress logo

Bluesky Feed Carousel

Display Bluesky posts with a Bluesky feed carousel that auto updates, shows posts in a clear layout, and keeps visitors engaged.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms