Change a Buy Now button to an Add to Cart button

cobweb53
Contributor
Contributor

I have recently created numerous Buy Now buttons when adding stock to my website.  Now I realise that I should have created Add to Cart buttons instead.  When I go to My Saved buttons to try and edit each one the area that shows "Buy Now" is greyed out so I can't click on it to change to Add to Cart.

 

Is there any way I can do this without having to create a new button?

 

Help please!

 

Login to Me Too
3 REPLIES 3

snowshoe
Frequent Advisor
Frequent Advisor

Unfortunately if using the online button creator, you would have to start over.   The commands and functions are different and becasue the important parts of the code are stored on the PayPal Servers, you just can't switch from a Buy Now to an Add to Cart, the code has to be recreated. 

Login to Me Too

cobweb53
Contributor
Contributor

Thank you Snowshoes - I have started to recreate my buttons.  Unfortunately I now also realise that the Checkout system is not flexible enough to allow individual postage charges by country or allow someone making multiple purchases from my website to see only one postal charge.  Although I am new to online website design this seems to me to be a basic requirement of any checkout system.

 

I don't know how to continue.  I understand Google Checkout is coming to an end in November and the other sites I have looked at are not really suitable for a "one woman and her cat sitting at home in an office" very small business website.

 

Has anyone else managed to get round this?

 

 

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

The basic account profile shipping methods are limited in function, unfortunately it's always been that way.  If you need something more robust, then you need to consider either using a 3rd party shopping cart or switch to a custom coded mini-cart.  Note, the methods have improved since PayPal first began but, that's not really going to solve your concerns at this point.

 

Currently UK Accounts are limiited to either charging a flat rate or percentage on the total amount and when you setup your shipping method, PayPal only allows 5 ranges.  (US Accounts also have to deal with having only 5 ranges.)   As far as do individual country rates, that too is a challenge as there's no built-in features to support that.

 

There are work arounds.

 

It is possible to include shipping choices and options with individual item buttons.  The code must be manually created and requires the use of the "shipping" override variables with some scripting to mange the choices.  Note, the online button creator has it limitations, thus the code must be manually created.  The example below demonstrates how that can be accomplished:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Button Example Code</title>

<!-- START META TAG SECTION -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<!-- END META TAG SECTION -->


<!-- Start of Script CalculateOrder1 -->
<SCRIPT language=javascript>
<!--
function CalculateOrder1(form)
{

if (document.myform.os0.value == "Small")
 {
 document.myform.amount.value = 25.00;
 document.myform.item_number.value = "S-WB-1001";
 if (document.myform.os2.value == "US"){
 document.myform.shipping.value = "10.00";
 document.myform.shipping2.value = "3.00";
 }
 if (document.myform.os2.value == "Canada"){
 document.myform.shipping.value = "15.00";
 document.myform.shipping2.value = "4.00";
 } 
 if (document.myform.os2.value == "Mexico"){
 document.myform.shipping.value = "16.00";
 document.myform.shipping2.value = "5.00";
 }
 if (document.myform.os2.value == "Europe"){
 document.myform.shipping.value = "20.00";
 document.myform.shipping2.value = "6.00";
 }
 }
 
if (document.myform.os0.value == "Medium")
 {
 document.myform.amount.value = 50.00;
 document.myform.item_number.value = "M-WB-2002";
 if (document.myform.os2.value == "US"){
 document.myform.shipping.value = "10.00";
 document.myform.shipping2.value = "3.00";
 }
 if (document.myform.os2.value == "Canada"){
 document.myform.shipping.value = "15.00";
 document.myform.shipping2.value = "4.00";
 } 
 if (document.myform.os2.value == "Mexico"){
 document.myform.shipping.value = "16.00";
 document.myform.shipping2.value = "5.00";
 }
 if (document.myform.os2.value == "Europe"){
 document.myform.shipping.value = "20.00";
 document.myform.shipping2.value = "6.00";
 }
 }
 
 
 if (document.myform.os0.value == "Large")
 {
 document.myform.amount.value =  75.00;
 document.myform.item_number.value = "L-WB-3003";
 if (document.myform.os2.value == "US"){
 document.myform.shipping.value = "10.00";
 document.myform.shipping2.value = "3.00";
 }
 if (document.myform.os2.value == "Canada"){
 document.myform.shipping.value = "15.00";
 document.myform.shipping2.value = "4.00";
 } 
 if (document.myform.os2.value == "Mexico"){
 document.myform.shipping.value = "16.00";
 document.myform.shipping2.value = "5.00";
 }
 if (document.myform.os2.value == "Europe"){
 document.myform.shipping.value = "20.00";
 document.myform.shipping2.value = "6.00";
 }
 }
}
//-->  
</SCRIPT>
<!-- End of Script CalculateOrder1 -->



