Cotton Rohrscheib

The Cotton Club Blog & Podcast

  • Home
  • Bio
    • Resume
  • Blog
    • Faith & Family
    • Marketing & Tech
    • Farm & Business
    • Entertainment
    • Health & Wellness
    • Urban Farming
    • Weekend Projects
  • Media
    • Newsletter
    • Photo Galleries
    • Instagram Feed
    • Video Archives
    • Podcasts
    • Music Playlists
  • Books
  • Connect
    • Rohrscheib Capital
    • Disclaimer
    • Privacy Policy
You are here: Home / Blog / Converting to Add to Cart Button (PayPal)

Converting to Add to Cart Button (PayPal)

May 13, 2009 by Cotton Rohrscheib 1 Comment

While talking with a pro bono client today they were wondering how hard it would be to add an “add to cart” button instead of a single item “buy now” button on their site.  At the time their website was developed (approximately 7 years ago) they only offered one item for sale. 

Of course 7 years later they now have 5 items they sell online.  Currently the solution is not setup to add items to cart but after doing a little bit of research today, it’s not hard to covert those… This is an example of what the “single purchase button” is coded…

   1: <form method="post" action="https://www.paypal.com/cgi-bin/webscr">
   2: <input type="hidden" name="cmd" value="_xclick">
   3: <input type="hidden" name="business" value="[email protected]">
   4: <input type="hidden" name="item_name" value="Baseball Hat">
   5: <input type="hidden" name="item_number" value="123">
   6: <input type="hidden" name="amount" value="5.95">
   7: <input type="hidden" name="shipping" value="1.00">
   8: <input type="hidden" name="shipping2" value="0.50">
   9: <input type="hidden" name="handling" value="2.00">
  10: <input type="hidden" name="currency_code" value="USD">
  11: <input type="hidden" name="return" value="http://www.yoursite.com/thankyou.htm">
  12: <input type="hidden" name="undefined_quantity" value="1">
  13: <input type="image" src="http://images.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" width="68" height="23" alt="Make payments with PayPal - it's fast, free and secure!">
  14: </form>

The first step to converting the button is to add this to the form tag:

   1: <form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">

The next thing you will want to do is to locate this line of code:

   1: <input type="hidden" name="cmd" value="_xclick">

and replace it with this:

   1: <input type="hidden" name="cmd" value="_cart">

This line will also need to be added to the form tag:

   1: <input type="hidden" name="add" value="1">

Then you will want to locate the input-type-image area and replace that code with this:

   1: <input type="image" src="http://images.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" width="87" height="23" alt="Make payments with PayPal - it's fast, free and secure!">

The finished product once you have finished inputting everything and swapping out these snippets of code should look something like this:

   1: <form method="post" action="https://www.paypal.com/cgi-bin/webscr">
   2: <input type="hidden" name="cmd" value="_cart">
   3: <input type="hidden" name="add" value="1">
   4: <input type="hidden" name="business" value="[email protected]">
   5: <input type="hidden" name="item_name" value="Baseball Hat">
   6: <input type="hidden" name="item_number" value="123">
   7: <input type="hidden" name="amount" value="5.95">
   8: <input type="hidden" name="shipping" value="1.00">
   9: <input type="hidden" name="shipping2" value="0.50">
  10: <input type="hidden" name="handling" value="2.00 ">
  11: <input type="hidden" name="currency_code" value="USD">
  12: <input type="hidden" name="return" value="http://www.yoursite.com/thankyou.htm">
  13: <input type="hidden" name="undefined_quantity" value="1">
  14: <input type="image" src="http://images.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" width="87" height="23" alt="Make payments with PayPal - it's fast, free and secure!">
  15: </form>

Fortunately for me the non-profit that was asking about this has now got their in-house IT guy to make the changes, it’s somewhat time consuming and if you only have 5 products or so, you can probably almost generate new add to cart buttons just as fast, which is what I recommended.

 

Creating an Add to Cart button – PayPal

Share this post on:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest

Related

About Cotton Rohrscheib

The Cotton Club is a monthly podcast hosted by me, Cotton Rohrscheib. I'm a 52 year old entrepreneur w/ ADHD, OCD (and now AARP) that refuses to grow up as I grow old. I have collaborated and invested in hundreds of projects throughout my career in multiple industries such as; technology, healthcare, and agriculture. I also have 25 years experience in the marketing industry as a co-founder of an award-winning advertising agency. I will undoubtedly cover a wide variety of topics on my podcast while sharing some really crazy stories and situations that I've been fortunate to witness firsthand. I also have a book coming out in 2025 titled, "Mistakes were Made"

Please Drop Your Questions or CommentsCancel reply

Let’s Connect

  • Email
  • Facebook
  • Instagram
  • LinkedIn
  • Twitter

Recent Updates

  • EP:032 – Cotton Rohrscheib & Diana DeHart
  • Challenges & Opportunities Going into 2025
  • Find us at the 2025 Arkansas Women in Agriculture Conference in Hot Springs, Arkansas
  • Be Sure to Checkout FBN’s Farmers First™  Crop Nutrition & Adjuvant Lineup for 2025
  • What we all need in Dark Times…

Blog Categories

  • Blog (419)
  • Entertainment (376)
  • Faith & Family (147)
  • Farm & Business (288)
  • Health & Wellness (33)
  • Marketing & Tech (584)
  • Podcasts (31)
  • Urban Farming (20)
  • Weekend Projects (1)

Listen & Subscribe

Blog Archives

Join the Cotton Club!

 

Content Copyright: 2001-2025
Cotton Rohrscheib | Rohrscheib Capital