Skip Navigation LinksPayCircuit Home > Google Checkout Cookbook > Carrier Calculated, Flat Rate, and Custom Shipping Calculations
Bookmark and Share

Using Google Shopping Cart: Carrier Calculated And Flat Rate Shipping With Custom Calculations

This working sample combines carrier calculated shipping with variable percentage and fixed price additional charges; and a flate rate shipping option based on custom calcuations using JavaScript. The number of items ordered controls the cost of the flat rate shipping option.

Source code and reference provided below.

PayCircuit T-shirt
Price: $29.99
Color: Black
Brand: Paycircuit
Description The best shirt ever
Your notes:
PayCircuit Coffee Mug
Price: $5.99
Text to print on mug:

Source / Reference

JavaScript

This should be in <head> of your HTML file, or you can create a .js file and reference it for easier management.

This code:

HTML

This sample should be within your <body>. Note that this makes use of the Google Checkout Shopping Cart (v. 2_2).

Copy the code below and modify the following for this to work:

  1. Provide your own Merchant ID (replace the mid=000000000000000 with your own merchant ID)
  2. post-cart-to-sandbox="true" is for Sandbox testing with your Sandbox Merchant ID
  3. post-cart-to-sandbox="false" for production/live use with your Production Merchant ID
© 2013 PayCircuit. All Rights Reserved.