This is a step by step tutorial to setup an ‘Add to Cart‘ button for a Product using the WordPress eStore plugin to accommodate the selling of products from your WordPress site.
After you read this tutorial, you will be able to easily create “Add to Cart” button(s) on your product’s sales page and sell your products.
Setup a Basic ‘Add to Cart’ Button for a Product
Step 1) Think about the name, price and a little description for the product you want to sell.
Step 2) Configure the product using the ‘Add/Edit Products’ interface of the WordPress eStore Plugin. Take note of the ‘Product ID’ after you add the product (all the product ids can be found on the ‘Manage Products’ page).
Step 3)Design however you want to display the product on a Post or Page (the landing page of the product) where you want to sell the product from. I want to keep it very simple for this tutorial. So I am going to use the following as my product information:
Description: Demonstrates the Add to Cart button
Step 4) Now, all I need is the ‘Add to Cart’ button next to the product information so a customer can purchase it. To insert the ‘Add to Cart’ button that goes with this product, add the following shortcode below the line ‘Price: $1.00’
Replace ‘PRODUCT-ID’ with the actual product id of the product you are selling in my case it’s 1 because this is the first product I just configured. So I am going to add the following text
Step 5) The completed product display looks like the following:
Description: Demonstrates the Add to Cart button
Step 6) Finally, I am going to add the following shortcode in the post that displays the shopping cart when items are added to the cart. You can also use the sidebar widget to display the shopping cart. This will allow the customer to view their order and complete the checkout:
Feel free to hit the above ‘Add to Cart’ button to see how the shopping cart appears below this line and allows a customer to purchase the product.
You can copy and paste all the available eStore shortcodes from the shortcode references PDF file.
The most common mistakes people make when using the ‘Add to Cart’ button’s shortcode and hence the button doesn’t appear are as following:
- Use of hyphen (-) instead of underscore (_). Use wp_eStore not wp-eStore.
- Use of lowercase ‘s’ instead of uppercase ‘S’. Use wp_eStore not wp_estore.
- Forgot to activate the plugin from the plugins menu (Yes it does happen 🙂
- Didn’t replace ‘PRODUCT-ID’ in the shortcode with the actual number.
How to use a Custom image as the ‘Add to Cart’ button
If you want to make the ‘Add to Cart’ button look nicer then you probably want to use a custom image for the button. WordPress eStore plugin allows you to specify a custom button image for every product. This way you can have nice call to action buttons on your product’s landing page.
When you configure the product, there is an optional product settings field called ‘Button Image URL‘ that you can use to specify a custom button image for the product.
I have uploaded a custom image to my site and used the URL of that image in the ‘Button Image URL’ field of the product settings and now the ‘Add to Cart’ button looks like the following (I have also embedded a picture in the post so the product display looks nicer):
Name: Demo Product Two
Description: Demonstrates Customized ‘Add to Cart’ button
The WordPress eStore plugin comes with a few different ‘Add to Cart’ and ‘Buy Now’ button images that you can use. All the images are included in the ‘images’ directory of the plugin. More style to the button can be added using CSS (stylesheet).
How to Display the Product in a Stylish Way
WP eStore comes with a few product display templates that you can use to display your product in a stylish way. Here is an example product display template:
Enter the following shortcode to display the product like the one above (9 is the product id of the product in this example):
Or Enter the following shortcode to display the product like the one above
You will have to fill out the Product Description and the Thumbnail image URL when configuring the product for this type of display.
More stylish display options are explained on the stylish product display documentation page.
How to Sell Limited Number of Copies of a Product
WordPress eStore plugin allows you to limit the number of copies of a product you sell. In order to sell limited copies of a product, simply enter the number of copies you want to sell in the ‘Available Copies’ field of the Product when you configure it.
The plugin will decrease that number every time that product sells. When the ‘Available Copies’ number reaches ‘0’ the plugin replaces the ‘Add to Cart’ button with a ‘Sold Out’ image like the following preventing further sales:
If you are having any problems please leave a comment below.
Note: We now provide technical support for our premium plugins via our customer only support forum