Did you ever want to modify a Buy Now button, or include tax and shipping fees? Now you can! Buy Now buttons are now generated using the HTML API. What this means is that you can edit the values without creating a new Buy Now button.
For example a new Buy Now button for Peanut Butter will now look like:
<form action= "https://checkout.google.com/cws/v2/Merchant/
12345678/checkoutForm" id="BB_BuyButtonForm" method="post"
name="BB_BuyButtonForm">
<input name="item_name_1" type="hidden" value="Peanut Butter"/>
<input name="item_description_1" type="hidden"
value="Delicious Peanut Butter"/>
<input name="item_quantity_1" type="hidden" value="1"/>
<input name="item_price_1" type="hidden" value="15.0"/>
<input name="item_currency_1" type="hidden" value="USD"/>
<input name="_charset_" type="hidden" value="utf-8"/>
<input alt="" src=" https://checkout.google.com/buttons/buy.gif
?merchant_id=12345678&w=117&h=48&style=white&
variant=text&loc=en_US" type="image"/>
</form>
When a user clicks on the Buy Now button generated by this code, they will purchase 1 Peanut Butter for $15. If you wanted to change the price to $5, you can change the
item_price_1
line to: <input name="item_price_1" type="hidden" value="5.0"/>
If you wanted the user to buy 10 items instead of one, you would change the
item_quantity_1
line to: <input name="item_quantity_1" type="hidden" value="10"/>
To find out more information about the HTML API and how you can edit the values, please view the HTML API documetation or HTML API tutorial.
For more HTML API features checkout these tutorials.
Creating a Buy Now button with customer input values
Using XML in the HTML API
Specifying international shipping and taxes
Permalink | Links to this post |
0 comments:
Post a Comment