</head>

<body>

<!-- START SAMPLE CODE SECTION -->


<!-- PARAGRAPH 1 -->
Shipping &amp; Delivery Examples

<br><br>

Add to Cart - Options for International Selections.

<br><br>

Widget Block

<br><br>

<!-- Start of Add to Cart Form -->
<!-- Note: target="_self" was replaced with the variable target="_self" -->
<!-- Note: shopping_url also added to code -->
<!-- These two changes allow better functionality with IE and Firefox --> 
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="_self" name="myform">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="https://www.yourwebsite.com/logo.jpg"> 

Select Size:&nbsp;&nbsp;
<input value="Size" type="hidden" name="on0">
<select name="os0">
<option value="Small" selected>Small - $25.00</option>
<option value="Medium">Medium - $50.00</option>
<option value="Large">Large - $75.00</option>
</select>

<br><br>

Select Color:&nbsp;&nbsp;
<input type="hidden" name="on1" value="Color">
<input NAME="os1" type="radio" value="Green" checked>Green&nbsp;&nbsp;&nbsp;
<input NAME="os1" type="radio" value="Red">Red&nbsp;&nbsp;&nbsp;
<input NAME="os1" type="radio" value="Blue">Blue&nbsp;&nbsp;&nbsp;
<input NAME="os1" type="radio" value="Yellow">Yellow


<br><br>

Select Shipping Destination:&nbsp;&nbsp;
<input type="hidden" name="on2" value="Shipping Destination">
<select name="os2">
<option value="US" selected>US - Any Size | $10 First Item | $3.00 Ea Additional Item</option>
<option value="Canada">Canada - Any Size | $15 First Item | $4.00 Ea Additional Item</option>
<option value="Mexico">Mexico - Any Size | $16 First Item | $5.00 Ea Additional Item</option>
<option value="Europe">Europe - Any Size | $20 First Item | $6.00 Ea Additional Item</option>
</select>

<br><br><br>

<input onclick=CalculateOrder1(document.myform) border="0" alt="Make payments with PayPal - it's fast, free and secure!" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" type="image" name="submit">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<!-- -->
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="your email address">
<input type="hidden" name="item_name" value="Widget Block">
<input type="hidden" name="amount">
<input type="hidden" name="item_number">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="shipping">
<input type="hidden" name="shipping2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Shipping_Delivery_01.html">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">
</form>
<!-- End of Form -->

<br>

<!--  Start of View Cart Button Code  -->
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="https://www.yourwebsite.com/logo.jpg"> 
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="display" value="1">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="your email address">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Shipping_Delivery_02.html">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form> 
<!--  End of View Cart Button Code  -->



<!-- END BUTTON EXAMPLES -->



<!-- END SAMPLE CODE SECTION -->

<br><br><br><br>
<hr align="left" width="50%" noshade>
<br><br>
NOTES:
<br>
In order to test the code, you must replace the &quot;business&quot; value variable with your PayPal Email Address or Account ID.

</body>
</html>

 

Next, there's mini-carts.  They function in a similar manor as 3rd party shopping carts as both use the "upload" method to pass the end results of the order to PayPal for checkout. 

Here's a few examples:

http://ccaples.com/index.php/basic-scripts/examples-iii/mini-cart-sample

 

http://ccaples.com/index.php/basic-scripts/examples-iii/another-mini-cart-sample

 

 

Last, many 3rd party carts have flexible shipping options and the behind the scenes programming is done for you.

One place to look for a cart is here:

https://www.paypal-marketing.com/paypal/html/hosted/emarketing/partner/directory/

 

Here's another 3rd party cart that easy work with and is user friendly:

http://www.e-junkie.com/

 

 

And there are free open source carts available such as Joomla, these carts do required some code tweaking but, are quite popular:

http://www.joomla.org/

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.