This page contains video tutorials for the Free WordPress Simple Shopping Cart plugin.
Simple WP Shopping Cart FAQ
1.) Can this plugin be used to accept PayPal payment for a service or a product?
Yes.
2.) How do I get the buyer’s address for shipping purpose?
Paypal will send you (the seller) a ‘Payment Notification’ email after the buyer pays for the product which will contain the buyer’s address.
3.) Can the shopping cart be added to a separate checkout page?
Yes.
4.) Does this plugin have multiple currency (example: You can specify the currency you wish to accept) support?
Yes, as long as the currency is a supported PayPal currency. Please see the following list of PayPal supported currencies.
5.) Is the ‘Add to Cart’ button (image or text) customizable?
Yes.
6.) Does this plugin use a return URL to redirect customers to a specified page (example: Thank You Page) after Paypal has processed the payment?
Yes.
7.) Can I do variations with different prices using the Simple Shopping Cart?
You can only do variations that do not change the price of an item. The following article will explain more about using variations with the Simple Shopping Cart. If you want to use variations that have different prices you will need the eStore for this. The following article will explain more about this.
8.) How can I change the “Check Out With PayPal” image?
Simply replace the image located in the “image directory” of the plugin (via FTP).
9.) How do I change the language of the PayPal landing page?
The language is determined by a PayPal cookie in the subscriber’s browser. If there is no PayPal cookie, the default language is U.S. English. “The language you see in your computer/browser doesn’t determine what your customers will see.
10.) Can I use a compact shopping cart with this plugin?
Yes, view the compact cart documentation to learn how to use it.
The language is determined by a PayPal cookie in the subscriber’s browser. If there is no PayPal cookie, the default language is U.S. English. “The language you see in your computer/browser doesn’t determine what your customers will see.
11.) Can I return my customers to a Thank You page after payment?
Yes, view the thank you page documentation to learn how to use it.
WP Shopping Cart and WP Super Cache Workaround
If you are using the WP Super Cache plugin on your WordPress blog together with a WordPress Shopping Cart plugin (example: Simple WordPress PayPal Shopping Cart) then there is a good chance that you are experiencing some funny behavior with your cart plugin (example: the shopping cart doesn’t show the products after item addition).
The Problem
The reason behind it is that the WP Super Cache is a static caching plugin. It generates HTML files that are served directly by Apache without processing PHP scripts. So when a visitor on your blog adds a product to the shopping cart and is wondering why it’s not being displayed in the basket is probably because he/she is still loading the static HTML (cached) file of that page.
The Workaround
Go to your WP Super Cache plugin’s Advanced Settings menu and check the following two options then save it:
1) Don’t cache pages for known users
2) Late init
The following screenshot shows exactly what to do:
Feel free to leave a comment if you are having any issues with this workaround.
Visit the WP Shopping Cart plugin page.
WordPress Shopping Cart – Additional Resources
WP Shopping Cart CSS
The following CSS classes have been included in the plugin. You will just have to update the CSS in the style sheet file (wp_shopping_cart_style.css) of the wordpress paypal shopping cart plugin if you want to customize the look and feel of the shopping cart.
- shopping_cart
- wp_cart_button.
- wp_cart_checkout_button
Where is the Settings Menu for the Shopping Cart?
The settings menu for the Shopping cart is located under the Simple Cart Admin menu. Please see the following screenshot:
How to Make the Shopping Cart Show the “Empty Cart” Message on a Post or Page
Use the following cart shortcode which will show the cart even if there are no items in it. When the cart is empty, it will show an empty cart message.
[always_show_wp_shopping_cart]
How to Resize the Add to Cart Buttons
Add the following to the CSS file of this pluign (wp_shopping_cart_style.css)
height: 20px;
width: 76px;
}
You will have to adjust the size to your needs.
How to Show the Add To Cart Buttons in the Sidebar (Method 1)
We have recently added new shortcodes that uses the WordPress shortcodes API. You can use these shortcodes to place a purchase button for a product on the sidebar widget of your WordPress site:
Here is how to do it:
Step 1) Go to the widgets menu of your WP Admin
Step 2) Add a standard text widget to the sidebar of your site
Step 3) Use one of the shortcodes to create a purchase button for your product that you want to sell:
[wp_cart_button name=”Test Product One” price=”29.95″]
[wp_cart_button name=”Test Product Two” price=”19.95″ shipping=”4.99″]
How to Show the Add To Cart Buttons in the Sidebar (Method 2)
Step 1) Download and activate the Executable PHP code plugin if you don’t have it already (any other PHP executable plugin will work too):
This plugin lets you call php functions from the widgets (it’s similar to the Text widget but it allows you execute PHP code too).
Step 2) Go to the widgets menu and add a ‘PHP Code’ widget to the sidebar (where you want to display the ‘Add to Cart’ buttons or shopping cart). Now you can enter HTML and PHP code here to display whatever you want to show. For example, entering the following line will display an add to cart button:
<?php $product_name = "Product Name"; $product_price = "10.00"; echo print_wp_cart_button_for_product($product_name, $product_price); ?>
How to Collect Special Instructions from the Customer
If you need to collect special instructions from the customer for some customized work on the item you are selling then you can use the Collect Customer Input Addon.
Setting up PayPal IPN Notification Feature
Read the PayPal IPN setup documentation.
Get the Total Number of Items in the Shopping Cart
If you are creating a mod/tweak for the simple shopping cart and you want to know the total number of items in the cart then check this post.
Return to the WP Shopping Cart plugin page.
WordPress Shopping Cart Change Log
version 4.3.6
– There is now a basic shortcode inserter for this plugin in the wp post/page editor.
– The cart orders search functionality can now search records using customer’s email and name.
– Added CSS classes to the variation drop-downs.
– CSS optimization in the settings interface of the plugin.
version 4.3.5
– The deprecated page styles field has been replaced with an image URL field in the settings.
– The Image URL field can be used to specify an image/logo URL that will be displayed in the paypal checkout page.
version 4.3.4
– All the paypal supported currency codes are shown as a dropdown option in the plugin settings.
– Currency code value in the settings is automatically converted to uppercase string if the user mistakenly enters a lowercase string.
version 4.2.7
– Added a new filter for the cart icon image (wspsc_cart_icon_image_src). It can be used to customize the cart icon image.
– Added escaping for the cart link parameter.
version 4.2.6
– Added a new email merge tag for phone number (when available). The new email tag is {phone}. Note that the phone number is an optional field on PayPal checkout page. So it may not be present if the customer doesn’t enter a phone number during the checkout.
– Added a new shortcode parameter (thumb_alt) for the product box shortcode. It can be used to specify an alt tag for the product thumbnail image.
– Added url_decode in the cart link parameter. So the link works even when the URL contains foreign characters.
version 4.2.5
– Minor update for backwards compatibility with an old shortcode using variation.
version 4.2.4
– Added a new filter for the checkout button image. It can be used to specify a custom button image for the checkout button.
Example code: https://www.tipsandtricks-hq.com/ecommerce/customize-the-paypal-checkout-button-image-4026
– Incomplete old cart orders will now be automatically cleaned by the plugin.
– Made some improvements to the PayPal IPN validation code. It is fully compatible with the upcoming PayPal IPN changes.
version 4.2.2
– Minor update for backwards compatibility with an old shortcode.
– WordPress 4.5 compatibility.
version 4.2.1
– Added backwards compatibility for the old shortcodes. So the old add to cart button shortcodes will continue to work as usual.
version 4.2.0
– Added an option in the settings to disable nonce check for the add to cart button.
This is useful for some sites that are using caching. Otherwise 48 hour old cached pages will have stale nonce and the nonce security check will fail.
If you are using a caching solution on your site and having issue with nonce security check failing, then enable this option from the settings.
version 4.1.2
- Added a class to the cart header image element.
- Removed an extra <br> tag from the cart output.
- Plugin is now compatible with WordPress 4.3.
- Added another extra check to the price validation code.
version 4.1.1
- Updated constructor methods in classes with PHP 5 style constructors.
version 4.0.9
- Changed the input slug of “product” name to be more specific.
version 4.0.8
- Added Turkish Language translation to the plugin. The Turkish translation file was submitted by Vural Pamir.
- WordPress 4.2 compatibility
version 4.0.7
- The cart stylesheet file now uses the ‘wp_enqueue_scripts’ hook
- Added a new shortcode parameter (thumb_target) which can be used to specify a target URL for the product thumbnail image
- Coupon codes are now case-insensitive.
- Updated the Italian language file.
version 4.0.6
- Added an email tag to include the coupon code used in the notification email.
- Added an extra check to prevent a debug notice message from showing when the cart is reset.
- WordPress 4.1 compatibility.
version 4.0.5
- Added two new filters to allow dynamic modification of the buyer and seller notification email body (just before the email is sent).
- Added a new filter so the orders menu viewing permission can be overridden by an addon.
- Added Danish Language translation to the plugin. The Danish translation file was submitted by Steve Jorgensen.
- Added a function to strip special characters from price parameter in the shortcode.
version 4.0.4
- Added some new email tags to show Transaction ID, Purchase Amount and Purchase Date (check your email settings field for details).
- Made some improvements to the PayPal IPN validation code.
version 4.0.2
- Added a new option so you can store your custom language file for this plugin in a folder outside the plugin’s directory.
- Added the following two new filters to allow customization of the add to cart button. wspsc_add_cart_button_form_attr and wspsc_add_cart_submit_button_value
- Added Text Domain and Domain Path values to the plugin header.
- Added Norwegian language translation to the plugin. The Swedish translation file was submitted by Reidar F. Sivertsen.
- Added some security checks a) to make sure that the payment is deposited to the email specified in the settings b) to block multiple payment notifications for the same transaction ID
- Buyer’s contact phone number is now also saved with each order (given you have enabled it).
- Added a new filter to allow customization of the product box shortcode.
version 4.0.0
- Added expiry date option in the discount coupon configuration interface.
- Changed the permission on the orders menu so it is only available to admin users from the backend.
- PHP session enhancements.
- Added an extra check to prevent direct access to the cart file.
version 3.9.9
- Added a new feature that allows you to show the product thumbnail image in the shopping cart. Use “show_thumbnail” parameter in the shopping cart shortcode for this.
- Added Swedish language translation to the plugin. The Swedish translation file was submitted by Felicia.
- Fixed a minor bug with the checkout page style feature.
- Added a new filter for the item name field in the shopping cart.
- Made some minor CSS improvements for the cart output.
- The {product_details} email shortcode will now show the full amount of the item (instead of the individual item amount).
version 3.9.8
- Added Hebrew Language translation to the plugin. The Hebrew translation file was submitted by Sagi Cooper.
- Added extra condition to address the “Invalid argument supplied” error that a few users were getting.
version 3.9.7
- Added a new feature to open the checkout page in a new tab/window when user clicks the checkout button.
- Updated the Cart Orders menu icon to use a slightly better looking dashicon.
- Added a new filter to allow modification of the custom field value. Filter name is wpspc_cart_custom_field_value
- Added a new action hook after the PayPal IPN is processed. This will allow you to do extra post payment processing task for your orders. Hook name wpspc_paypal_ipn_processed
- Made some improvements to some of the shopping cart icons (cart and delete item icons have been updated).
- Cart output will work with a responsive theme.
version 3.9.6
- Added Czech Language translation to the plugin. The Czech translation file was submitted by Tomas Sykora.
- Added a new option/feature to specify a custom paypal checkout page style name. The plugin will use the custom checkout page style if you specify one.
- Each order now also shows the shipping amount in the order management interface.
version 3.9.5
- Added a new feature that lets you (the site admin) configure a sale notification email for the admin. When your customer purchase a product, you get a notification email. Activate this feature from the “Email Settings” interface of the plugin.
- Added Polish language translation to the plugin. The Polish langage translation file was submitted by Gregor Konrad.
- Fixed a minor issue with custom button images that uses HTTPS URL.
- Added more CSS classes in the shopping cart so you can apply CSS tweaks easily.
version 3.9.3
- Added a new feature to show a compact shopping cart.
- Language translation strings updated.
version 3.9.2
- Added an option to specify a custom button image for the add to cart buttons. You can use the “button_image” parameter in the shortcode to customize the add to cart button image.
- Coupon code that is used in a transaciton will be saved with the order so you can see it in the back end.
version 3.9.0 and 3.9.1
- WP Super Cache workaround
- Added a new shortcode argument to specify a SKU number for your product.
- Fixed a few debug warnings/notices
- Added Italian language file
version 3.8.8
- Added a discount coupon feature to the shopping cart. You can now configure discount coupon via the Simple cart settings -> Coupon/Discount menu
- View link now shows the order details
- fixed a bug where the shipping price wasn’t properly showing for more than $1000
- WordPress 3.7 compatibility
version 3.8.7
- Changed a few function names and made them unique to reduce the chance of a function name conflict with another plugin.
- Added a new option in the plugin so the purchased items of a transaction will be shown under orders menu
- Payment notification will only be processed when the status is completed.
version 3.8.6
- Updated the broken settings menu link
- Updated the NextGen gallery integration to return $arg1 rather than $arg2
version 3.8.5
- Added an email settings menu where the site admin can customize the buyer email that gets sent after a transaction. Go to the email settings menu to configure the email details.
- Also, added the following dynamic email tags for the email body field
{first_name} – First name of the buyer
{last_name} – Last name of the buyer
{product_details} – The item details of the purchased product (this will include the download link for digital items).
version 3.8.4
- Fixing an issue that resulted from doing a commit when wordpress.org plugin repository was undergoing maintenance
version 3.8.3
- Improved the settings menu interface with the new shortcode usage instruction (removed any reference to the old shortcodes to remove confusion).
version 3.8.2
- Fixed a bug where the quantity change of a product in the cart wasn’t reflecting in the product sale notification.
- Fixed a bug where the item details weren’t getting shown in the sale notification email for a single product purchase.
- Fixed a minor bug that was causing a fatal error on some servers.
- Some minor coding optimization.
version 3.8.1
- Updated the plugin to work with the current version of nextgen gallery plugin (useful for selling photos). View the usage details.
version 3.8
- Added a new orders menu that will show all the orders that you are receiving.
- Added an automatic order confirmation notification email feature. Your buyer will receive an email from this plugin after the sale.
- Implemented a better digital download selling option in the plugin. View the usage details.
- Fixed a minor bug with the wp affiliate platform plugin’s sale tracking.
- Added an option to enable or disable debug logging in the plugin.
- WordPress 3.6 compatibity.
version 3.7
- Added an additional variation option (so now there can be 3 variations for each product)
- Added the variation control option in the new shortcodes (it will work with product boxes too).
version 3.6
- Added a new product display shortcode to show a nice product box.
- Added more security on the settings form submission.
- WordPress 3.6 compatibility
version 3.5
- Added new shortcodes implementation that uses the WordPress shortcods API
- Added a wrapper class for the add to cart buttons so you can easily customize the look for the button using CSS.
version 3.4
- Added an option to collect special instruction for a order on the PayPal checkout page (this message can be customized too)
- Added input sanitization
version 3.3.2
- Added Spanish translation files
- Added a Spanish paypal checkout button graphic
version 3.3.1
- Added html special char filter on product name
- Added UTF-8 charset when submitting to PayPal.
- Updated the WordPress logo with the proper one.
version 3.3.0
- Added the ability to use PayPal sandbox testing
- Removed some unnecessary code to make it even lighter
version 3.2.9
- Added the ability to use the shopping cart shortcodes on the sidebar widget
- Added the Spanish and French translation that was submitted by the users.
version 3.2.8
- Updated the shopping cart widget functions to use the new WordPress widget class.
version 3.2.7
- Added language support and minor code update for WordPress 3.3 compatibility.
version 2.8
- Added the option to automatically redirect the customer to the checkout page when a product is added to the cart.
version 2.6
- Added the “Free shipping” threshold option (When a customer orders more than this amount he/she will get free shipping).
- Fixed some minor alignment issues.
- Fixed a small bug with the link to the product page.
version 2.4
- Apostrophe (‘) can now be used in the product name.
version 2.3
- Added an option to specify a products page in the settings menu (when used, the shopping cart widget displays a link to this page when the cart is empty)
- Fixed an issue whereby the settings page wasn’t getting saved on a WPMU installation.
version 2.2
- Added Variation Control option.
version 2.1
- Added affiliate tracking capability so it can be easily used with the WP Affiliate Platfrom Plugin.
- Added a small tweak so the return from PayPal does not show the POST content in the URL.
version 2.0
- Fixed a minor bug with the shipping calculation.
version 1.9
- Fixed an issue whereby the base shipping cost wasn’t getting sent to PayPal.
version 1.8
- Added shipping cost functionality. See ‘how the shipping cost calculation works’ section for more info.
version 1.7
- Added a function so that the ‘Add to cart’ buttons can be added from template (.php) files by calling a function.
- Added custom style sheet file for this plugin.
version 1.6
- The WordPress Paypal Shopping Cart plugin can be integrated with the NextGen Gallery Plugin to show ‘Add to Cart’ button below the thumbnail images in a Gallery.
version 1.5
- The shopping cart image can optionally be hidden through the settings menu
version 1.4
- Now a customized image can be used as the ‘Add to Cart’ button.
- Changed the images to ‘PNG’ image as it blends in nicely for any background colour (e.g black) as different wordpress theme uses different background colours.
version 1.3
- Added feature so that the shopping cart gets reset when the buyer comes back to the site after paying on the PayPal site.
- Added some minor enhancements.
version 1.2.2
- Added an option which enables the admin to specify a text to show on the widget when the shopping cart is empty.
version 1.2
- Added built in shopping cart widget that can be used to show the shopping cart on the sidebar.
Return to WordPress Shopping Cart plugin page.
Simple WP Shopping Cart Installation and Usage Instructions
WP Shopping Cart Installation
- Unzip and Upload the folder “wordpress-paypal-shopping-cart” to the “/wp-content/plugins/” directory.
- Activate the plugin through the “Plugins” menu in WordPress.
- Go to Settings and configure the options (eg. your paypal email, Shopping Cart name, Return URL etc.)
- Use the shortcode to add a product to a post or page where you want it to appear.
WP Shopping Cart Basic Usage
Step 1: To add the ‘Add to Cart’ button simply insert the following shortcode to a post or page next to the product description:
[wp_cart_button name="PRODUCT-NAME" price="PRODUCT-PRICE"]
Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price.
Here is an example usage of the shortcode:
[wp_cart_button name="Test Product" price="19.95"]
Step 2: To add the shopping cart to a post or page, insert the following shortcode to a post or page.
[show_wp_shopping_cart]
Using the Buttons and Cart From a template file
If you want to add a purchase button in your theme’s template file then do the following:
1. To add the ‘Add to Cart’ button from template (.php) files use the following function:
<?php echo print_wp_cart_button_for_product('PRODUCT-NAME', PRODUCT-PRICE); ?>
Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price. Example:
<?php echo print_wp_cart_button_for_product('wordpress', 7.50); ?>
2. To add the shopping cart to the sidebar, simply use the widget from the widgets menu or add the following line to your sidebar template file where you want the shopping cart to appear.
<?php echo print_wp_shopping_cart() ?>
Display a Product Box
Read the following documentation that explains how you can use a shortcode to display a nice product box for your product(s):
Example Post/Page Editor Content with Shortcode
The following is a screenshot of the WordPress post/page editor showing how the ‘add to cart’ button and the shopping cart is inserted into a post or page.
Using a Compact Shopping Cart
Use the following shortcode where you want to show the compact shopping cart:
[wp_compact_cart]
You can add this shortcode in a standard text widget to add the compact cart to the sidebar.
Always Show the Shopping Cart
The standard “show_wp_shopping_cart” shortcode only shows the cart when there are items in the cart. So it shows the cart when the visitor has clicked on an add to cart button and added item(s) to the cart. When the cart is empty, it simply hides the cart (nothing is shown).
If you want to show the cart all the time then use the following shortcode instead. It will show an empty cart message when there is nothing in the cart.
[always_show_wp_shopping_cart]
Using Shipping Option
1. To use shipping cost use the “shipping” argument in the shortcode. Here is an example usage:
[wp_cart_button name="Test Product" price="19.95" shipping="4.99"]
or use the following php function from your wordpress template files
<?php echo print_wp_cart_button_for_product('product name',price,shipping cost); ?>
Please see the How shipping Calculation Works post for more info.
Using Variation Control Option
Variation Control can be used to create products similar to the following screenshot:
1. To use variation control for your product use the variation argument like the following:
[wp_cart_button name="Test Product" price="25.95" var1="VARIATION-NAME|VARIATION1|VARIATION2|VARIATION3"]
Here is an example usage:
[wp_cart_button name="Test Product" price="29.95" var1="Size|small|medium|large"]
2. To use a 2nd or 3rd variation use the following:
[wp_cart_button name="Test Product" price="29.95" var1="Size|small|medium|large" var2="Color|red|green|blue"]
[wp_cart_button name="Test Product" price="29.95" var1="Size|small|medium|large" var2="Color|red|green|blue" var3="Sleeve|short|full"]
Specifying an Item Number or SKU
You can use the “item_number” parameter in the “add to cart” button shortcode to specify an “Item Number” or “SKU” for a product. This “item number” value will get sent to PayPal (when a customer does the checkout).
Below is an example shortcode:
[wp_cart_button name="Test Product" price="19.95" item_number="SKU12345"]
Selling Digital Media Files
See the media file selling usage documentation.
Use an User Interface to Insert the Shortcodes
The plugin has a shortcode inserter that you can use to add the shortcodes to your WordPress posts/pages.
Feel free to leave a comment below if you are having any difficulties.
Visit the WordPress Shopping Cart Plugin Page.
Simple WP Shopping Cart – How the Shipping Cost Calculation Works
The following video explains how the shipping cost calculation works in the WordPress Shopping Cart plugin.
Simple Shipping Options
Option 1) Flat Shipping Charge Per Item
If you just want to use flat shipping cost for each item then just put ‘0′ in the ‘Base Shipping Cost’ option and specify the individual shipping cost in the trigger text (shortcode) for each product and you are done. For example, the following shortcode will place a button for a product that charges $2.00 for shipping.
[wp_cart_button name="Test Product" price="10.00" shipping="2.00"]
Option 2) Flat/Fixed Shipping Charge Per Checkout (no matter how many items in the cart)
If you just want to use a fixed shipping cost for the cart no matter how many items are in the cart then you can achieve this by specifying this fixed amount in the base shipping cost. Remember, the base shipping cost is only added to the cart if a product in the cart has individual shipping value specified (this way if a customer buys digital product he doesn’t get charged any shipping). Use an individual shipping value of “0.001″ for your physical items which won’t increase the shipping cost but will trigger the base shipping cost to be added as a fixed shipping rate. For example, use the following shortcode:
[wp_cart_button name="Test Product" price="10.00" shipping="0.001"]
Giving Shipping Discounts
What if you want to be a little more intelligent with the shipping cost calculation and want to use ‘Base Shipping Cost’ in conjunction with the individual product shipping cost to offer your customers a better shipping price? You can do that too.
The base shipping cost is added to the total of the individual products shipping cost. So for example if you had two products that costs $50 each and you want to charge $10 shipping for each item then someone buying both the products whould have to pay $100(product cost) + $20(shipping cost) = $120(total). That is not a very realistic shipping price since you are shipping both the products to the same address in one package so it will probably cost you $15 instead of $20.
How do you handle this situation?
You use a base shipping cost of $5 and indidividual product shipping cost of $5.
Now when someone buys both the products the shipping cost will be calculated as following:
$5(shipping for product1) + $5(shipping for product2) = $10(total individual products shipping cost)
Total shipping cost = $10(total individual products shipping cost) + $5(base shipping cost) = $15!
When someone buys one product the shipping cost will be calculated as following:
$5(shipping for product1) = $5(total individual products shipping cost)
Total shipping cost = $5(total individual products shipping cost) + $5(base shipping cost) = $10! (this is the shipping you wanted to charge for one product)
So, hopefully you can see that using the base shipping cost in conjunction with the individual product shipping cost you can be very dynamic in determining the total shipping cost for a purchase.
Option 3) Use PayPal’s Profile Based Shipping
You can also configure the shipping in your PayPal merchant account profile then tell the shopping cart to use your profile based shipping.
Step 1: Check the “Use PayPal Profile Based Shipping” field in the settings menu of this plugin
Step 2: Configure your PayPal profile based shipping in your PayPal account.
Note: The simple shopping cart can only do amount based profile shipping. The weight based profile shipping is only available in the WP eStore plugin.
Visit the WordPress Shopping Cart Plugin Page.