simpleCart(js) + PayPal = E-commerce in minutes

by Brett Wejrowski on October 28th, 2008

****UPDATE: Version 2 is now available, this post is outdated.  Please go to simplecartjs.com to find out more*****

**update: v1.2: fixed rounding error in price formatting
**update: v1.1: back button works, no trailing comma for options

(if you want to skip right to the example and downloads, check it out here)

Over the past few years, our company has had several clients who have needed a smaller shopping cart, usually to sell just a couple of items. We generally built these small carts using paypal. I realized it would be nice to package this up, and create a lightweight, easy-to-use, flexible shopping cart.

So we made simpleCart(js). The cart is a 10.5kb javascript file that uses cookies to keep track of the items in the cart. SimpleCart(js) doesn’t require any databases or programming knowledge. You simply need to know some basic HTML and have the ability to copy and paste. However, it can easily be expanded to use databases or contain more advanced options.

Setup Paypal

The first thing you will need to do, if you don’t already have one, is set up a free merchant account with Paypal.

Add simpleCart(js) to your pages

Once you have the files downloaded, simply add this snippet to the top of any page you wish to have the cart running on:


<script src="simpleCart.js" type="text/javascript"></script>
<script type="text/javascript"><!--
simpleCart = new cart("you@yours.com");
// --></script>

You will need to replace you@yours.com with the email address you used to sign up to Paypal.

Adding items to the cart

Any page you have the simpleCart(js) running, you can add an item by simply using a link like this:


<a onclick="simpleCart.add('name=[name]','price=[price]');return false;" href="#"> link to add item </a>

You are required to at least have a name and price when adding an item to the cart. However, you can add other fields also. If you want an image to be linked to the item, you can add it like this:


simpleCart.add('name=Shirt','price=6.00','image=images/myImage.png');

Viewing the cart

You may have the cart on any page, and it will update automatically using ajax. To show the cart items on a particular page, you simply need to have an element with the class of “simpleCart_items” on the page. This element will automatically be filled with all of the items in the cart, and will show each field.


<div class="simpleCart_items"></div>

You can use any element (div,a,span,p,etc.) and the values will be put in the innerHTML of that element.

Showing the totals on a page

You can show the total quantity or price on any page by simply having an element with a class “simpleCart_quantity” or “simpleCart_total”:


<div class="simpleCart_total"></div> <span class="simpleCart_quantity"></span> items

Checkout and Empty Cart links

You can have a checkout or empty cart link anywhere on any page where the simpleCart(js) is active. You do this by simply setting the class of an element to “simpleCart_checkout” or “simpleCart_empty”:


<a class="simpleCart_checkout" href="#">checkout</a>

<a class="simpleCart_empty" href="#">empty cart</a>

You can use any type of element for these, and you can put anything inside of the element. Anything wrapped in a tag with those classes will link appropriately.

Other Options

Adding other product options to items.


simpleCart.add('name=Shirt','price=6.00','image=images/myImage.png','size=XL','color=Blue');

You can also change the quantity that will be added to the cart:


simpleCart.add('name=Shirt','price=6.00','image=images/myImage.png','quantity=5','size=XL','color=Blue');

The order of the arguments doesn’t matter, and you can add as many options as you would like.

Styling the cart.

You can style this cart to fit the look of your page. The contents of the cart will start with a header row:


<div class="cartHeaders">
<div class="itemImage">Image</div>
<div class="itemName">Name</div>
<div class="itemPrice">Price</div>
<div class="itemOptions">Options</div>
<div class="itemQuantity">Quantity</div>
<div class="itemTotal">Total</div>
</div>

Each item in the cart will have the following form:


<div class="itemContainer">
<div class="itemImage">[myImage]</div>
<div class="itemName">Shirt</div>
<div class="itemPrice">$6.00</div>
<div class="itemOptions">size: XL; color: Blue</div>
<div class="itemQuantity"><input type="text" /></div>
<div class="itemTotal">$30.00</div>
</div>

And there will also be a totals row:


<div class="totalRow">
<div class="totalItems">6</div>
<div class="totalPrice">$30.00</div>
</div>

You can choose to omit part of the cart in your stylesheet:


.itemOptions,itemImage{
display:none;
}

Or you can hide the header or totals rows:


.totalRow{
display:none;
}

.cartHeaders{
display:none;
}

Change the order of the cart columns.

If you would like to change the order of columns or remove the columns from ever being shown, simply add a line to the top of your page:


<script type="text/javascript" src="simpleCart.js"></script>
<script type="text/javascript">
simpleCart = new cart("you@yours.com");

//Add the following line to reorder and remove item columns
simpleCart.ItemColumns = ['Image','Price','Name','Quantity','Total'];

</script>

Download and Demo

Below are links to download simpleCart(js) and to view a working Demo. One great thing about the cart being stored in cookies is that you can have your items be added on one page and the cart be on another if you wish. The demo reflects this. The main page of the sample store is here and the View Your Cart page is here.

********* Please go to simplecartjs.com for the updated downloads and demo************


Tags:
Posted in Business, Miscellaneous, Programming 380 Comments »


380 Responses to simpleCart(js) + PayPal = E-commerce in minutes

