{"id":1,"date":"2009-05-18T07:29:55","date_gmt":"2009-05-18T07:29:55","guid":{"rendered":"http:\/\/tipsandtricks-hq.com\/ecommerce\/?p=1"},"modified":"2020-09-11T11:12:00","modified_gmt":"2020-09-11T01:12:00","slug":"show-add-to-cart-buttons-using-wordpress-estore-shopping-cart-plugin","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/show-add-to-cart-buttons-using-wordpress-estore-shopping-cart-plugin-1","title":{"rendered":"How to Show Add to Cart buttons Using the WordPress eStore Shopping Cart Plugin"},"content":{"rendered":"<p>This is a step by step tutorial to setup an <strong>&#8216;Add to Cart<\/strong>&#8216; button for a Product using the WordPress eStore plugin to\u00c2\u00a0accommodate the\u00c2\u00a0selling of products from your WordPress site.<\/p>\n<p>After you read this tutorial, you will be able to easily create &#8220;Add to Cart&#8221; button(s) on your product&#8217;s sales page and sell your products.<\/p>\n<h3>Setup a Basic &#8216;Add to Cart&#8217; Button for a Product<\/h3>\n<p><strong>Step 1)<\/strong> Think about the name, price and a little description for the product you want to sell.<\/p>\n<p><strong>Step 2)<\/strong> Configure the product using the &#8216;Add\/Edit Products&#8217; interface of the WordPress eStore Plugin. Take note of the &#8216;Product ID&#8217; after you add the product (all the product ids can be found on the &#8216;Manage Products&#8217; page).<\/p>\n<p><strong>Step 3)<\/strong>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:<\/p>\n<div id=\"code_block\" style=\"padding: 10px 60px;\"><strong>Name:<\/strong> Demo Product One<br \/>\n<strong>Description:<\/strong> Demonstrates the Add to Cart button<br \/>\n<strong>Price:<\/strong> $1.00<\/div>\n<p><strong>Step 4)<\/strong>\u00c2\u00a0Now, all I need is the &#8216;Add to Cart&#8217; button next to the product information so a customer can purchase it. To insert the &#8216;Add to Cart&#8217; button that goes with this product, add the following shortcode below the line &#8216;Price: $1.00&#8217;<\/p>\n<p>[wp_eStore_add_to_cart id=PRODUCT-ID]<\/p>\n<p>Replace &#8216;PRODUCT-ID&#8217; with the actual product id of the product you are selling in my case it&#8217;s 1 because this is the first product I just configured. So I am going to add the following text<\/p>\n<p>[wp_eStore_add_to_cart id=1]<\/p>\n<p><strong>Step 5)<\/strong>\u00c2\u00a0The completed product display looks like the following:<\/p>\n<div id=\"code_block\" style=\"padding: 10px 60px;\"><strong>Name:<\/strong> Demo Product One<br \/>\n<strong>Description:<\/strong> Demonstrates the Add to Cart button<br \/>\n<strong>Price:<\/strong> $1.00<br \/>\n<form method=\"post\" action=\"\" class=\"eStore-button-form eStore-button-form-1\" style=\"display:inline\" onsubmit=\"return ReadForm1(this, 1);\"><div class=\"eStore_variation_top\"><\/div><input type=\"hidden\" name=\"add_qty\" value=\"1\" \/><input type=\"submit\" value=\"Add to Cart\" class=\"eStore_button eStore_add_to_cart_button\" \/><input type=\"hidden\" name=\"estore_product_name\" value=\"Demo Product One\" \/><input type=\"hidden\" name=\"product_name_tmp1\" value=\"Demo Product One\" \/><input type=\"hidden\" name=\"thumbnail_url\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/product_thumbnails\/thumbnail-1.jpg\" \/><input type=\"hidden\" name=\"price\" value=\"1.00\" \/><input type=\"hidden\" name=\"price_tmp1\" value=\"1.00\" \/><input type=\"hidden\" name=\"item_number\" value=\"1\" \/><input type=\"hidden\" name=\"shipping\" value=\"\" \/><input type=\"hidden\" name=\"tax\" value=\"\" \/><input type=\"hidden\" name=\"addcart_eStore\" value=\"1\" \/><input type=\"hidden\" name=\"cartLink\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/1\" \/><input type=\"hidden\" name=\"digital_flag\" value=\"1\" \/><\/form><div class=\"eStore_item_added_msg eStore_item_added_msg-1\"><\/div><\/div>\n<p><strong>Step 6)<\/strong>\u00c2\u00a0Finally, 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:<\/p>\n<p>[wp_eStore_cart]<\/p>\n<p>Feel free to hit the above &#8216;Add to Cart&#8217; button to see how the shopping cart appears below this line and allows a customer to purchase the product.<\/p>\n<p><div class=\"estore-cart-wrapper-0\"><\/div><br \/>\nYou can copy and paste all the available eStore shortcodes from the <span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-estore-shortcodes-and-functions-reference-460\" target=\"_blank\" rel=\"noopener noreferrer\">shortcode references PDF file<\/a><\/span>.<br \/>\n<a name=\"common_pitfalls\"><\/a><\/p>\n<h4>Common Pitfalls<\/h4>\n<p>The most common mistakes people make when using the &#8216;Add to Cart&#8217; button&#8217;s shortcode and hence the button doesn&#8217;t appear are as following:<\/p>\n<ul>\n<li>Use of hyphen (-) instead of underscore (_). Use <span style=\"color: #008000;\">wp_eStore<\/span> not <span style=\"color: #ff0000;\">wp-eStore<\/span>.<\/li>\n<li>Use of lowercase &#8216;s&#8217; instead of uppercase &#8216;S&#8217;. Use <span style=\"color: #008000;\">wp_eStore<\/span> not <span style=\"color: #ff0000;\">wp_estore<\/span>.<\/li>\n<li>Forgot to activate the plugin from the plugins menu (Yes it does happen \ud83d\ude42<\/li>\n<li>Didn&#8217;t replace &#8216;PRODUCT-ID&#8217; in the shortcode with the actual number.<\/li>\n<\/ul>\n<h3>How to use a Custom image as the &#8216;Add to Cart&#8217; button<\/h3>\n<p>If you want to make the &#8216;Add to Cart&#8217; 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&#8217;s landing page.<\/p>\n<p>When you configure the product, there is an optional product settings field called &#8216;<strong>Button Image URL<\/strong>&#8216; that you can use to specify a custom button image for the product.<\/p>\n<div id=\"code_block\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9\" title=\"wp_estore_button_image_url\" src=\"https:\/\/tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2009\/05\/wp_estore_button_image_url.jpg\" alt=\"wp_estore_button_image_url\" width=\"422\" height=\"22\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2009\/05\/wp_estore_button_image_url.jpg 603w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2009\/05\/wp_estore_button_image_url-300x15.jpg 300w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/div>\n<p>I have uploaded a custom image to my site and used the URL of that image in the &#8216;Button Image URL&#8217; field of the product settings and now the &#8216;Add to Cart&#8217; button looks like the following (I have also embedded a picture in the post so the product display looks nicer):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Demo image\" src=\"https:\/\/s3.amazonaws.com\/images-tthq\/amazing-photos\/group1\/tips_background_image6.jpg\" alt=\"\" width=\"230\" height=\"172\" \/><\/p>\n<p><strong> Name:<\/strong> Demo Product Two<br \/>\n<strong>Description:<\/strong> Demonstrates Customized &#8216;Add to Cart&#8217; button<br \/>\n<strong>Price:<\/strong> $1.00<br \/>\n<form method=\"post\" action=\"\" class=\"eStore-button-form eStore-button-form-2\" style=\"display:inline\" onsubmit=\"return ReadForm1(this, 1);\"><div class=\"eStore_variation_top\"><\/div><input type=\"hidden\" name=\"add_qty\" value=\"1\" \/><input type=\"image\" src=\"http:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2009\/10\/add-to-cart-button-green-3.png\" class=\"eStore_button eStore_add_to_cart_button\" alt=\"Add to Cart\" \/><input type=\"hidden\" name=\"estore_product_name\" value=\"Demo Product Two\" \/><input type=\"hidden\" name=\"product_name_tmp1\" value=\"Demo Product Two\" \/><input type=\"hidden\" name=\"thumbnail_url\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/product_thumbnails\/thumbnail-2.jpg\" \/><input type=\"hidden\" name=\"price\" value=\"1.00\" \/><input type=\"hidden\" name=\"price_tmp1\" value=\"1.00\" \/><input type=\"hidden\" name=\"item_number\" value=\"2\" \/><input type=\"hidden\" name=\"shipping\" value=\"\" \/><input type=\"hidden\" name=\"tax\" value=\"\" \/><input type=\"hidden\" name=\"addcart_eStore\" value=\"1\" \/><input type=\"hidden\" name=\"cartLink\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/1\" \/><input type=\"hidden\" name=\"digital_flag\" value=\"1\" \/><\/form><div class=\"eStore_item_added_msg eStore_item_added_msg-2\"><\/div><\/p>\n<p>The WordPress eStore plugin comes with a few different &#8216;Add to Cart&#8217; and &#8216;Buy Now&#8217; button images that you can use. All the images are included in the &#8216;images&#8217; directory of the plugin. More style to the button can be added using CSS (stylesheet).<\/p>\n<h3>How to Display the Product in a Stylish Way<\/h3>\n<p>WP eStore comes with a few product display templates that you can use to display your product in a stylish way. Here is an\u00c2\u00a0example\u00c2\u00a0product display template:<\/p>\n<div class=\"eStore-product eStore-fancy-wrapper\"><div class=\"eStore-thumbnail\"><a href=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-coffee-yellow.jpg\" rel=\"lightbox[Cool Test Product Two]\" title=\"Cool Test Product Two\"><img decoding=\"async\" class=\"thumb-image\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-coffee-yellow.jpg\" alt=\"Cool Test Product Two\" \/><\/a><\/div><div class=\"eStore-product-description\"><div class=\"eStore-product-name\">Cool Test Product Two<\/div>Some test description of the product to show how this description field looks like. You can insert plain HTML in this description field too.<div class=\"eStore_available_qty\">Available Qty: 44<\/div><div class=\"eStore_price\"><span class=\"eStore_price_label\"><strong>Price: <\/strong><\/span><span class=\"eStore_price_value\">$50.00<\/span><\/div><form method=\"post\" action=\"\" class=\"eStore-button-form eStore-button-form-32\" style=\"display:inline\" onsubmit=\"return ReadForm1(this, 1);\"><div class=\"eStore_variation_top\"><\/div><input type=\"hidden\" name=\"add_qty\" value=\"1\" \/><input type=\"submit\" value=\"Add to Cart\" class=\"eStore_button eStore_add_to_cart_button\" \/><input type=\"hidden\" name=\"estore_product_name\" value=\"Cool Test Product Two\" \/><input type=\"hidden\" name=\"product_name_tmp1\" value=\"Cool Test Product Two\" \/><input type=\"hidden\" name=\"thumbnail_url\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-coffee-yellow.jpg\" \/><input type=\"hidden\" name=\"price\" value=\"50.00\" \/><input type=\"hidden\" name=\"price_tmp1\" value=\"50.00\" \/><input type=\"hidden\" name=\"item_number\" value=\"32\" \/><input type=\"hidden\" name=\"shipping\" value=\"\" \/><input type=\"hidden\" name=\"tax\" value=\"\" \/><input type=\"hidden\" name=\"addcart_eStore\" value=\"1\" \/><input type=\"hidden\" name=\"cartLink\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/1\" \/><input type=\"hidden\" name=\"digital_flag\" value=\"1\" \/><\/form><div class=\"eStore_item_added_msg eStore_item_added_msg-32\"><\/div><\/div><\/div>\n<p>Enter the following shortcode to display the product like the one above (9 is the product id of the product in this example):<\/p>\n<p>[wp_eStore_fancy1 id=9]<\/p>\n<div class=\"eStore-product-fancy2\"><div class=\"eStore-thumbnail\"><a href=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-coffee-yellow.jpg\" rel=\"lightbox[Cool Test Product Two]\" title=\"Cool Test Product Two\"><img decoding=\"async\" class=\"eStore-product-fancy2-thumb-image\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-coffee-yellow.jpg\" alt=\"Cool Test Product Two\" \/><\/a><\/div><div class=\"eStore-product-description\"><div class=\"eStore-fancy2-product-name\">Cool Test Product Two<\/div>Some test description of the product to show how this description field looks like. You can insert plain HTML in this description field too.<div class=\"eStore_available_qty\">Available Qty: 44<\/div><\/div><\/div><div class=\"eStore-product-fancy2-footer eStore-fancy-wrapper\"><div class=\"footer-left\"><div class=\"footer-left-content\"><form method=\"post\" action=\"\" class=\"eStore-button-form eStore-button-form-32\" style=\"display:inline\" onsubmit=\"return ReadForm1(this, 1);\"><input type=\"submit\" value=\"Add to Cart\" class=\"eStore_button eStore_add_to_cart_button\" \/> <input type=\"hidden\" name=\"add_qty\" value=\"1\" \/>  <div class=\"eStore_variation_top\"><\/div><input type=\"hidden\" name=\"thumbnail_url\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-coffee-yellow.jpg\" \/><input type=\"hidden\" name=\"estore_product_name\" value=\"Cool Test Product Two\" \/><input type=\"hidden\" name=\"price\" value=\"50.00\" \/><input type=\"hidden\" name=\"product_name_tmp1\" value=\"Cool Test Product Two\" \/><input type=\"hidden\" name=\"price_tmp1\" value=\"50.00\" \/><input type=\"hidden\" name=\"item_number\" value=\"32\" \/><input type=\"hidden\" name=\"shipping\" value=\"\" \/><input type=\"hidden\" name=\"tax\" value=\"\" \/><input type=\"hidden\" name=\"addcart_eStore\" value=\"1\" \/><input type=\"hidden\" name=\"cartLink\" value=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/1\" \/><input type=\"hidden\" name=\"digital_flag\" value=\"1\" \/><\/form><div class=\"eStore_item_added_msg eStore_item_added_msg-32\"><\/div><\/div><\/div><div class=\"footer-right\"><span class=\"eStore_fancy2_price\"><span class=\"eStore_price_label\">Price: <\/span><span class=\"eStore_price_value\">$50.00<\/span><\/span><\/div><\/div><div class=\"eStore-clear-float\"><\/div>\n<p>Or Enter the following shortcode to display the product like the one above<\/p>\n<p>[wp_eStore_fancy2 id=9]<\/p>\n<p>You will have to fill out the Product Description and the Thumbnail image URL when configuring the product for this type of display.<\/p>\n<p>More stylish display options are explained on the <a href=\"http:\/\/www.tipsandtricks-hq.com\/ecommerce\/?p=829\" target=\"_blank\" rel=\"noopener noreferrer\">stylish product display documentation page<\/a>.<\/p>\n<h3>How to Sell Limited Number of Copies of a Product<\/h3>\n<p>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 &#8216;Available Copies&#8217; field of the Product when you configure it.<\/p>\n<p>The plugin will decrease that number every time that product sells. When the &#8216;Available Copies&#8217; number reaches &#8216;0&#8217; the plugin replaces the &#8216;Add to Cart&#8217; button with a &#8216;Sold Out&#8217; image like the following preventing further sales:<\/p>\n<div class=\"eStore-fancy-clear\"><\/div><div class=\"eStore-fancy3 eStore-fancy-wrapper\"><div class=\"eStore-fancy3-thumb\"><div id=\"lightbox\"><a href=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-t-shirt-white.jpg\" rel=\"lightbox[Demo Product Three]\" title=\"Demo Product Three\"><img decoding=\"async\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2014\/07\/product-image-t-shirt-white.jpg\" alt=\"Demo Product Three\" \/><\/a><\/div><\/div><div class=\"eStore-fancy3-footer\"><div class=\"eStore-fancy3-product-name\">Demo Product Three<\/div><div class=\"eStore-fancy3-price-tag\"><span class=\"eStore_price_label\">Price: <\/span><span class=\"eStore_price_value\">$9.50<\/span><\/div><input type=\"image\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2012\/12\/sold_out.png\" class=\"eStore_sold_out\" title=\"This item has been sold out\" alt=\"SOLD OUT\"\/><\/div><\/div><div class=\"eStore-fancy-clear\"><\/div>\n<p>If you are having any problems please leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a step by step tutorial to setup an &#8216;Add to Cart&#8216; button for a Product using the WordPress eStore plugin to\u00c2\u00a0accommodate the\u00c2\u00a0selling of products from your WordPress site. After you read this tutorial, you will be able to easily create &#8220;Add to Cart&#8221; button(s) on your product&#8217;s sales page and sell your products. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[4,11],"tags":[5,201],"class_list":{"0":"post-1","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-button-display","7":"category-featured","8":"tag-add-to-cart-button","9":"tag-wordpress-estore","10":"entry"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/1"}],"collection":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/comments?post=1"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/1\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/media?parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/categories?post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/tags?post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}