WordPress Product Display for BigCommerce
A WordPress plugin that allows you to easily display products from your BigCommerce store on your WordPress blog.Relevance: BigCommerce, with WordPress
Current Version: 1.0
Cost: Free
Installation Difficulty: Easy
Installation Instructions: click here
Download: Product Display for BigCommerce on WordPress Plugins Site
FAQ: click here
Overview:
If you want to try a show off products from your BigCommerce store in your WordPress blog, this mod can help. It allows you to use a Shortcode like this:[bc_product_display id="some-product_id"]and have that appear as an image like the one at the top right of this page.
Installation Instructions:
Note: This is a two-part install; you have make configuration changes on your BigCommerce admin, and install files on your WordPress site.Install the WordPress part of this mod as usual (using the Install button on the mod page on WordPress.org). The follow these steps:
- Back up everything! Try this in a test environment prior to installing it on a live shop.
-
In your BigCommerce admin, do the following:
- Login to the BigCommerce Admin Panel.
- Go to Advanced Settings, then API Accounts. Click the "Create API Account" button at the top of the page.
- Note the value of API Path. It should look something like
https://api.bigcommerce.com/stores/abc321mnx5/v3/
- Set the name to WordPress, then set OAuth Scopes to Products - read-only.
- Click the save button, and note the values of Client ID and Access Token.
- In your WordPress admin, do the following:
- In Plugins > Installed Plugins, click the "Activate" link under Product Display for BigCommerce.
- In Settings > Product Display for BigCommerce, set your BigCommerce API Path, Client ID, Access Token and Store URL.
- In Plugins > Installed Plugins, click the "Activate" link under Product Display for BigCommerce.
[bc_product_display]
with parameter "id". So showing the product with id "27" would
be done as follows:
[bc_product_display id="27"](The tag is self-closing.)
The id is shown in the URL when you edit a product in your admin.
Just use this Shortcode when you create a new blog post. You can put it anywhere in your post where you want the image and information to appear. Then just press "Preview" (or "Publish") to see the Shortcode expand to the full block, as shown at the top right of this page.
To avoid excessive API queries, you should set your WordPress installation up to cache previously built pages. A number of WordPress caching solutions exist; searching for "cache" in the WordPress plugins directory will help you find the best solution for your needs.
Customizations
Show the retail price shown in strikeout
I didn't do build this in so that the plugin would be a big smaller, but it's easy to add. In your WordPress installation, modifywp-content/plugins/product_display_for_bigcommerce/product_display_for_bigcommerce.php
and change
$data['price'] = bcpd_product_display_price(sanitize_text_field($response->data->calculated_price));to
$price = sanitize_text_field($response->data->price); $sale_price = sanitize_text_field($response->data->sale_price); $retail_price = sanitize_text_field($response->data->retail_price); if ($sale_price > 0) { $data['price'] = bcpd_product_display_price($sale_price); } else if (($retail_price > 0) && ($retail_price > $price)) { $data['price'] = '<span style="text-decoration: line-through">' . bcpd_product_display_price($retail_price) . '</span>' . ' ' . bcpd_product_display_price($price); } else { $data['price'] = bcpd_product_display_price($price); }Then if you set the retail price to 30 and the price to 25, you'll get a display that looks like this, with the retail price shown in strikethrough:
Major Versions
- 1.0 04/06/2018 - First Release
FAQ
Q: Are there any requirements for products I'd like to display?A: The product should be visible in the Online Store (set in the Other Details tab on the Product Editing screen).
Q: I use a currency other than dollars - how do I change the price display?
A: Modify
product_display_for_bigcommerce.php
and change the function bcpd_product_display_price