Leave a Comment
  1. Victor Hernnadez  November 1, 2008

    I love you guys for this!

    • hi
      how are you doing today,anyway i will like us to share our mind.thank you

  2. Malaiac  November 3, 2008

    ” The cart is a 10.5mb ” > 10.5kb I think ;)

    Great great work, at last an easy way to add a cart !

  3. kakilangit  November 4, 2008

    great job guys!!

  4. [...] SimpleCart, un système de panier e commerce avec 10k de javascript. La démo de SimpleCart est assez impressionnante [...]

  5. What is security like on this – seems to me that with a little js injection you could rewrite the account email address (effectively taking users to an alternate paypal account page to submit their details) Also prices could be changed before submitting resulting in paypal only charging whatever the user feels fit to pay – admittedly this may be caught by an shop admin when they come to dispatch the goods, but I’m not convinced this is all that safe.

    I seem to remember that paypal enabled you to manage product catalogues with them and only pass them a product id – this way the prices are safe, as possibly is the email address as I would hope product IDs within paypal would be unique.

    I do like it – simple and cool, but I have some concerns which I’m sure you guys have thought of and can lay to rest.

  6. violinista  November 4, 2008

    Great, thank you guys!

  7. I would echo the security concerns of Jon B. Without any server side validation before sending the data to Paypal allows a hacker/shopper to set their own price before checking out. Or worst even put in some negative quantities/prices for items. Secure web apps use a mix of client side validation (for speed/user experience) and server side validation (for real security).

  8. [...] Infos et téléchargement Partager et découvrir : [...]

  9. Great idea and really nice implementation, but totally NOT SECURE!

  10. Thanks for the comments guys! The security issue really depends on the project you’re working with. Many times, when you use paypal with a “buy now” link, you can use js injection to alter the prices. There are a couple key points that I think are important for this cart:
    -
    1. Paypal won’t allow the negative values, so the scariest scenario is taken care of.
    -
    2. This cart, standalone, is really only meant for carts that expect a smaller volume of orders. Any incorrect order can be simply refunded, and the orders can be checked by an admin, because the frequency of orders would be low.
    -
    3. This can easily be supplemented with server-side validation for a larger cart. In fact, I would not recommend using this cart by itself for any large volume of sales. It was written with an expectation that it could be expanded for different situations.
    -
    Essentially, the security is low (ie hand-checking) when your volume is low, so you can use the cart on its own. If you have a high volume (ie hand-checking is not reasonable), this cart is an object that can easily be prototyped. If you expect a large volume of orders, I would definitely suggest this only be the front end of your cart and you should use calls to server-side scripts for validation (you may want to consider not using paypal also, depending on how large of volume you expect).
    -
    I will look into the item id’s within paypal. Thanks for the suggestion Jon B.
    -
    Thanks to everyone else for your comments. I was debating whether or not I should discuss the security in this article, and it seems like I should definitely clear some things up. Thanks for checking simpleCart(js) out…. (pun)

  11. WP Junkie  November 4, 2008

    This looks great! Simple and lightweight, thanks alot guys!

  12. Hey Brett, great work.

    I agree, you should mention the security implications, and I suggest that any of your readers knowledgable on the security side of things should chime in with their comments.

    Again, well done on a beautifully simple cart.
    Al.

  13. Just a quick suggestion as far as validation (for anyone looking to use this as a front end for a larger cart system):
    -
    If you stored your items in a database, and used php/mysql (or your favorites server-side language) to dynamically generate the “simpleCart.add” links with the database fields, you could extended the cart object to redirect to a php call before checkout. You could use a form or parse the address, and then use a script that can compare the items and values in the cart against your database before sending the information to paypal.
    -
    If anyone would like, I can cook up an example script to show how this could be done.

  14. Mike B  November 4, 2008

    I was wondering if this great little cart could be implemented using google checkout?

    Thanks

  15. hcabbos  November 4, 2008

    Brett, most definitely. That would be awesome!

  16. Welldone.Süper bir paylaşım.

  17. Thanks for the suggestion, Mike B. I will see if I make an option to use google checkout. Check back later this week and I’ll update the cart as soon as I can get it in there.

  18. I’m with Mike B and would also love to use something like this with Google Checkout.

  19. Stellar work. Very nice.

  20. Jason Palmer  November 4, 2008

    Impressive – but I’d prefer an E-Commerce solution that didn’t allow users to change the price of the product(s) they purchase.

  21. Jonathan  November 4, 2008

    My question is can you do downloadable media?

  22. It is possible, but it definitely require some extra coding. You would also want to use some sort of validation during checkout (as mentioned in the comment above), because you can’t check to make sure someone didn’t use some sort of js-injection before giving them the product.
    -
    Let me know what you have in mind and I might be able to give you a suggestion or two as to how to implement it with simpleCart(js).
    -
    Thanks for the comment Jonathan.

  23. boogie  November 4, 2008

    Really nice cart. Question, how easy would it be to integrate Google Checkout into the cart?

  24. Memiux  November 4, 2008

    Well done, Thanks.

  25. Mike B  November 4, 2008

    another question – say you have a shoe like Nike, now would I be able to add variables like shoe size and shoe color and maybe other variable that would change the price before you add it to the cart?

    thanks a bunch,
    Mike Brisk

  26. Rob Thomas  November 4, 2008

    I too would love for this to be implemented with Google Checkout!

  27. Palaniappan C  November 4, 2008

    Small bug – when you enter a non-numeric character into the quantity field of the cart, the price becomes NaN. Could be handled better, but reasonable. Problem is, when I enter a proper number after that, it doesn’t refresh back to the price – it stays as NaN.

  28. Nice work.

    I would love to see a php/mysql example, also how hard would it be to checkout using authorize.net?

  29. nice one

  30. Is it possible to have pull down menu selecting sizes and or colours of products.

  31. Jonathan  November 5, 2008

    Basically need to setup downloads for WordPress themes. The Paypal end does a pingback to validate things, but is more complex than it needs to be to redirect afterwards to a secure download page (or start a file download automatically after validation).

  32. It’s a really good and quick system if you just have paypal as a payment solution. I normally use Magento as a ecommerce solutions cart: you can have a look to my link here http://www.website1service.com/

  33. Stephen  November 5, 2008

    Great work! I love this script and plan to use it quite a lot. I was wondering, though, do you see yourself adding the capability to remove an item from the cart?

  34. Hey Stephen. Currently I just decided that you can set the quantity to 0 in order to remove and item from the cart, just to keep things as simple as possible. But its not any trouble for me to add a “remove” function.
    -
    I will post an update when I add that in there. Thanks for the comment.

  35. Stephen  November 5, 2008

    So you’re saying that, if I have 3 counts of “Item #1″ already in my cart and I click a link that has something to the effect of:

    cart.add(’name=Item #1′, ‘price=45.00′, ‘quantity=0′);

    It will remove all 3 counts of that item?

  36. No, I was referring to editing the quantity when viewing the whole cart. The quantity column of the cart is an input, and if you set that to ‘0′ it will remove the item from the cart. Technically you would have to use the “add” with ‘quantity=-3′ (the quantity=0 would just add zero items to the cart). I will add a remove from cart function though; it will be useful for a lot of situations.

  37. Stephen  November 5, 2008

    Thanks for the help. Again, great script.

  38. Hi Brett, very cool cart you’ve built here – and great demo of it – thank you for sharing it! I’d like to point out that the security concerns some are posting apply to any client-side cart solution. I’ve used a javascript function published by ‘paypalhelper’ for client-side quantity discounts on my small business web store for the past year or so without any security issues. I plan to play around with your cart and I wonder if you had considered adding quantity-discount functionality?

  39. Dartzman  November 6, 2008

    pull down options in items would be a bonus

  40. Khurram  November 6, 2008

    Very nice!! But I would love to see if the items added to cart should be emailed to the seller so that he can talk to the buyer about these items via email. This can be very useful for those people who dont have a paypal account.

    Guys, is that possible?

    Plz reply asap.

  41. Hey Khurram, instead of sending the info to paypal when someone “checks out”, you could send the info to a php script that sends an email to the address specified when declaring the cart. That should work for what you’re looking for. Thanks for checking it out.

  42. Brett, amazing script here! I’m going to implement it into my next project.

    One feature request for you also: Would love to see some sort of shipping/handling natively processed with this.

  43. chandra  November 6, 2008

    Brett…cool script, i was trying around placing the checkout and emty links in the tables…and found quite not working….could you assist me in this…i would be a gereat help…i can send u the file what im tryimng to acheive…

    Thanks..

  44. Hey chandra, I’m not sure exactly what is causing you problems. If you want to send me the file, I can take a look at it. Go ahead and just email it to brett@thewojogroup.com.

  45. EXCELENT!! I’m from Spain and i would like to change the dollar symbol for the euro’s symbols: €

    I modified the js, but it the result was a problem page with paypal.

    How can i change de dollar symbol for the Euro’s one, please?

  46. Thanks for the question Arzur. I will also add a currency feature in soon. For now, you will simply need to change the js in the “checkout” function. Where the code says currency_code=USD, simply change that to the appropriate currency abbreviation for paypal.

  47. chandra  November 6, 2008

    hi brett… i had sent the file and looking for your suggestions on the same…
    Thanks

  48. russell  November 7, 2008

    thank you so much!

  49. Michael&Erica  November 7, 2008

    Dude! This is so awesome!
    I’m definitely going to be using this.
    Thanks

  50. I second for Google Checkout!

  51. I really like this…thanks man!

  52. Thankx! Your’re BIG!

  53. OPSS! i’ve tried what you say, Bret, i changed currency_code to EUR, and it doesn’t work. It tells me that the “shopping cart” it’s empty.

    Any idea?

  54. De Sena  November 8, 2008

    Nice work!

    Would it be possible to integrate this script into a PHP file, in order to hyde “simpleCart = new cart(”brett@wojodesign.com”);”?

    Or, at least, is it possible to use the IPN account ID instead of the PayPal email adress?

    (https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables)

    Carpe Diem!

    http://tradutempo.eu

  55. De Sena  November 8, 2008

    I mean “hide” ; )

  56. Michael  November 9, 2008

    Awesome work, thank you

  57. russell  November 10, 2008

    brett – another bug i came across when updating quantities: if you enter quantity “0″ – it does remove the item. however, if the quantity was more than 1, it only adjusts the TOTAL price by removing only one item. ex: add 5 of something to the cart. then on the “update cart” page, change the value from “5″ to “0″ – the item disappears, and you have an empty cart, but still a total value equal to the previous value minus 1 item.

    i think the “remove item” feature you’re working on will fix this. just thought you’d want to know about this bug….

  58. Thanks Russell, I will be updating simpleCart(js) soon with version 2.0. I will fix those bugs and add in as much of the feature requests as possible.

  59. Thanks Brett for posting this shopping cart; it’s very timely for my current project. I have spent a couple of days reworking it to display the way I require (for example I don’t want the sidebar) and I’m happy with the result. A couple of bugs though. I am using $*.95 for my pricing. Oddly to get a price of 8.95 or 44.95 I have to enter 7.95 or 43.95 in the code on the product page. And you are right about entering *0* (you can also change the number to negative) to remove an item from the cart; it does not, as you say, change the price correctly. Plus, if you delete items or empty the cart, then back click to the previous page and add a new item, old items return and the grand total is wonky.

  60. Cedric Dugas  November 11, 2008

    For some times I have not been impress with javascript plugins,

    I am now.

  61. i’m getting an error page with PayPal too when trying to change the currency in the JS file to GBP.

    I’ve looked high and low… and even the cart on the right displays in $’s too…

  62. Jeffery  November 12, 2008

    I’m not seeing any weight info that gets passed to Paypal for calculating shipping…Am I just missing something?

  63. I can’t wait version 2.0!!

  64. bartblau  November 13, 2008

    I’m having problems with the currenct too. This gives stranges results. Can’t wait for the update. This is a great plugin.

  65. Rodrigo Faller  November 13, 2008

    Guys, really thanks for this script, it’s just perfect!

    I needed something like this to implement a sort of shopping cart on my site, but the idea was more like a list of products that you can ask more info about them by sending an email. Basically I added some code for populating a Kontactr form on my site with the cart items instead of checking out on Paypal, and worked like a charm!

  66. I’d like to see subtotals in the cart’s item list area to the right in the demo…

  67. Since we’re putting in requests:
    Is it possible to add an option only in the cart that would allow for things like size; and that could also change the price if, for example, it’s not shoes but another type of item that comes in a variety of sizes, hence variable prices.

  68. As of now, it is possible with some custom code. But I will try to work it into the updates. Thanks for the suggestion!

  69. jordifreek  November 16, 2008

    Wow… it’s fantastic! but what happend about use EUR for currency? Not work. Like Arzur (comments adobe) i’m spanish and using euros (currency_code=EUR) paypal return an error… Any idea?

  70. Tom Boyce  November 16, 2008

    Great product but I have changed the USD to GBP and get an error regarding the link from PayPals servers everytime.

    Until this is clarified and fixed I can’t use this product even though it is perfect for what I need. Could you please help us trying to change the currency codes to get a solution up and running?

  71. this is such a great thing — and free!

  72. ¡Fantastico!
    I’m also struggling with currency change.

    I have changed the USD to EUR, the lc=US to lc=ES and added € for the Euro symbol…I still get a PayPal error and stating that the cart is empty :0(

    Thanks for any advice!

  73. Brett,

    fantastic job. Suggestion: how about allowing the user to delete one item from the cart on the right? And, maybe a running total for two or more items?

    Awesome, awesome, awesome… :: click, download, sent link to friends ::

  74. Tom Boyce  November 17, 2008

    I have got it working with GBP, took a little fiddling with the JS to iron some errors that occurred when passing any currencies other than USD.

    I had to do the following to get GBP to work:

    1. Remove the $ string in the JS when prices are returned with a format ($xxx.xx)
    2. Change the currency code to GBP
    3. Change the country code to UK
    4. Remove any references to $’s in the url that is generated for Paypal.

    This unfortunately means that no currency symbol is used. I have tried using the £ symbol to no luck, possibly I might be able to get it to work if I use the html symbol code for £, I will try later and post any progress.

    Many thanks for this excellent product.

  75. This is excellent. I was looking for ages for a script to populate a cart without postback for my .net app. Security not an issue for me as I pickup the cookie contents in a secure checkout page.

    Regarding the currency symbol. In the script file I just changed the “$” to “&pound”. Changing the charset from utf to iso might also help.

    Thanks Brett. Looking forward to the “delete item” function.

  76. Rodrigo Faller  November 17, 2008

    I added the delete item, its quite easy, since there is already a “deleteItem” function. If you want, feel free to mail me, I can help you, i’ve wrote that function myself for my application

  77. Rodrigo Faller  November 17, 2008

    oops, just found out that my mail does not get published =P

  78. Fantastic script!!! It would be great if you could add an increment quantity up/down next to the quantity input box and be able to set the input to readonly.–

    I think a lot of people will be interested in this script.

  79. adriankoooo  November 18, 2008

    It is possible to modify the code for orders via email?

  80. If price is 4.51 then Simple cart add 1 and calculate new price = 5.51???
    To all prices who after point there are > .49 (.50; .51 ; .52 ; …) Smart Cart calculate +1.
    How determine this problem????

  81. Hi Brett… very nice code, thanks for posting.

    About the cart total logic… as a workaround I just set the event listener to a low value effectively preventing the user from adjusting quantities via the input box. But it would be REALLY great if you could add a “delete item from cart” button for each cart item. Looks like a popular request reading from above.

    MuchasG!

  82. Andrew Waters  November 19, 2008

    This is incredible, thanks WoJoGroup!

    one thing that would be nice to have is a call to the number of items in the cart so you can display in a header or sidebar “You have n items in your cart” Since they are stored in cookies you should be able to call that from any page on your site, and link to the “Shop” page…

  83. Andrew Waters  November 19, 2008

    Sorry, also just thought – how would you manage a shipping charge? Any thoughts on best practice for this?

  84. @Andrew: you can show how many items by adding a class=”simpleCart_quantity” to any container.
    -
    For everyone else having an issue with the rounding errors in price, this is now fixed in the newest version. All prices for items should work properly. Thanks to everyone for testing and finding the errors for me.
    -
    I will be working hard to add as many features as I can, so keep checking back! Once again, thanks for checking out simpleCart(js)!

  85. Andrew Waters  November 19, 2008

    Incredible – thanks Brett!

  86. Pricing errors not fixed.
    For example, I changed the prices from 7.95 (which previously displayed as 8.95) to 8.95 which now displays as 9.94.
    And the addition is incorrect for the total. 9.94 times 2 = 19.88. Simple Cart adds it up as 18.89.
    In fact, all of the prices have either 1.00 or 0.99 added to them.
    The total at the bottom of the cart is sometimes *.*5, sometimes *.*4 but always short 1.00 for each item over one.

  87. Plus whatever you did made the quantity box unchangeable in the cart. You can neither delete the item by typing “0″ nor can you change the number to add more items.

  88. flashreloco  November 19, 2008

    great jobs guys,

    congratulations

  89. Whoops! Sorry Robert! I changed the wrong round function. NOW the rounding error should be fixed.

  90. WORKS NOW! The prices display correctly — the same as they are entered on the “product” page — and the arithmetic adds up to the correct sum. Very good. Thank you.
    However, the quantities are still unchangeable.

  91. following said instructions to pass the currency from USD to GBP, i’m still having no joy whatsoever.

    I can now see the items being displayed in GBP £, but it now goes through to PayPal and says that my cart is empty

    anybody have any idea how to implement a working js file in GBP?

    any help would be very much appreciated

  92. If name product contain ‘ (for example “Hartley’s Raspberry”) – product not add to cart.

  93. Tanks from fix the price error! :)

  94. Deneyip görücez

  95. Balaban  November 20, 2008

    very thank so exp.

  96. The quantities are still unchangeable – very speedy refresh “text” form in that write number quantities. Form is working, but very speedy have writing and click away…

  97. In old version form from quantities working correctly..

  98. Managed to add a size column by making a few changes to your code. Size is not an option, though; it is added in the code on the *product* page as one of two choices which are presented as two different icons (which makes for a lot of code under each item). Removing line 614 of version 1.2 — var ElementCheckInterval = setInterval(”simpleCart.updatePageElements()”, 2000); — makes the remove by typing *0* function work, sort of. On occasion the grand total at the bottom does not change fully.

    When items are removed and the back button is clicked, to return to the previous page, items that were deleted appear to be back in the cart. Although returning to the cart usually shows them as removed unless you add another item from the page that was returned to in which case everything is put back in the cart.

    Revisions are posted.

    BTW: Please, could you describe the option to send the order via email, perhaps by way of cgi, (instead of to PayPal) in your tutorial above.

  99. This is stupid!
    Not remove this line!
    Only change digits -from 2000 to 20000!

  100. the only thing line 614 does is check the cookies to ensure all the page elements are correctly updated. If you remove this line, the items will not update when you use the back button on some browsers. If you want this to run less frequently, you can adjust the internal (1000 = 1 second). That should not interfere with the other code however.

  101. this may be stupid, however, that line was *checking* so frequently that my CPU was in constant use and I could not even select text on the page to copy it. I put the line back and changed 2000 to 20000 like Bars suggested. It is now possible to delete items. BUT they are put back into the mini cart displayed on that *product* page and if a new item is ordered the deleted items are put back too on the Cart page.

    Using FIREFOX BTW.

  102. I wonder, because I am not using the side bar, which displays a scaled down version of the Cart, on my *products* pages if this is causing the trouble here?

  103. great cart, i actually haven’t seen another that is better for implementing into an existing interface. I dont see why this wouldn’t be one of the most widely used carts, if the security issues were resolved. maybe you can make a php version that will address these issues and eventually add more functionality (to make use of the other possibilities that come with using php).

    I do have a question that I see has been asked a couple times already.

    I am making a web store for a clothing company that sells t-shirts. Everyone knows that when you buy a t-shirt, your used to specifying what size (also something that is not addressed in the shoe store example). No one would buy a shirt or a pair of shoes without being able to specify their size.
    I noticed the ability to add options like size, color, etc., can these options be selected via dropdown menu then submitted when the add to cart button is pressed? If so, I would really appreciate an explaination on how.

    For others with the same problem, I managed to solve the tshirt size selection issue temporarily by making 3 buttons; S, M, L (small, medium,large) with a label above that says “Choose a size to add to cart”.

    Thanks for the wonderful script, it allowed me to implement custom design like no other cart has.

  104. Adding the sidebar to the *products* page doesn’t make any difference.

    Your example Cart does the same thing as I mentioned. Watch your CPU usage when you have the Cart page open. It is constantly updating itself. Why?

    And, it is not possible to delete items by typing *0* on your sample page either. Actually you can if you move really quickly, but the deleted item is still present when you click back to the product page.

  105. does anyone have an answer for my question?

  106. Looks like a great script; any further forward on the Google Checkout thing as this is the biggie for me!

  107. Bostjan  November 27, 2008

    If item name or options include letter “č” (Win1250) it breaks the functionality of cart.

    We solved this by encoding/decoding the vars, but it would be nice if this was fixed in future releases.

  108. This is really a nice piece of work. Any chance you’d be interested in re-writing this using jQuery?

  109. I would like to echo the question posted by ‘P’ about the size selector. I am selling skateboards in 2 sizes and t-shirts in 3 sizes. This would be awesome to implement instead of using an image and link for each different size of each different product.

    Love the cart, well done.
    Can’t wait for secure PHP version.

  110. Wondering if anyone can help me?

    Assuming the back click dysfunction can be resolved . . .

    I need to split the Image category into several choices. I believe this requires an array which I am not quite sure how to write or include in the script. The reason for this is prints of the images are the product and, due to the number of images, they are stored in at least seven different folders. I do not want to move them all to one folder (there are too many), plus, rather than typing the folder location in the HTML I would like to have this information in the simpleCart javascript to reduce the amount of redundant code in the HTML.

    And since, in my case, the product name and image name are identical it would also be great if the javascript could simply substitute the image *name* with the name *name*. This would also reduce the amount of code in the HTML.

  111. juan carlos  December 1, 2008

    hi.. is possible add a button (text) to delete a simple product??? (not only full card).

    thanx..great job.

  112. Aurélien  December 1, 2008

    Hi, great work.

    1 question :

    How to change the currency ?

  113. How about being able to use with Authorize.net or Linkpoint payment gateways?

    Thanks,
    Jody

  114. Still very beta. Nice idea when bugs have been fixed. When will this be fixed or has the author given up?

  115. Thanks for all the interest, everyone. I will hopefully get a chance to work on making all of the fixes and feature requests later this month. As of now, here are the big ones:
    -currency/international
    -google checkout
    -select for options
    -more secure php implementation
    -delete item
    -fix back button bug w/o using constant monitoring
    -shipping
    -other checkout gateways
    +Thanks again for your suggestions, and I will try to start knocking some of these off the list throughout the month. Please let me know if I am missing anything here.
    -

  116. One thing missing from list is the ability to increment quantity up/down. Keep up the great work Brett, so many people will love you for this.

  117. robert  December 2, 2008

    Thanks again for your efforts Brett.
    One last suggestion (along with my requests above regarding variable folders for images and replacing “image” with “name”) . . .

    Is it possible, rather than inserting a fixed price for each item (which is likely to change over time) to insert in the HTML a price code which the javascript reads and then inserts the appropriate price? So instead of …’price=11.95′,… one could type ‘price=price1′, or something like that.

    http://www.silverplains.ca/test/simple_cart/sc_images_forbs.htm

  118. I’ve seen something like this, but this is much more fancy, man. Here in Croatia is impossible to redraw money from PayPal, so I would like to accept orders via e-mail. Can you make one version with direct mail sending to seller’s e-mail adress, instead PayPal? I tried to modify the script, but I get lost…

  119. This is what I needed for my small shop.

    I intent to sell “one of a kind products”, so my question is …

    How can I set up your shopping cart script such that only 1 quantity will be added to the cart per product no matter how many times the user click that product.

    Thanks Brett!

  120. This is perfect for small clients! One question, we;re using FancyZoom, but in the pages we have it it resets the items on the cart to 0, my guess is that since FancyZoom depends on the onload to get activated is where it’s happening, any thoughts how they can live together?

    Here is the page:

    http://sw.alonsocreative.com/site/dev/product-base-fancy.php

    Thanks for any help!

  121. Please, i need change $ to € in “add to cart” and “checkout button”

    I changed: 1-”&currency_code=EUR” +
    2-”&lc=ES”;
    3-return “€” + temp + “.” + change

    And nothing….

  122. JordanC  December 3, 2008

    Hi Brett,

    I am having some trouble. When I add 2 or more items to the cart and then checkout to paypal, it shows the correct price, but it only shows the title of the first item in the cart.
    eg.
    T-Shirt 1 -> $120

    instead of:
    T-shirt 1 -> $40
    T-shirt 2 -> $40
    T-shirt 3 -> $40

    Any ideas?

  123. cottonfizz  December 4, 2008

    been following this for a while, only had time to implemented today, the idea is just perfect.

    from the comments above I guess you are overwhelmed by the response, bet you never expected this.

    best wishes and thanks

  124. Does anyone know if it’s possible to add an input field to a product so that users can type in a name?

    For example, selling a t-shirt with the following product options:

    “Product A”
    -Price: $50
    -Size: Large
    -Color: Black
    -Custom Name (this is where the emtpy input field would be)
    ———————-

    Once a user enters custom text into the input field, I’d like simpleCart to carry over the info to the shopping cart and then pass all the information to Paypal when they hit checkout.

    Is this possible???

  125. OK, we switched from fancyzoom to fancybox, a bit of work but totally worth it for this script!

    Keep it up Brett, I’ll definitely follow further development and any other things Wojo comes up with!

    Cheers

  126. Hello Brett,
    Thank you for a great script! This is really cool!
    I’m just trying to use with some modification, let user allow to enter amount of numbers at first but facing difficulties.

    Simply, I’d like to update quantities from out side of simpleCart generate form field just like below.

    ~

    in this case, ‘quantity’ value cannot be replaced so always add with ‘new_quantity’ & ‘price’.

    I know this is not how you intend to use, so if you have spare time, would you give me a help ?

    Thanks again for simpleCart,

  127. <input simpleCart.updateQuantity(…)>
    ~
    <div class=”simpleCart_items”></div>

    stripped html tag … sorry about that

  128. Andy W  December 6, 2008

    Seems to be problems with the download on all IE browsers I can test; demo works fine, but download does not (neither the standard JS or the uncompressed work ‘out the box’ with no alterations). Test done on Win XP on IE7, IE6 and IE5.5, all fail. On clicking ‘Add to Cart’, nothing happens.

    Going to see if I can grab the JS from the online demo as that works ok in browsers.

  129. Andy W  December 6, 2008

    Panic over; got it working, related to this line:

    {Q.push(new RegExp(”(^|\\s)”+H[I]+”(\\s|$)”))}

    I’d changed the dollar for a pound sign, mistakenly thinking this had to be done to change currency usage; alas not. Strange thing was, changing this rendered no effect on Firefox which worked as normal, but caused upset on IE.

  130. hmmm…. not sure whats going on there Andy. I will have to look over the code again… i have made a few quick fixes over the past week or two, and something may have caused the errors that I didn’t realize before uploading. I am planning on implementing the new features and fixing the known bugs by the end of the month, and I will do some rigorous testing before releasing 2.0. Thanks again for trying it out everyone, cottonfizz had it right, I am pretty surprised by the popularity. I will try to get everything working for you guys as soon as I can, thanks for your patience, and keep the comments coming; you guys have been a huge help.

  131. I forgot to report earlier… After unpacking demo zip, in destination folder found some files without extensions. Starting demo html shows nothing. After correcting extensions (*.js and folder with the pictures) everything’s fine. Don’t know the reason, running Vista Premium.

  132. Jonathan  December 7, 2008

    Brett. Just wanted to reiterate what others have said. You came up with a great idea, and and very nice little script here. Very easy to integrate into different CMS’s. I am using cmsimple… and this works great. Thanks!

  133. I would love to give this a try, but unfortunately when I try to unzip I get an error message, something about the syntax being wrong.
    Can you help me with this?

  134. robert  December 8, 2008

    Managed to add the various folders for the images to simpleCart.js which saves much coding in the HTML files. Involves the changes shown on lines 262 – 273 and 476 – 478 of my altered version of your code.

    http://www.silverplains.ca/test/simple_cart/sc_images_forbs.htm

  135. Does anyone know if it’s possible to add an input field to a product so that users can type in a name?

    For example, selling a t-shirt with the following product options:

    “Product A”
    -Price: $50
    -Size: Large
    -Color: Black
    -Custom Name (this is where the emtpy input field would be)
    ———————-

    Once a user enters custom text into the input field, I’d like simpleCart to carry over the info to the shopping cart and then pass all the information to Paypal when they hit checkout.

    Is this possible???

  136. Kmede: you could use something like: onclick=”simpleCart.add(’name=Product A’, ‘Price=50′, ‘Size=Large’,'Color=Black’,'Custom Name=’ + document.getElementById(’formInput’).value );”
    -
    Something like that should work. It will also work for using a dropdown of options. Hope that helps.

  137. Martin  December 8, 2008

    modifications required to use this script in the UK – define these after you get you simpleCart object:

    simpleCart.returnFormattedPrice = function( price ) {
    temp = Math.round(price*100);
    change = String(temp%100);
    if( change.length == 1) {
    change = “0″ + change;
    }
    temp = String(Math.floor(temp/100));
    return “£” + temp + “.” + change;
    };

    simpleCart.checkOut = function() {
    if( this.totalItems == 0 ){
    alert(”Your cart is empty!”);
    return false;
    }
    var winpar = “scrollbars,location,resizable,status”;
    var i,j=0,des,counter;
    var strn = “https://www.paypal.com/cgi-bin/webscr?cmd=_cart” +
    “&upload=1″ +
    “&business=” + this.userEmail +
    “&currency_code=GBP” +
    “&lc=US”;
    counter = 0;
    for (counter = 0; counter < this.items.length; counter++) {
    tempItem = this.items[counter];
    j = counter + 1;
    strn = strn + “&item_name_” + j + “=” + tempItem.getValue(’name’) +
    “&item_number_” + j + “=” + j +
    “&quantity_” + j + “=” + tempItem.getValue(’quantity’) +
    “&amount_” + j + “=” + tempItem.getValue(’price’) +
    “&no_shipping_” + j + “=” + “0″ +
    “&no_note_” + j + “=” + “1″;
    if( tempItem.optionList() ) {
    strn = strn + “&on0_” + j + “=” + “Options” +
    “&os0_” + j + “=” + tempItem.optionList();
    }

    }
    window.open (strn, “paypal”, winpar);
    return false;
    };

  138. Hey Brett,

    Thank you for helping me with above post dated Dec 8th. We added the code and it works fine in IE 7, but it doesn’t work in Firefox, Opera, and Safari. I’m using the latest versions of those browsers.

    Do you have any idea of what might be happening?
    Here is the sample cart that we modified: http://www.supportfresnostate.com/simplecart

    I added the input field to the first “Red Shoe” item. Again, IE works perfectly but no luck with the other browsers. That’s the last thing we need help with to get our simpleCart up and running.

    Thank you for your help!

    PS-I’ll donate a coffee or two as thanks!

  139. Hey Kmede, make sure you use an id=”formInput” for the text field. You will need to have an id on that in order to access it in the other browsers.
    -
    input type=”text” name=”formInput” id=”formInput”

  140. Hey Kmede, that page of yours seems like messed up a bit. Some products are on the bottom of the page. I’m running IE7.

  141. Jonathan Cutrell  December 12, 2008

    Brett,

    Incredible script. I have been looking for this for a long time, and you have made my day.

    Dying to see a “remove item” functionality. Also, entering in quantities doesn’t work for me… FF3 Mac. Not sure why… I’ll check it out again. May be the refresh/cookie check.

  142. Jonathan Cutrell  December 12, 2008

    One more Q… is there any way to have the total items read as a number rather than an equation?

  143. Federico  December 12, 2008

    brilliant!!

  144. juan carlos  December 12, 2008

    hi .. no idea to add a button to delete a simple product??? (not only full card).
    :~(

  145. bermanSR  December 12, 2008

    STAY AWAY FROM PAYPAL and it’s 21-180 days withholding of users funds per it’s User Agreement amendments allowing this at Paypal’s “sole discretion”!!! Read Paypal’s User Agreement! Paypal is NOT federally protected AND per their own policies, Paypal is NOT responsible for ANYTHING that happens to your money while in their service!!!

    BEWARE!!!

    Parent company ebay inc. is taking your money! Fire ebay’s CEO, John Donahoe, Now, before it’s too late!

    Search the internet for “Ebay Stockholders and Sellers Calling For Immediate Termination of John Donohoe CEO”

    at petitiononline.com

    see what ebay/Paypal’s own employees are saying about the corruption by going to glassdoordotcom!

  146. Well, I don’t like them, too. Hope Brett would make some other payment options…

  147. JordanC  December 12, 2008

    I figured out how to integrate this with Paymate.com
    Using a couple of PHP pages.
    A sweet alternative to paypal.

    Email me if you want me to send you the code.

    jordan (at) jaycodesign.co.nz

  148. Brett, amazing script! Thanks for offering it to the world.

    Two more questions:

    1. How can I add onFocus=”this.value=”” to the qty field in the cart? I’d like the user to simply click the field to clear it when updating qty or removing items.

    2. Your suggestion to Kmede on Dec. 8th didn’t quite work for me. Could the syntax be wrong?

  149. Amazing script ! Can’t wait for the 2.0 release. Any news about that Brett ?
    Thank you for this great tiny script.

  150. can i put worldpay in simplecart?

  151. Hello!
    Tell me please, can Your simplecart be modified so that it doesn`t use paypal, but the information about the customer`s order is sent to written (site admin`s) e-mail and customer`s e-mail?

  152. The app is so cool, but a erase button should be better and a option to change the quantity.

  153. Just realized something that maybe could help…

    I did some buttons for paypal some time ago, if the checkout is being made with a POST function then a “hacker” couldnt change the variables shown in the address before loading Paypal.

    Dunno, maybe helps.

  154. This is really incredible! Thanks for the hard work Brett. Has anyone had success using a PHP mailer script with this instead of paypal?

  155. Chandra  December 23, 2008

    Hey Brett!
    I just looked at Robert’s script what he had done using simple cart was pretty cool, i just implemented the same in my script…but got stuck in displaying the cart selections…could you or Robert help me out in fixing the same…here is where the link is http://flash.ezautomation.net/configurator/eztouchplc/config.htm , i need the quantity to be input filed and the row to be in one line…i’ll keep updated if i could fix the same…still looking for your suggestions

  156. Chandra  December 24, 2008

    Hey Brett…Thanks for such a wonderful script… Robert..thank you too…got that working…

    Thanks

  157. Great Job!!!
    I think the same that juan carlos
    How I can to delete a simple product?
    Thanks.

  158. juan carlos  December 29, 2008

    news about a button to delete a simple product???
    thanx

  159. modifications required to use this script in the EUR. Define these after you get you simpleCart object:

    this.returnFormattedPricePP=function(B){
    temp=Math.round(B*100);
    change=String(temp%100);
    if(change.length==0){
    change=”00″}
    else{
    if(change.length==1){
    change=”0″+change
    }
    }
    temp=String(Math.floor(temp/100));
    return”"+temp+”%2e”+change;
    };

    simpleCart.checkOut = function() {
    if( this.totalItems == 0 ){
    alert(”Your cart is empty!”);
    return false;
    }
    var winpar = “scrollbars,location,resizable,status”;
    var i,j=0,des,counter;

    var strn = “https://www.paypal.com/cgi-bin/webscr?cmd=_cart” + “&upload=1″ + “&business=” + this.userEmail + “&currency_code=EUR” + “&lc=ES”;
    counter = 0;
    for (counter = 0; counter < this.items.length; counter++) {
    tempItem = this.items[counter];
    j = counter + 1;
    strn = strn + “&item_name_” + j + “=” + tempItem.getValue(’name’) +
    “&item_number_” + j + “=” + j +
    “&quantity_” + j + “=” + tempItem.getValue(’quantity’) +
    “&amount_” + j + “=” + this.returnFormattedPrice(tempItem.getValue(’price’)) +
    “&no_shipping_” + j + “=” + “0″ +
    “&no_note_” + j + “=” + “1″;
    if( tempItem.optionList() ) {
    strn = strn + “&on0_” + j + “=” + “Options” +
    “&os0_” + j + “=” + tempItem.optionList();
    }

    }
    window.open (strn, “paypal”, winpar);
    return false;
    };

  160. I have an error in first line of js. Change the line:
    this.returnFormattedPricePP=function(B){
    for:
    this.returnFormattedPrice=function(B){

  161. I’m also burning for the 2.0, for checkouts via email instead of Paypal.
    But for the moment… thanx a lot for your work Brett! And for sharing it!

  162. Merry Xmass, people. I quess Brett was very bussy playing games… Come on, man. You can’t just leave a bate like this and NADA…

  163. Sorry everyone, I have been quite busy with things other than video games…. and video games… I promise that simpleCart(js) 2.0 will be one of my top priorities for the new year. helloRent.com has been taking up a lot of time, but I will put aside a day or two for the new release.
    -
    Please let me know if there are any other feature requests/bug fixes for 2.0.
    -
    Happy holidays everyone.

  164. Brett: Thanks for a great script. I’m sure I’m going to appreciate this even more as my time with it goes on.

    Question: On Nov 19 Andrew wrote about showing the cart quantity. Brett replied with the answer and I’ve found that it works. The trouble is my lack of knowledge. I am trying go get this show on the same line as my text. For example:

    “You have # items in your cart”.

    But the quantity shows on a separate line. I tried moving the code to the same line:

    There are items in your cart

    But no luck. Anyone out there (perhaps Andrew?) know how I can remedy this?

    Thanks in advance.

  165. Jonathan Cutrell  January 7, 2009

    Brett,

    I got a fairly early version of this code and went through and fixed the “totals” bugs. I’m wondering, is there any way to enter a new number in the text fields and update the cart to reflect the new number? I am implementing the code for a client who works with wedding stationery. The “add” quantities will be set to ten, as that is a fairly common interval for the people using the site, but if it is a big wedding, sometimes people need 200 or more invitations. This would require twenty clicks! Is there a way to make this possible?

    Thanks again for your bridge between javascript and paypal.

  166. Jonathan Cutrell  January 7, 2009

    Fixed it. Haha.

    Just added an anchor with href=”#” to get the user to click out of the fields, and adjusted the cookie refresh to 20 seconds (20000). Thanks again!

    By the way,

    Anyone found a “remove item” solution? I’m gonna work on it tonight. Changing my item to “0″ adjusts the final price only by subtracting the price of one item. So if I had 5 instances of the same $2 item and removed them all from the cart, the total display would show $8 ($10- the price of one = $8). Gotta have that fixed for the client.

    Oh, by the way… you did this out of the kindness of your heart? Haha.

  167. Some time ago, there was an brittish singer named Adam Ant and that weird song with the strange lyrics: ‘…fat little magpies with the $$ in their eyes…’. This was by the way… There are finalized solutions for flash carts on web like on flashden.com and so on… If this was for the money, Brett could make it long time ago. If this was for propaganda, it did it’s job. Any one of us could make a part of this job and make it faster, but I can’s see anybody’s contribution on this. Just stealing and complains, arghhh…

  168. too many bugs and things missing

    for starters:
    -back to store, link
    -remove item
    -more or less, quantity buttons
    -subtotal updates fine, but total doesnt update, keeps old info
    -negative values break the cart
    -etc

  169. LAE. José Juan M.  January 9, 2009

    Hey, here’s one view, if it were possible to modify the parameters of the Pay pal e-mail account, it then possible to detect the change, consider the following scenarios, assuming that the store would say a max. 150 items for sale and for that reason a person would be devoted to it 24 hrs. We could warn of changes in the front end of the site, a council would be to disable the store for a schedule that does not work, not recommended, or monitor from Firefox, with an extension called Update Scanner, warns that with a pop-up to detect changes in the Frond end, is just an opinion, thanks for letting us do ecommerce from a html editor, happiness and success.

  170. robert  January 9, 2009

    Brett,

    I’m not sure what part of rsh.js (really simple history javascript) fixes the “mini-cart number not changing on back click” but adding that script to the page does the trick. The number (in the bottom right corner) is changed according to any changes that were made in the shopping cart proper. Works both ways too. Going forward to a page and adding an item or three then back clicking to the shopping cart page and voila the new items are displayed as well.
    RSH.JS – http://code.google.com/p/reallysimplehistory/
    implemented at – http://www.silverplains.ca/test/simple_cart/sc_images_forbs.htm

    (Incidentally the JSON2005 script has no effect on the shopping cart.)

    BTW I’ve had over 80 visits from posting links to my site on this discussion page, and not one note from anyone. Did none of you see the left flyout?

  171. Robert, that page of yours seemed like messed up a bit. Is there any web shop? I honestly can’t see nothing but bunch of pictures. Sorry…

  172. robert  January 13, 2009

    Ivan, I have only been working on the test pages in FIREFOX (3.0.5), so I didn’t move some necessary files to call for the CSS fixes for IE7. It works better now but I have some tweaking to do on the cart page for that delinquent browser.

    But, you’re also right, the pages are just a bunch of images; there are icons for the shopping cart both just under the main (large) picture and in the bottom right hand corner of each of the four test pages.

    Perhaps it is too subtle.

  173. Eric Guerin  January 15, 2009

    Is there anyway I can attach the Address, Phone and other information to the order before sending it to Paypal using simpleCart(js)?

  174. Only 19 item????
    How change this?

  175. The data only about the 19 products can be sent to the future web page. Can Does the number of the products next to 100 change?

  176. hia, i love the script, anyway of just getting it to post the information to an email address and bypass the payment gateway? Also input information about customer aswell and post that to an email address too. Thanks, Paul.

  177. mantap mentong…….

  178. Speant all day trying to find out about posting a cookie by email and trying to format it but to to avail.

    I think it can be done though after all it generates it in html, could it be put into a hidden field but generated when its emailed in html? anyone got any ideas?

    A workaround could be to send to paypal and put a free transaction through and pay on delivary like a take away, thats the idea just to see if worked in principle. This option was not apparent its a fixed price.

  179. Hi Hi!

    I love this cart – I’ve done all the formatting and whatnot that I need to do, but I can’t get the currency converted to £ (GBP). I’m grateful that Martin posted his info on 8th December – and I’ve tried to implement it – but Javascript isn’t my forte!

    Martin (or other kind souls) Could you please give me an idiots guide as to where to paste your code?

    Many Thanks,

    Steve

  180. Nevermind! Got it working – I was too scared/lazy to trawl through the javascript… Got it now…
    Thanks very much Martin – your info from the 8..12.08 works like a charm!

  181. nanopayaman  January 19, 2009

    thanks for u info, i like this
    can im put this script ini blogspot ?
    i want use this program to my blogshop
    http://www.souvenir-unik.com

  182. Francesco  January 19, 2009

    Hi, nice script..
    I’m an italian developer, we work in EURO.

    I do this:

    set ” currency_code=EUR ” and simply delete the letter $ in the price string.

    Now works correctly with Euro.

    Excuse my english, regards, Francesco.

  183. afirenza  January 26, 2009

    Has author given up on this? Very buggy script. Promising idea but just doesn’t work. Hope he fixes it.

  184. MikeTek  January 27, 2009

    Great script, Brett – thanks for putting it together and, most of all, sharing it.

    I’m still having problems with the back button. I’ve tried in all major browsers. With a product in the card, hitting the back button causes a hiccup and a problem with the cookie. Essentially, a product gets “locked” in, and returning to the store page generates an error message “Item must have price, name and quantity!” The page can’t be reloaded at this point until the cookies are cleared.

    I’ve probably got something wrong, but I honestly can’t figure out what. Beating my head against the wall here…

  185. MikeTek  January 28, 2009

    Just a follow-up – I figured out what was wrong. I was using special characters in the product name. It won’t take an ampersand, either coded or as a straight character. I also has parentheses in there, but that was probably a pretty lame rookie mistake.

    Anyway, working fine now – thanks again for a great and easy-to-use script. Saved me a lot of time on this project.

  186. can somebody help me please, how do i add shipping rate?

  187. MikeTek  January 28, 2009

    I too would love to see an implementation for a shipping rate.

  188. MikeTek  January 28, 2009

    For anyone else looking at this tool and wondering about tax/shipping/etc, keep in mind PayPal offers plenty of these calculators as part of their Merchant Services. Simplecart(js) can really help streamline the cart population process – but it doesn’t necessarily need to answer all of these questions for you. I’d recommend leaning on PayPal for those extra calculations.

  189. Andrew Olgado  January 30, 2009

    I love it, really good idea. Thank you very much!!!

    Just a few points (amendments I’ve done/currently looking into):

    - I must have picked up the old version. Slight bug with displaying prices with decimal places. It rounds up the price and adds back the decimal place. I.e. it should have “temp= Math.floor(temp/100)” at the end of function returnFormattedPrice function

    - I’ve made some simple mods to add ’shipping’ and ’shipping2′ variables in PayPal to specify custom shipping charges per item. Using PayPal shipping methodology isn’t a good solution and overriding shipping is very important for some types of products.

    - Also Added ’shortname’ to display on summary page cart. I.e. name to be used only in “full cart” page where space is less restricted. Also shipping costs can also be shown in “full cart”

    - I’m looking into moving out the data (name, prices, etc) into XML file that is easier to update and more reusable (away from HTML code)

    Thanks again :)

  190. Hey Andrew, Thanks for your input. I am thinking, for 2.0, that I will have the option to import data from an xml. I am also planning on having shipping options and some other formatting options, but thanks very much for pointing those things out.
    -
    Also, thanks to everyone for being patient for 2.0. I know its been much longer than expected, but we have a lot of projects going on here at the wojo group, and I’m just trying to find some time to put some solid hours into this. Hopefully I will be able to get to this sooner than later.
    -
    Once, again, thank to everybody for trying out simpleCart(js) and let me know if I can help in any way.

  191. Does anyone know why I would be getting errors from PayPal saying that the Cart is Empty? Any help is appreciated, thanks!

  192. Hey everyone.

    I went overboard with this script in combination with jQuery and created a cart that’s really fun to play with. Tell me what you think!

    http://www.canoemusic.net/beta/store/
    (or after this week,)
    http://www.canoemusic.net/store/

    Matt H

  193. Nevermind. Figured it out. I was trying to apply this for a shopping cart selling comic books. I had “Issue #1″ as the name being passed to PayPal. Turns out that the “#” was screwing it all up. So now I just have it say “Issue 1″

  194. Well done, MattH. I’m glad that finally somebody made this ok. It’s really working, but without showing mouse pointer when clicking on order icons, CD or MP3. I’m on Vista, IE7.

  195. @Ivan, That’s because I’m using CSS to style the background of the order links rather than create unique gif’s for each button. IE7 also doesn’t round the corners of the elements. I primarily programmed or CSS3 browsers (Firefox, Safari, Chrome, etc…)

    Thanks for the compliment!

    My only issue now is similar to Jeffry’s; How can I pass weight for each item to the cart?

  196. Rene Fournier  February 5, 2009

    Can someone help me figure out why my cart doesn’t simply items in IE 6/7, but does in Safari and Firefox? (And how to fix it):

    http://www.signsupplysource.com/store/

    Thanks.

    …Rene

  197. @Rene, Wow! I love your cart!

    How did you code the “-” and “+” buttons for quantity? Really nice interface and usability.

    Matt

  198. I need someone to help me with the code… so I can have a selection for 1 – 350 sqaure inches for an item I charge for by the sqaure inch. How do I add a pull down form, to select like “300″ and have that multiply by my price per sqaure inch, like “.60″ cents. 300 X .60 = $180.00?

    Help? I have tried… but you know how it is, I don’t know enough… yet!

    Thanks in advance for your help.

  199. Hi

    Thx to permit downloading and using this great script. Is it possible to make a donation for this awesome work I use every day ?

    however, I can’t add a button on the right (in the cart) to delete product (”-1″ each click), you see ?
    Is someone got an idea to solve this ?

    Thanx for all Brett !
    Have fun

    Sk

  200. Hey. Intimacy is what makes a marriage, not a ceremony, not a piece of paper from the state.
    I am from Libya and too bad know English, tell me right I wrote the following sentence: “If you are a member please log in to build a resume or to view your existing resumes.”

    Thank you so much for your future answers :D . Shalya.

  201. Hi Brett,

    This is the most user friendly shopping cart I’ve ever seen! Simple, and eloquent. I can’t wait for version 2 to be released.

    Cheers,
    Brian

  202. I also can’t wait for the 2.0! Any news??

  203. Hi, your cart is excellent. I’d be very grateful if you could let me know a quick and easy way to implement a hyperlink back from the product-image in the cart to an html item or page ie adding product url to an item in the cart. I’ve been trying to do this for hours without success… Thanks :)

  204. Lost my hope… Found another solution… Greets

  205. Ivan – what other solution did you find?

    Brett – what’s the word on v.2? Is it dead? I think you first mentioned it like 3 months ago – well, I think it is closer to 4 months now.

    Did anybody else make any additions or find anything else out there?

    Thanks

  206. Hey guys – I do owe an apology to everyone. My plans for quick revisions have failed time and time again due to a crazy schedule. However, I am working on simpleCart(js) and I will keep everyone updated as things progress. Thanks for your patience and I hope to have something for you guys soon.

  207. kiko  March 3, 2009

    How to pull the products dynamically, such a database?
    How to change the items to be displayed: picture by picture, for example?

  208. Jeffr  March 3, 2009

    Brett,

    Please pull an all nighter for us and post version 2 along with a button to let us donate! :) Maybe even a beta version if you have to.

    I have a project that I need to show a client in a couple weeks and I’d love to use this solution. However there are too many issues with removing items and changing quantity in the cart for this to work right now. A way to implement shipping would be needed too.

    Rene on Feb 5 posted a link to a store that seems to have solved the removing/changing quantity issue and it has shipping. I assume he’s using a modified version of simpleCart. I would love know how to also achieve this.

    Thanks for putting together simpleCart. I’m really hoping to see 2.0 soon!

  209. Jono1  March 4, 2009

    can anyone help me with the conversion to GBP from USD.

    I am looking to iumplement this asap but i need to resolve this and i have very little knowledge of the JS.

    I have looked through the advice from martin but dont really know what to do with it.

    Would anyone be able to post an example of the full Java code for GBP??

  210. mario  March 4, 2009

    SBLsKe h1! nice site! oxyutelno

  211. Kenny Dread  March 5, 2009

    Love it!

    How do I tell the .simpleCart_total not to display if there is nothing in the cart or the total is zero?

  212. Jono1  March 6, 2009

    If anyone has managed to achieve the above it would be great to know how.

    I have now managed to get the GBP working but would also love to know if anyone has managed to set up the cart so that you can remove individual items from the final cart?

    Regards
    Jon

  213. Kenny Dread  March 6, 2009

    How do I send specific form data to Paypal like the codes for subscription products?

    When I send the value as an options in SimpleCart PayPal does not accept it as a form element…

  214. robert  March 9, 2009

    @Brett,

    Wondering if you could do us all a favour?
    Instead of having to visit your site on a regular basis in the hope that the new improved simpleCart(js) is ready, perhaps you could agree to let those of us who have been contributing and waiting expectantly know when version 2 is posted by way of emailing us.
    In the meanwhile, is there anyone visiting this website who could show me how to place orders to myself by way of email; I am producing a custom product and posting orders through PayPal is not appropriate yet. I think this requires CGI or PHP or both and I haven’t a clue.
    http://www.silverplains.ca/test/simple_cart/sc_images_forbs.htm : If you can help please contact me by way of the left flyout panel.
    THANKS

  215. @robert,

    Yeah I will email everyone who has posted a reply with an email. Hopefully you won’t have to be waiting too much longer…

  216. robert  March 11, 2009

    @Brett
    THANKS; I look forward to hearing from you.

  217. thrilled to be part of anything SimpleCart! thank you!

  218. Jono1  March 12, 2009

    Hi Again,

    Has anyone managed to have diff data on the product page compared to the full cart page?

    I only want it to show that you have x items and that will cost x money on the product pages, but on the cart page i want the product information colums and full details.

    I tried using another JS for the other page, which works but does not empty the cart as it should when i switch back to the product page.

    Jon

  219. pikou  March 12, 2009

    @Brett
    Thank you very mush for your work.
    Looking forward to v2.0 :)

  220. This looks so cool. Can’t wait for V2. Thanks Brett.

  221. Ichigo  March 17, 2009

    Hi Brett,

    This seemed really cool and easy compared to lots of other sites. I am a real NON-Techie person.

    Few simple questions and hopefully you can help:
    - can this be used on blogspot? Easy enough or I have to code it?
    - can I have an option to pass the cart info out to email instead of PayPal as some of my shoppers uses bank transfers or internet banking instead? My shoppers are too young to have a credit card.

    Please help as i am not getting answers anywhere. So sad…

    Thanks in advance!

  222. Ichigo  March 17, 2009

    Errr.. here’s my super simple site which obviously needs a revamp – http://ichigonoya.blogspot.com

  223. Craig  March 17, 2009

    Hi, Im planning on linking this cart with a database i would like to add max product quantity’s and when the products quantity’s reach 0 put a sold out image how would i go about this? Hope this makes sence

  224. John Wilson  March 18, 2009

    Thanks, this is a great script, I’m already working on a site just so I can use it.

    Looking forward to Version 2 too.

  225. HUGE PROBLEM:

    Can the cart not be a fixed size?

    now if someone only wants one item you have to have a huge layer for just 1 item and if someone wants a lot, the layer might not be big enough, now what?

    The cart layer should adjust in size to fit the cart items only.

    Did anyone figure out a fix for this?

  226. @jono1 – the current total and quantity are available anywhere by simply creating a container with class=”simpleCart_quantity” and class=”simpleCart_total”
    -
    @Ichigo – I’m not sure if someone has implemented this on blogspot yet, so I’m not sure what would need to be done with it. I would assume you can pretty much use it in the same way. Some other people in this thread have talked about implementing an email method, so you may want to see how they did it.
    -
    @Craig – depending on how you’re getting information from the database, you will need to do some custom coding for that.
    -
    @omar – i’m a little confused about what you mean by the cart layer being a fixed size… can you try to explain it a little more?

  227. sure..in the cart style example, you have:

    .simpleCart_items{
    overflow-y:auto;
    overflow-x:hidden;
    height:324px;
    width:243px;
    margin-bottom:20px;
    }

    where the height is set to 324px in this case, that can be easily changed bu the problem is that it will always be that fixed height, no matter how many items are in the cart, that height should increase/decrease depending on number of lines in the cart. If you play with it and put a lot of items, you’ll a scroll bar but it didn’t work for me, anyway, please look itno it and see what you think and if there’s an easy fix. Love the cart though, I’m adding to a site as we speak.

    thanks,
    omar

  228. robert  March 18, 2009

    @omar
    Check out “examples.css” file for a different way to create the display of information in the shopping cart. Brett’s original uses table HTML, the one I developed uses DIVs instead. http://www.silverplains.ca/test/simple_cart/sc_images_forbs.htm — add a couple of items, then go to the cart page to see how it looks — if you haven’t already visited my site.

    Generally speaking, whether using tables (with etc) or DIVs you can set heights to auto or use percentages. (You will notice, though, that most of my heights are in EMs. They are the best way to go.) Using overflow-x and overflow-y is not a good idea if you can avoid it; it doesn’t validate if that is a concern. (http://validator.w3.org/)

  229. Get rid of the overflow-y:auto;
    simpleCart isn’t dependent on any css. All it cares about is your div class names. So you could scrap that entire block and make your css from scratch. So the overlow-y:auto; is what you do in css to have scroll bars appear when the content grows larger than you’re height. I would recommend not using any of the demo css for your own projects. Thats what makes simpleCart so great.

  230. Jono1  March 19, 2009

    Cheers Brett,
    The main issue i seem to be having however is the issue of changing the qty but the amount always only removing all but one of the items. So if i have 8 of a product in my bart and set qty to 0, it removes the product but still shows there being a value in total value.

    Also if i then click go to checkout, it does not load cos it thinks the cart is empty. which is good, but why is it still showing a value in the cart.

    jon

  231. Hey Brett,
    Great script, tiny but strong. Can’t wait for the next update ! Please keep all of us informed by email.

    Thanks and congratulations for your work man.

  232. Just what I was after…thanks! Will be keen to see version 2.0!! :)

  233. I’m working on e-mail option for sending order. Chandra’s made it somehow, but without inputs for customer’s name and email, so it’s not it. I’ll try to conect it with formtoemail.php, formmail.pl, etc.

  234. Hey Brett. Great script you got there. Thanks for sharing.
    I just found one bug regarding the quantities. When trying to change the quantities in safari 4 or the latest release of firefox 3.0.8(those were the only browsers I’ve had the chance to test with) the form loses focus really easily. There have been several times where I would change the quantity of an item only to have it revert to the original value.

    With the exclusion of that one small bug, this script has been a god send. Thanks!

  235. What if you don’t want to use paypal? How about just emailing the order to someone…. Is this possible?

  236. I replaced a link in a script, one that leads to paypal with one that leads to formtoemail.php on my page, but… uh… Sometimes it works, sometimes not. I can’t believe it. And put the inputs for name and mail address of the customer. All I got is mess on the page. Not worthy…

  237. Ooops, sorry Brett, it is worthy. Got it working, but mails are coming empty, with syntax error. Maybe bad connection between script and php. Any idea, anybody? Please, look at: http://www.dvdkaraoke.info/shop/index.html

  238. Damn people, that is just for showing, don’t click on checkout, I’m full of empty mails.

  239. Atul  April 2, 2009

    Thats a great shopping cart brett. But i wanted the same cart to be carried out on different pages, so heres what i have done and now i have cart on whole site instead of only one page.

    I added the following at the top of the simpleCart.js

    var simpleCart;

    function loadCart()
    {
    if(simpleCart == null)
    {
    simpleCart = new cart(”brett@wojodesign.com”);
    simpleCart.initialize();
    }
    }

    and then on each page, where i need the same cart, i simple use the following, instead of creating a new cart-

    I will also modify the cart to put server side verification for security purposes.

    Thanks,
    Atul

  240. Atul  April 2, 2009

    My bad , forgot to put the line for each page, heres it-

  241. Atul  April 2, 2009

    <!– –>

    Remove the comments from the above line..

  242. Atul  April 2, 2009

    sorry guys, it was html, so site was eating it up, use the following code inside body tag of each page.

    onload=”javascript:loadCart();”

  243. Dorian  April 4, 2009

    Thanks Francesco

    Dorian
    Malta

  244. Lucas  April 7, 2009

    Hi there!

    I am currently getting a Database error after just dropping and dragging the files onto my server. Is there something I overlooked?

    Thanks,
    Lucas

  245. Ryan Gonzales  April 8, 2009

    Would it be possible to attach a drop-down list to a product?

    For instance:
    Black Shoe
    [Size Dropdown]
    Price

    Typically in forms as “”

    Thanks! Good work!

  246. Ryan Gonzales  April 8, 2009

    * in forms as “select”

  247. Darren  April 8, 2009

    Would it be possible to make version 2 work?

    ta

  248. Kenny  April 9, 2009

    I love this little script – thanks.

    I want to use it, but need a couple of things.

    When they click checkout it needs to simultaneously send a form that is on the page.

    Checkout

    The above is the form submit and then simplecart checkout. (2 buttons) Anyone know how I could combine the two so it sends the info on the form fields that I have created on the page, and also goes to paypal.

    Also, what URL do I put in there?

  249. Kenny  April 9, 2009

    sorry that was dumb. where it says Checkout …

    inverted tags, hopefully wont happen like this.
    this should be there ..
    > input type=”submit” name=”submit” value=”Submit” a href=”#” class=”simpleCart_checkout”>Checkout</a<

  250. Daniel  April 12, 2009

    Hey Brett is there a more specific tutorial for using the cart on blogspot. This all new for me I a just cant seem to fiquire it out.

  251. pikou  April 14, 2009

    Come on Brett your fans are waiting for v2.0 out here.
    Are there any news on the progress of the development for v2 ?

  252. Jono1  April 15, 2009

    I agree, i am holding a project currently for the arrival of v2.

    Do we have a honest idea of when we might see it? Also add a donations area so i can donate to you for your work on this project.

  253. hcabbos  April 15, 2009

    I ran into this just the other day. Looks slick. Works with JS off, too. The only downfall is there’s no documentation with tying it to a checkout script.

    jCart
    http://conceptlogic.com/jcart/

  254. omma2289  April 18, 2009

    Loved the script, thanks.
    Just wondering if there’s a way to make the “add to cart” links take you directly to your cart, I tried replacing the href=”#” for the url of the page but for some reason it doesn’t work.
    Also, in Google Chrome I can only see the cart in the same page I add the items, when I go to the full cart page it appears empty, maybe it has something to do with the cookies but I’ not sure.
    Thanks

  255. Jason N  April 23, 2009

    Love the script Brett, anxiously awaiting version 2.0. I have a couple of questions 1. On my “Full Cart” page when trying to change the quantity the numerical value reverts back to what it was prior i.e. changing from 1 to 2, reverts back to 2. Secondly, I wold like to know how to have a drop down that will allow the customer to select a quantity, and then have this update the product quantity and price.

    Thanks

  256. Darfuria  April 26, 2009

    Just wondering how I can go about customising the Paypal request so that it can feed the purchase data back to my server, to continue an order. Anyone got any tips on this?

    For those of you who want to run this from a database – using a simple while loop makes it easy enough.

  257. Jono1  April 27, 2009

    Has anyone got this working with google ecommerce analytics yet?

  258. darby  May 4, 2009

    AWESOME, thanks for sharing this script, very generous. My question is there a way to have the item popup in the cart in a set particular order, not just the order the buyer clicks them in, OR have particular items popup up in their own particular divs? I’m trying to have the item quantity/price show up under the larger thumbnail of each corresponding item. thanks!

  259. ivan  May 8, 2009

    Quess this will be just another urban legend…

  260. Lana  May 10, 2009

    Its great but we can’t add prices such as 9.45 for example, it doesn’t work. too bad :-(

  261. Desmondo  May 12, 2009

    Darn! This article post is just a traffic driver. Wasted 4 hours of my life on this non-working script. And looking at the source code it’s far too messy for a cleanup.

  262. Matt H  May 13, 2009

    @Desmondo – This script has worked great for me, even when using complicated IPN for digital content delivery. It has a few small bugs and limited security, but otherwise it’s a great script!

    We’re just all sitting tight for version 2.0 and making suggestions in the meanwhile. User hcabbas made a suggestion for using jCart as an alternative, but I’m pretty sure there aren’t many other options out there like this.

  263. nancy  May 14, 2009

    looks like the math and cache bugs have been there for several months without any fix

    a casual test of the script reveals the bugs

    its a nice idea but in its present state its not usable

    i wish the author luck

  264. craig  May 17, 2009

    hi just to see if v2,0 is coming out soon
    thanks

  265. Xavi  May 18, 2009

    waiting for v2.0!! we need change currency…
    Yes Brett, you can!! ;)

    make a donation button!

  266. damienluc  May 18, 2009

    no he cant

  267. BIlly  May 19, 2009

    This is an awesome, slim shopping cart. I would love to see support for a payment method other then just PayPal.

    There is a really nice Authorize.net framework/module on sourceforge that this could possibly be tied in with.

    http://sourceforge.net/projects/authorizenetpay/

    In the future, I could see this becomeing a full shopping cart with an admin area. Generate the product links via the admin, and then just copy/paste them onto an image in the frontend of the site, etc.

  268. pg2sg2  May 19, 2009

    “I could see this becomeing a full shopping cart with an admin area.”

    Then it wouldn’t be a Simple Cart, would it. Plenty of heavy duty Carts out there that work well.

    I think what got people interested in this one is the simple/lite concept. But as others, who have actually taken the trouble to try it out before commenting have noted, it needs some work.

  269. BIlly  May 20, 2009

    It would still be pretty simple. I am not talking about turning this into an oscommerce clone. It would just have an area to review orders and add products.

  270. BIlly  May 20, 2009

    Also, If the products were generated in the backend and the prices pulled from a DB that would eliminate the security issue of people being able to edit the prices in the cart.

  271. SimonDole  May 26, 2009

    Lots of Ifs guys. A lightweight cart that just stores/retrieves data to a cookie is very easy to do but not user friendly. What makes it usable is simple add/delete functions. But this cart doesn’t even add up correctly! Pretty basic fail if you ask me.

  272. Richard Testani  May 26, 2009

    I noticed a few users having issues with the checkout and empty cart links, I’m having the same problem – they are not working for me either for some reason.

    Anyone know why this might be happening?
    Thank you
    Rich

  273. pikou  May 28, 2009

    Hello people , maybe it would be possible for someone to fork this project and give it the finishing touches it needs.

    Just some wishful thinking.

  274. davidoo  May 28, 2009

    more effort has gone into the shiny pics and graphic design than the faulty code. come on brett, time to fess up. have some respect

  275. Jono1  May 28, 2009

    Could davidoo post a link to his cart that we can use. Obviously i’m sure it works fully so i dont mind if it does not have “shiny pics and graphic design”, as long as the code is all fully functional and free.

    I have a version of this cart currently working on a site, and generating a lot of sales and a much better response than i thought it would.

    If you are going to take on a project using code that someone has taken their own unpaid time to create, then work around things and take your head from where ever you parked it and learn some code to fix any small bugs.

    This is a great starting block and in my honest opinion it would be YOU that needs to show respect for both the author and for the whole concept of open source. If you have problems with something, then request a fix and wait. If you dont get a reply then either sort it yourself or use something else.

    Maybe we should start a thread here to post any issues we want sorting. To add a new bug or issue then copy the list from above and just add yours to it. That way there is a ongoing list for someone to work through. (Maybe even mark them as optional or critical)

  276. SimonDole  May 28, 2009

    Jono1 – I think what davidoo and others are referring to is the fact that this has been offered incomplete. Many people will download this project and spend hours on it only to find it doesn’t work and that Brett had promised an update months ago. It’s generous that it’s free but it’s disrespectful in the sense that it willfuly wastes the time of genuinely interested people. Even Brett’s own demo doesn’t calculate correctly (switching between basket and product pages and correcting quantities) so if you claim to have a functioning cart then could you post the code please? Thanks

  277. Jono1  May 28, 2009

    I am just saying that to berate the guy for developing this to where it is so far seem a bit out of order.

  278. caravagio  May 28, 2009

    have to agree with SimonDole – would like to see a completed version that adds up correctly and has add/delete buttons. not berating the guy. – c.

  279. DF118  May 29, 2009

    I also downloaded this and spent three days trying to get it to work and just found problems like described here.
    .
    There are other carts out there that work that I could have spent my time on.
    .
    Why do this to people?
    .
    I WILL berate the guy because if you post something like this and accept the praise you also got to take the criticism.

  280. Manjit  May 30, 2009

    Hi. This is a really useful tutorial and seems to be working fine. It is ideal for what I need it for (a temporary shopping cart, until the actual one is ready to use)

    I am having trouble changing the ‘$’ into a ‘£’ sign. Just wondering if there are any latest updates on this?

  281. carsonoma  May 31, 2009

    unusable

  282. MattH  May 31, 2009

    I’m not sure why this script is getting banished all of the sudden. It’s not unusable, rather it is what it is… a simple cart.

    I’ve used it for over a year and never had an issue with my customers. We’re selling mp3 albums which includes sending tricky details to the paypal IPN to run PHP scripts after checkout and it still works flawlessly.

    I recently made a little modification and it’s even simpler. See : http://www.villageten.com/store/

  283. Manjit  June 1, 2009

    I dont think this is unusable, I would love to actually use this cart on my site because it is exactly what I need. The only problem I have is that I cant change the damn currency sign!

    Still waiting for version 2 (if it is coming!)

  284. Jono1  June 1, 2009

    @Manjit,
    Is it the currency being sent to paypal you are having issues with or the currency sign that is displayed on the site?

    Jon

  285. Manjit  June 1, 2009

    Hi Jon, its the currency sign that is being displayed on the website, ive tried out the things that some people have said on this posting, but none of it seems to work…

  286. robert  June 2, 2009

    I agree with many of the posters above that this shopping cart suits my needs. I have checked out many others and unfinished though this one is, it shows the most promise.

    I wonder, Brett, if you could move simpleCart.js over to Google Code or sourceforge which would allow other people to contribute in the respective forums. Perhaps then many of the idiosyncratic details could be worked out for individual users; like: adding in sales tax and variable shipping rates, or sending the order through methods other than PayPal. This is, after all, an Open Source project. (Unless, of course, you have some sort of arrangement with PayPal.)

    BTW: To the few posters to this page who add links to their adaptations of this code, what is the point of directing us to a compressed version of simpleCart.js? Such practise is not Open Source friendly.

  287. MattH  June 2, 2009

    @robert. You’re right about compressed versions helping nobody. If you were trying to look at my modification (which is mostly from a previous user Rene Fournier), here you go.

    http://www.villageten.com/includes/scripts/simpleCart_modified_uncompressed.js
    http://www.villageten.com/includes/scripts/simpleCart.css

  288. ivan  June 2, 2009

    just waste of time.

  289. pikou  June 3, 2009

    Maybe Brett does not even read these posts any more?

    Maybe a few emails his way would serve moving the project to Google Code or sf.net better?

  290. Jono1  June 3, 2009

    @Manjit,
    The $ sign on the product pages is just part of the text describing the price, so changing these should not be a problem. The $ in the JS page would define what is shown next to the price in the cart.

    Is it the cart area you are having issues with? If so i can have a look, as on my site i just removed it as i think once people have purchased a product the know what currency they are buying in.

    Let me know and i’ll have a look.

  291. Jono1  June 3, 2009

    @ Manjit,
    In the simplecart.js code you should find

    return”$”+temp+”.”+change}

    this dictates that your cart shall show prices as $ followed by the pounds (temp) and pence (change).

    Change this to

    return”£”+temp+”.”+change}

    This will replace the $ with a £ as the £ is the number value that html identifies with the £ sign.

    Hope this helps.
    Jon

  292. Jono1  June 3, 2009

    that last comment was wrong.

    In that code i gave you you need to insert
    return” &-#-1-6-3-; ”+temp+”.”+change}
    but without the – signs. I have had to put these in as otherwise the page will see it as a £ sign and display it accordingly (as it did in my above post).

    So basically replace the $ sign with &-#-1-6-3-; without the – symbol and that should work for you.

  293. twongo  June 5, 2009

    this script is just linkbait folks so forget it

  294. twongo  June 5, 2009

    @Matth, @manjit… how do you know its not unusable? the reason its unusable has been pointed out by the annoyed posters already. check it

  295. juan carlos  June 8, 2009

    hi… please any news about the botton (link) to delete simple items?? :)

  296. Danny  June 8, 2009

    Brett, you are the king of all that is good. We need more people like you on the net.

    After spending the last 2 hours trying to figure out what to do on the horrible, horrible Zen Cart interface I found my way to your page.

    Looks promising and customizable. Thanks for posting.

  297. Manjit  June 8, 2009

    @Jono1

    I just tested out the shopping cart with what you said and it works a treat!! Cant wait to get this finished and up and running. Im hoping to incorporate this with a database. Thanks for your help.

    Just another quick questions though, is there a reason why the products dont save in the shopping cart when the page is refreshed? and also, will i have a problem with this if I am using the shopping cart on other pages too?

  298. K Walker  June 9, 2009

    Hi Everyone. I am completely stuck with changing the currency to GBP. I have done all that has been posted. When i view the pages it is all still in us dollars. Is it my browser not updating or something. I have spent hours looking for the solution. This is the first shopping cart i have ever attempted. Could somebody please help or post js file on here that works with GBP.

    It would be greatly appreciated, P.s think the cart is awesome though

  299. Manjit  June 10, 2009

    @K Walker
    Do exactly what Jono1 wrote a few posts up and itll b working in no time.

    if you want my copy of the script with the ‘£’ modifications here it is… http://www.forwardslashtemplates.com/testarea/site_files_simpleshop/scripts/simpleCart.js

  300. Manjit  June 10, 2009

    Does anybody know what I would need to do to make the seperate ‘remove’ button for each item added to the shopping cart?

  301. Jono1  June 10, 2009

    @Manjit,
    -
    Basically you may find you start seeing a few of the bugs now. If you remove items from the cart the code has a habit of not recalculating the total corectly. This is well documented above so i wont go on about it. Although one way round it is to hide the total in the css using display:none;. Although this is not a great solution as it means your user wont know the order total until they are passed to paypal.
    -
    -
    In order to do what you want the easiest way is to instruct the user to set the qty of an item in the cart to 0. Its not as easy as a button but its better than the option of coding a button that works with this script
    -
    You may find that when you click in the QTY box on the cart, it does not give you enough time to actually enter a new amount before the page refreshes.
    -
    If this is happening then you will need to modify the code in your simplecart.js.
    -
    Find the code that looks something like this:-
    -
    var ElementCheckInterval = setInterval(”simpleCart.updatePageElements()”, 2000);
    -
    The 2000 will not be the right amount, it will be much lower. But by increasing this it will increase the time it takes the page to update the page elements, therefore giving your user time to click on a update button**.
    -
    -
    **It might be an idea to have a button on your cart called UPDATE CART that once the user has set the qty to zero they can click to update.
    -
    The simpliest way to do this (although not maybe the best?) would be to set a link to just refresh the page, such as
    -
    UPDATE CART
    -
    This will then just link your cart to itsself and allow the cart to refresh.
    -
    Jon

  302. Jono1  June 10, 2009

    The code for the button above is
    just a link with the href=”#”

  303. robert  June 10, 2009

    @Jono1, @Manjit, et al, I have posted about some of this way back when: I don’t know which part of the rsh.js file (reallysimplehistory) works to update the cart total but having that file included with simpleCart.js makes it work the way you want. This includes back clicking to the page you were on after viewing and even making changes to the shopping cart items. What Jono1 is recommending is the way I set up the “update” button on my shopping cart page. It’s a dummy button that doesn’t do anything. Clicking away from the box with the number in it is what causes the number to change. The fake button makes the user feel reassured. What Jono1 is saying about the ElementCheckInterval is correct. Mine is set to 20000.

    While I’m here, can anyone of you tell me if going to Paypal adds in sales tax and shipping? (Maybe I can try this out with PayPal, although I was hoping to use something like Authorize.net.) Thanks

  304. hello…anyone can help me to change the format in the demo of http://thewojogroup.com/simpleCart/myCart.html to be like this

    Product that you buy:”Name1″,”Name2″,”Name3″
    Total: “total price”

    for certain reason i would like to make this format. anyone can help me??thx

  305. juan carlos  June 15, 2009

    Hi robert
    —–
    While I’m here, can anyone of you tell me if going to Paypal adds in sales tax and shipping?
    —–
    sets rates of sales prices with paypal.

    f.e: 0 – 10€ -> 2€; 10 – 30€ ->5€

    Paypal automatically added This amount to the final price of purchase.

    sorry for my “googletranslator” english ;)

  306. ivan  June 15, 2009

    I can’t believe you’re still wasting your time with this… It’s just useless…

  307. julio  June 16, 2009

    How soon will have available the new version, Brett?
    Great script!!!

  308. Hey all, thanks for all your interest and responses. I am currently testing version 2.0. Hopefully it has fixed all the bugs in the original, and I have added a couple features that I’m very excited about.
    -
    If anyone would like to test an early release of the new version, let me know. I would love some help making sure we can avoid the problems that version 1.0 experienced.
    -
    As soon as the code is stable, I will release it to anyone who has commented on this article before the official release.
    -
    I will keep everyone updated, and thank you for your patience. I have not been able to contribute as much time to this project as I would like, but we will be moving forward soon with 2.0 soon.
    -
    cheers, brett

    • Brett: I would love to test version 2! I’m looking forward to the release.

    • Brett,

      Simplecart is exactly what I need with the exception of no email checkout. I’m really hoping you’ve implemented that in 2.0 and that it’s coming very soon! Thanks for this!

      Best,

      Chris

    • Hi Brett, add me to your early testers list – this project is a brilliant idea!

    • Hello Brett,

      I have finished the whooooole website and now i’m stuck at the very end part of it… I just realized i can’t actually post the cart’s items to my mail :(

      Really, isn’t there a way to just put the simpleCart_items into a textarea?

  309. BIlly  June 16, 2009

    Hey Brett,

    That’s Great News. I would be more then happy to help you test out version 2.0. I am eagero se the new features in v2.0.

    Billy

  310. robert  June 16, 2009

    @Brett, I’ll test out the new version for you.
    @Juan Carlos, thanks for the input.

  311. .rico  June 17, 2009

    good news Brett ;)

  312. jono1  June 17, 2009

    Hi Brett,

    I will happily try out version 2 for you.

    Jon

  313. Manjit  June 17, 2009

    Hi Brett,

    Do you have an estimated release date for verson 2?

    Cheers

  314. Frank  June 17, 2009

    Happy to test it for you :)

    Frank

  315. pikou  June 17, 2009

    Hello Brett !!
    It is very good to hear from you again.Very glad that you have stuck with the development of the script and eagrly awaiting v2.0
    Great news indeed :)

  316. K Walker  June 17, 2009

    I would love to test it for you. please let me know how

  317. Yong Kang  June 19, 2009

    Hey Brett

    Would love to test out v2 for you. This will come in really handy, I’ve had to reject a few clients with such requirements as their needs did not warrant a full-fledged e-commerce cms but neither could I roll my own. Looking forward to customizing and integrating this.

    Great work!

  318. ivan  June 19, 2009

    Come on, people, it’s such a bite…

  319. Jono1  June 20, 2009

    Just to let you guys know quite a few of us are testing this currently for brett and its got some great features.
    Its certainly a much more complete product and fits the bill perfectly from what i can see. Also its not too buggy at the mo so therefore i recon may be available fairly soon, but watch this space.

  320. Kevin  June 20, 2009

    I love you guys this is perfect for me you satisfyied my content heart

  321. looking forward to v2.0! can’t wait to try it out.

  322. juan carlos  June 22, 2009

    Hi brett.. no problem to test V2.0. let me know how

  323. lele  June 22, 2009

    v2 WOW!
    i’m ver exited! thanx!

  324. Gary  June 22, 2009

    Great news about v2.0. Thanks for your hard work and generosity.

  325. Brian  June 23, 2009

    Thanks, cant wait to test it!!!

  326. Richard Testani  June 23, 2009

    Notes about simpleCart 1.1

    - It’s probably a good idea not to use names with quotes in them. Seems to break the updater since they are not escaped.

    - Weight is not inherently supported, so then neither is shipping by weight. You can setup shipping by number of items in PayPal.

    -The GET string includes all information which is easily viewed when the checkout button is clicked. Basically a security issue in terms of being able to change pricing and quantities.

    -Probably obvious, but only support Basic WebPayments.

    This list isn’t meant to criticize simpleCart, as I am currently using it – its quite fantastic really. Just while getting my site going I came across these pitfalls and am passing them on.

    I’m sure some of these issues will be resolved in the next version, otherwise the code is pretty clear and not too bad to hack, and modify.

    My 2 cents.
    Rich

  327. Dean  June 24, 2009

    Absolutely superb – top job and thanks! Lovin it.

  328. Paul  June 28, 2009

    A great thing, for a mini-business like ours it is just perfect. Thanks.

  329. K Walker  June 29, 2009

    Hi Brett

    any news on when v2 will be officially released. Thanks again for the hard work.

  330. Craig  June 30, 2009

    Wow, I just found your site and its exactly what im after. There are just 2 points that trouble me…

    The items are sell are just 1 off so i dont want the change quantity boxes. I understand i can disable this via CSS but this leaves 2 other issues;
    – Someone could just add the same product again, thus still ending up with 2 items in their cart.
    – There isnt a way then of removing the item if there is no change quantity box.

    My second issue is shipping – Im looking for by shipping to be based on £x for the first item puchased and then £y for each additional item. I cant set this up in PayPal (as far as im aware) but is it something built into v2 as i see a lot has been mentioned on shipping previously!

    Kind Regards
    Craig

  331. Can anyone help me with adding a dropdown size option to an item? I’m guessing I’m not using correct syntax…
    thanks

  332. This is exactly what i have been looking for.

    Thanks guys!

  333. Dudes, yours@yours.com can easily be changed by anyone, so is it security hazardous.

  334. This simpleCart is that I was searching for! It’s amazing!! When will be the version 2 avalaible? I’m very excited to add to my website! I really love it! Thanks!

    PD: I aprecciate if you put and Paypal acccount for a contribution!

  335. Thank you very much.I have implemented a webshop with simplecart. I should like to calculate in euro’s! My website is in the testing phase .
    If you want i can give you the adress.
    When is the version coming with a choice of Us$ and Eur?

    again thank you the code.

  336. I just downloaded v1.2 and it’s great – just what I am looking for, the problem I have is that I can’t change the quantites, but in the demo I can! I haven’t changed anything and I was trying it ‘out-of-the-box’ so to speak and I tried clicking and changing a quantity but it won’t change.

    This is the only thing in my way now and until I overcome this problem, I can’t implement it on my site – is there an issue with the current download files? I tried it in Intrnet Explorer and Firefox but still can’t change the quantities when I click on them.

    Any help would be very much appreciated!

    Thank you for a great product!

  337. Hi, I’ll keep an eye for v2.0. Take a look at my version of your Cart http://www.aaelectronicsw.com/en/ been reworked alot. Added alot of php support for security, prices update with quantities … Thx for simple cart, good work.

    • Brett great work.

      How long until version 2?

      thanks

      Geler, you stuff looks great as well.

  338. Hi

    i want to add in basket two buttons + / –
    Can i do it?

  339. Based on that last post I’m going to agree completely.

    Got to go for now.

    Cheers

    Scizzbo

  340. How does Google Checkout overcome the same security issues?

    It looks like the demo page is running simpleCart ver 2.0 I would appreciate the chance to test this version. Please let me know if Beta testing is available.

  341. Hey Aaron, the security issues will continue to exist for a client sided shopping cart, but there are ways to overcome it if you have a higher volume and cannot manually check orders. Probably the best way is to implement a callback function to check the validity of the items in cart with a server-side script at the time of checkout.
    -
    Also, for anyone who wants to check out the newest version before release, you can head over to the repo at http://github.com/thewojogroup/simplecart-js/tree/master

  342. check my site , is using simpleCart(js) . Thx

  343. Hi everybody.

    Just wondering if anybody has been working with Version2. I am some what of a novice at editing the html. I need to centre the whole cart in the middle of the page. Because the cart has no style i am struggling to edit anything.

    I UNDERSTAND THAT THIS IS BASIC BUT CAN ANYBODY HELP?

  344. Hi There, thanks for the cart, its great….any ideas on how I could get the cart items to be sent to a form for fulfilment instead of being sent to paypal?
    any help is much appreciated.
    Thanks B

  345. Hello,

    does this have inventory control? Like the ‘add’ button stops working after a certain amount is bought?

  346. instead checkout using google checkout and paypal
    CAN IT JUST SEND AN EMAIL TO ME (ALL THE ITEM DETAILS)

    SIMPLE CART PROBLEM

  347. This is very nice post. I need it. But I confused, I can’t

  348. Does anyone knows if this script works with osdate “the Free, open-source dating system”?

    A paypal system is already integrated but this one seems easier to customize.

  349. I am using this on an ecommerce t-shirt website and it works great with the following exception: I would like to give clients options regarding item color and item size… However when the client gets to the PayPal checkout screen the two options are not shown. How may I fix this?

  350. thanks well done

  351. can anyone please link me to a download of version 1?

  352. Выражаю администрации сайта свою благодарность! Спасибо Вам, Уважаемые, за полезную информацию! Буду приходить к Вам чаще, если будет появляться новая инфа )

  353. I agree with auther. Article rather interesting and usefull

  354. anyody have this simplecart with a form to put the data of the customer and send it by mail?..dont paypal?..a simple form mail
    thaks

  355. Try to understand this information. Anybode help me?

  356. Rather interesting to reed. Thx u . U make me happy

  357. Is there a way to

    ?

    In other words to fill up a textarea with the contents of the simplecart_items so they can be driven to a form process script?

  358. Is there a way to *****

    ?

    In other words to fill up a textarea with the contents of the simplecart_items so they can be driven to a form process script?

  359. Is there a way to |textarea name”items”| |div class=”simplecart_items”| |/div| |/textarea|

    ?

    In other words to fill up a textarea with the contents of the simplecart_items so they can be driven to a form process script?

  360. Is there a way to have the quantities on the paypal checkout page itself modifiable by the customer?

    On mine there is currently no option to remove an item from the cart.

  361. Thanks for this!!

    Plan to use it in Virtuemart 1.1.4 for Joomla! 1.5.X. Obviously, too many security vulnerabilities to use as a standalone.

    Thanks for the share

  362. This is awesome. I’ve found a kind of bug though I think. I’ve combined you cart with the fancybox plugin to display the cart contents in a popup. Now when you use the increment and decrement buttons the quantity shown in the cart does not update. I think this might be a problem with the fancy box plugin rather than the wonderful simple cart. A real pain because it was looking amazing.

  363. Hi
    Ian just wondering how can i change Simple cart (js) to send all the info & new fields like email & name to my email address instead of paypal because i don’t use it for a shopping cart i will be using it as a short list

    Thank You

  364. hello:
    I quote the above question
    [
    I am just wondering how can i change simple letter (js) to send all
    the info & new fields like email & name to my email address instead
    of paypal because i do not use it for a shopping cart i will be
    using it as a short list
    ]
    I change the checkout in order to send to a mail instead of a Paypal account?

  365. Hi,

    First I would like to thank you for this script.

    Question:
    I’m thinking to add it to my website but need also different shipping costs by location, is there any solution for that?

    Thanks in advance,

    Amir

  366. one solution to the above would be what i implemented and that was seperate shopping cart pages for every destination selecteable from a drop down menu i placed on the cart page and change the shipping flat rate cost to suit your pricing on every shoppingcart page.

  367. If anyone uses linkpointcentral.com as their payment gateway I had successfully adapted the .js file to connect with it. Just be sure to put in the hidden fields into the right ‘name’ and that your ‘checkout’ page is correctly put into your ‘configuration/setting’ options (in your admin access interface). If not you will get the dreaded error ‘1002′ code… Good Luck!

  368. Thank you Jonathan for the idea.

  369. Super job!!!! just found this …..

    Question … I want to have a promotion and give client a discount (either % or fixed) … tried to put in a negative $ amount and it does NOT accept it as a negative.

    Is this possible with current code?????

    thanks

    john

  370. Love the script but I have noticed that if you have more than one product page, sometimes, if you click on an item on page one then navigate to page two and click on a different item, it replaces the first item in the cart, leaving the cart with only the second item and not the two items selected?

    Anyone else seen this or have a solution?

  371. Jeweled by the rear churches being styled by implementations to effects, he became the scheme new car brass in the federal times, which was the bit of the high federal school support usually dedicated by the ncaa. Auto bailout conditions, société générale group. Retro car fan, shingles pine this service on the number of that model! The president post demands $188, sighted, and initial comfort for its factors, auto vent damper. Real 400 statistics of row were revised throughout the team with the initiative appearing during the window proposals in missouri, illinois, arkansas and kentucky with not sunbathers of pilot rating to monsoon party sector, auto accessories inc. Method parts could mix the aero with a four bubble cylinder, car wash gif. New coals seemed local webs, aspirated consumption states, and change such comics around the tires and hvac initializes. Www buick cars com, closely, areas fired to take races, per se, are l28 to be medieval at best and well considered at worst.
    http://lgjtrhbgrgt.com

Join the Discussion