How to add a shopping cart to WordPress

Shopping cart

Here’s a great way to add a shopping cart to your WordPress blog so you can sell products directly from your site without the user having to go to an external site. If you offer products for sale on your blog, it’s much nicer for your customers to stay on the same site that they see the products on.

This plugin is simple and powerful, it uses AJAX for some parts of it and it seems to work just dandily on the blog I have installed it on. Here’s how you do it…

[expert instructions]
Download plugin, upload to plugins directory, activate it.
Visit the ecommerce tab and set options for country and currency, edit categories, edit checkout options, edit gateway options, add products.
sell!
[/ expert instructions]

[Hand hold instructions]
First, get yourself a copy of the WP Shopping Cart plugin and upload it to your plugins directory, go to you plugins page and activate it :

wp shopping cart plugin activate

You should see a new tab at the top of the dashboard labeled ‘ecommerce’ . Click that and we can set up the options for our country and tax rate. Just select your country from the pull down box and it should set the tax rate for you.

You can also require someone to be registered before they can purchase products. This is up to you, for now, you can leave it as ‘no’. The only problem with requiring a user to register first is the non-immediate way in which WordPress allocates a password to a user by emailing it to them. Also, once someone logs in to your site, they get presented with the dashboard and not the site but there’s a great plugin to use to beat that here.

Leave the URL settins for now, they’ll work just find and dandy as they are (they may look different on your setup if you have a different permalink structure)

Choose your language and keep the theme as default:

shop options

Next, you need to choose your cart location. I use the setting as a widget because this blog is widget enabled. You can choose to add it manually yourself by inserting the code to anywhere on your sidebar if widgets aren’t your thing.

Choose which options you want and be sure to choose the correct currency setting for your country:

shop options2

The next section asks you if you want to charge shipping, if you are selling physical products then you need to choose ‘yes’ and set the base shipping charges. (base charges are standard and only added once regardless of how many products are added to the cart, you can add additional delivery charges on the product settings) :

shop options3

Click ‘submit’ and that’s one page done!


Now to edit category and products…Click on the ‘categories’ tab for ecommerce and then on ‘edit’ next to the example category and put in your own options and click ‘edit category’ when you are done:
Category options


Now, add your products!
Click on the ‘products’ tab and choose the category you want to add products to from the pull down box. Just add the options you want..Product Name:
Description:
Additional Description:
Choose the categories for the product by ticking the boxes for each category:
Choose a brand if you are using one:
Enter the price of the product you are selling:
Product Options

The next option is stock control, if you are selling physical products then you can tick the box for ‘limited items’ and it will give you a field for putting how many items of this you have, once you run out the software wont show this product any more until you get more stock and edit the amount here.

Variation control is a way to add options to a product, like size for a t-shirt or a colour choice which will be selectable on the product description page before a customer adds the product to the shopping cart.

Additional shipping costs can be added so that each item that is added to the cart will also add that amount to the shipping (good for heavy items)

Product images are self explanatory and always a good idea to use a decent picture for your product, the plugin does a good job of creating a thumbnail and uses AJAX to display the full size image when a customer clicks it. (choose your thumbnail size or upload a seperate thumbnail if you want)

Product download is for digital items.

Click ‘add product’ to save your product settings:

Product Options2

If you don’t want tax added to each item or it is already included in the price then select the option to ‘do not include tax’.


Payment options. You need some way to allow payments right? this shopping cart only gives you the option to receive money by Paypal, the customer can use their paypal balance or a credit card to purchase your products and the money will be received into your paypal account.First, go to the ‘payment gateway’ tab and select ‘paypal’ from the pull down box, you’ll presented with a screen to add your details.Enter your paypal email address:
Paypal IPN is the paypal instant payment notification, if you’re selling physical products then you probably wont need this.
Paypal accepted currency is what your paypal account is set up for.
Forms: just use the pull down boxes to select the correct fields for each title (use the top set of options on the pull down boxes):
Gateway options


Checkout options: This is the last screen you have to edit, the default is set to ask the customer to input their cardholder address and shipping address but I think it’s better to just use the cardholder address (for anti-fraud purposes).To remove the shipping details fields, just click the trash can icon on the side of each field to remove it, you can add other fields too like a text area for added delivery instructions etc. I make sure that the ‘mandatory’ option is selected for the postal code too.Choose the option for ‘paypal/credit card only’ if you don’t plan on letting your customers pay manually by check or other option:
Checkout options


That’s the settings done, now we have to add the widget and perhaps don’t display certain pages that were added by the plugin to your tabs or ‘pages’ list..You can add the shopping cart by visiting ‘presentation/widgets’ and dragging the cart button to wherever you want:
Widget optionsIf you have noticed the extra pages being displayed on your blog and you don’t want them, simply change the template code for the page list display options. You will need to know the post id of each of these pages so click on ‘manage/pages’ to see a list and note down their respective id’s and use an ‘exclude’ option in your template wherever there is a ‘wp_list_pages’ function. eg:

wp_list_pages('exclude=4,5,6' ); 

That’s it! you should now have a products page showing your products and when someone clicks ‘add to cart’ , it will AJAX it over to the shopping cart ready to be checked out:
product added

Once ‘checkout’ is pressed, the customer is presented with the screen to add their address details:

Checkout

Once that is filled in, they click ‘make purchase’ and will be sent to the paypal login page where they can use their paypal account or pay by credit card if they don’t have an account already:

paypal screen

You will be able to see a record of what purchases have been made on the first tab of the ‘ecommerce’ section:

Purchase log


There you go! This is just a quick and dirty way to get a shopping cart on your blog, you can play around with lots of options to your hearts content if you have many products or want to offer digital downloads. There’s even a widget to add a donation button to your blog and have that go in the shopping cart.Personally, I like this way of selling on your blog and have used this (edited) plugin on a commissioned site using a very simple (and very edited) WordPress 2.3 theme, the customer loved it!

About Andy

This is my personal website where I (occasionally) post about things going on in the world of me. I am the creator of CommentLuv and administrator of comluv.com
Business Software, ecommerce, Making / Made Money , , , ,

0 responses to How to add a shopping cart to WordPress


  1. I just installed the wp shopping cart e-commerce (3.6 beta) on my wordpress and am having a strange problem.

    Despite whatever option I’ve chosen in my store options, the product pages are not displaying “add to cart” button. It only displays “buy now” which, upon clicking is non-functional and takes the user back to the home page. I’ve gotten it to display “add to cart” once on a complete fluke, but could never get it to display again after that.

    Any clue why this is happening??

    Nate’s last blog post..Protected: Steve Mehler

  2. I can’t think of what it could be. My only advice would be to uninstall it, remove the pages and then go back through the whole install process one step at a time. I’ve had to do this with other cart programs and it sometimes works!

  3. Andy-

    I know that you are using a new plug-in but I also know that a few other e-comm users are still checking in on your site. I’ve got a new issue all of a sudden. I have spent a while adding items and now I want to turn my site loose on the world. No matter what I do people can’t see any of my items unless they register on my blog and are the status of “editor”. I’m sure I’ve just spent too long looking at my own work. I’m just wondering if someone else has had a similar issue. The site is soleilbrule.com.

    I have the gold cart with grid-view. Thanks for your help in advance.

    -Jeff

    jeff’s last blog post..Site Under Construction

  4. jeff » I had a look at your site and I can see all the items and even add them to the cart with no problems. looks like all is ok

  5. Hi,
    Your tutorial is really great and i really appreciated to find such detailed explanations.
    Everything runs fine for me excepted when i try to display products (here is an example http://www.monsieurpersonne.com/?page_id=33 ) I really don’t know what’s going on. I tried to re-install as you mentioned but it didn’t change anything. I also tried to desactivate other plugins and de-activated permalinks but the results is always the same.
    I would really appreciate if you could help me a little bit.

    Best regards,

    Jean-Jacques

    Monsieur Personne doudou et poupée design’s last blog post..La famille s?agrandit

  6. Make sure that you have set your page to publish. I had that problem. While I was developing my site I set the site to draft.

    Jeff’s last blog post..Ronaldo To Retire?

  7. Elaine

    Hi,

    Each time they do a new version it fixes the old problems I’ve had.

    I thought I had seem somewhere that you can place the shopping basket in a post or page. I was trying to look through the instructions but I couldn’t find anything. Is there a way to do this so you can view your shopping basket when you’re on a page?

    Thanks.

  8. poupee: it looks as though the cart software has had an error and stopped outputting any content, that’s why you page doesn’t finish loading. Have a look at your products and see if there are any errors in the images. it could possibly be the character set of your blog, maybe it’s not recognizing the characters you have used to describe the product and instead of throwing a mysql error, it just dies…

    elaine: sorry I don’t know, I just put the cart on the sidebar with a widget so it’s always visible on every page

  9. Andy,

    Awesome plugin, but can it be adapted to take credit cards directly, thus avoiding Paypal? Is it secure enough to just add the field boxes for card details?

    Cheers Buddy!

  10. Simon: for that you would need a special gateway payment script, if you wanted to take credit card numbers on the page, you would need an SSL page for protection of the details. If you have paypal pro then you can accept credit cards directly from paypal without the customer having to have a paypal account (you can do that already with paypal but it takes an extra click from the customer)

  11. orphea

    Am I the only person having MAJOR trouble with this plugin? I follow all of the instructions and my “products page” is empty other than saying [productspage] – just like that. WHYYY :( HELP!

  12. orphea

    Also, I guess I have a newer version than what is mentioned on this page, as several of the options I do NOT have, such as, requiring registration to purchase, which I would like to have.

  13. orphea

    Someone up above mentions a “Faq Sheet” .. faq sheet, what faq sheet? My download did NOT come with a faq sheet. :|

  14. Andrej

    Hi,

    I need to do following:
    When person enters its data (name, address, e-mail,…) I need an e-mail to be sent to me, so that I know that the person ordered the product. This e-mail should contain data of customer and data of products he/she ordered. I am not using paypal or credit card. I just need to know who ordered what. Then I make phone call to that person, confirm it and send it through post office.

    Can you help me?

  15. I’m going to try this out, thanks a lot!

    Robins last blog post..Experimenting with an On-Stage Telepresence Experience

  16. jyoti

    I m using own created theme and have added shopping cart to it but cart is not visible, i think its because that i dont have widget available, Should i install widget to make visible my shopping cart. I need that shopping cart should be visible at some image click i.e. m having a image of “order” when user clicks on it the shopping cart should be visible.
    Any suggestions will be appreciated

  17. kath

    Do wordpress ecommerce accepts money orders instead of paypal?

  18. This is a very nice, easy to follow tutorial.
    I had been trialling this plugin and encountering loads of problems. With no response from the developers I have uninstalled and am currently looking for an alternative.
    Has anyone used the YAK plugin?

  19. Pingback: 16 Resources To Give Readers Their Own Edge - Day 6 of 7 Days to Making Your Blog Blossom » Personal Edge Insights - Barbara Ling

  20. I have been looking for a shopping cart solution for my blog and this is perfect. Thanks!

  21. That is cool. Thanks, Kellie shoptheemall.com Ft Wayne, IN

    Kellie Syns last blog post..Welcome Batman Collectibles

  22. Thank you for the great tutorial Andy! I am thinking about using WordPress with this plugin for a small business client of mine. Now I will have to look more into it.

    Simoon´s last blog post..The most crucial advice for making money on the internet

  23. Hi guys…

    Another shopping cart solution you might be interested in is the Market theme. There is an online demo you can try out.
    (http://www.markettheme.com)

    It operates as a WordPress theme that has the shopping cart system built-in.

    Just upload the theme, activate it, enter your Paypal email address into the settings area, and you’re ready to add products.

    There is also a backend product manager plugin included in the download package to use to add or edit your products.

    I hope this helps.

    Market Theme´s last blog post..Get Market for Free

  24. Ricky

    I need help, i have uploaded the wp-shopping cart plugin but on the plugins screen i go to activate it and all i get is an http internal error 500

    please help

  25. Thanks for informing me about the various ecommerce shopping carts out there.It has been very helpful to my research and here is what,I came up with over the past few days.

    There are different types of ecommerce shopping cart available in the market for small as well as large businesses. Whatever business you are running, you must pick a top slot ecommerce shopping cart to boost up your online sale transactions.

    The top ecommerce shopping cart for your online shop should be such that it is easily customized with your website. It must incorporate attractive design and shape to your webpages displaying the product range.

    Ecommerce shopping cart provides complete business solution to all your online business websites. The main features of the top shopping carts include complete user control.

    When a web designer or developer starts working on a website, he requires complete control over the whole process. So the whole process has to be user friendly. The software must be such that it is able to manage your site completely. The software must not give unnecessary problems to the user.

    The software must be designed to be compatible to the changes. The designer must be able to include new innovations to his web pages. The layout design must be compatible to the site and the software must provide for these provisions. There should be a provision for products’ image uploads, change in prices, and inclusion of descriptive texts and many other things.

    The most vital element that all top ecommerce shopping cart software should take note of is the security. When an online buyer wants to buy a product, he enters all his financial details in to the website. The softwares should be so designed that they provide complete protection to the buyers. The customer’s personal details should remain a secret at all times.

    No third party should be able to access it.In this age and time of advanced technology, many changes are being incorporated into these ecommerce shopping carts. This helps in attracting more and more buyers to your website. Many sites are coming up with the well designed schemes to sell their shopping cart software.

  26. Thank you for the info! I have been researching on shoppingcarts and am certified with 1shoppingcart through practice pay solutions however 1shoppingcart is very expensive. I have not used the wordpress shoppingcart as of yet but will try it and look forward to using it!

    Thanks again

    Serena Carcasole
    http://www.vbsondemand.com
    Your 1STOP Business Service Shop
    Outsource your way to success.

    Serena Carcasole´s last blog post..Simple, free Advertising!

  27. Thanks for nice information really would be helpful

  28. Hi there!
    Thanks for being there. the links to the forums are all broken. I’m having trouble uploading images and don’t know where to go for help. I’m using Crafty Cart theme, my test url is http://www.surflegends.us. I appreciate ANY help you may have…

  29. great pluging for selling product on my site, thank for reviews this plugin

  30. Dan

    great blog, our shopping cart software is one of the best around – check it http://www.absoluteshoppingcart.co.uk/