This is a wordpress plugin to display swidgets. It simplifies the process for adding the swidget to the page by utilizing shortcodes. There are 3 shortcodes that this plugin adds, see below for instructions.
To install download this project and copy the "swidget" folder into your wordpress plugin directory located at /wp-content/plugins
[swcheckout site="siteID" item="itemID"]
[swcart site="siteID"]
[swaddtocart site="siteID" item="itemID"]
All options can be managed on the WordPress admin page for the swidget plugin.
- Date Format - How dates are displayed in placeholders. Uses the moment.js library. Info on formats found here
- Display Product Name - Show the name of the product (defaults to true)
- Open checkout in - Open the checkout page in a new tab/window
- Low Qty - The point when the low quantity message shows
- Display Product Name - Show the name of the product (defaults to Yes)
- Loading - The message that displays while the tickets are loading
- Not yet on sale - Message displayed if the product is not yet available to purchase
- Offline sales only - Message displayed when the item is available to be sold in Siriusware but not with e-commerce
- Expired - The message that is displayed when the item is no longer on sale
- Low Qty - The message that displays when there is low quantity
- Sold Out - The message that displays when the item is sold out
- Add To Cart - A message for when an item is added to cart (Note: only for swaddtocart widgets)
- Free - The text to display when an item is free (Replaces $0.00).
- Additional Fee - The text for additional fees
- Checkout Button - The text for the checkout button. Note: There are separate entries for the quick widget and the cart widget
- Checkout Button (Free item) - This replaces the quick checkout text if all items in the widget are free
- Add to Cart Button - Text for the cart widget's checkout button
- Discount - The text for discounts
- Member Discount - The text to show how much one would pay if they are a member
Place holders are a special string which will be replace with information from the item
Bold options above can use placeholders
- #{stock} - How many tickets are remaining
- #{name} - The name of the ticket
- #{start_sale} - When the tickets go on sale
- #{end_sale} - When the tickets go off sale (both online and offline)
The following is the priority of where the widget gets it's settings from (lower numbers trump higher numbers)
- Options set in WP admin
- Default settings from the widget itself.
The following is the priority of the messages
- Past sale end
- Sold Out
- Offline sales only
- Prior to sale start
- [No message, ticket can be sold]