Friday, April 30, 2010

ezSHOP - A PayPal Shopping Cart For Your Google Site


On my previous posting, I have demoed using the Google Spreadsheet to manage the PayPal shopping cart on Google Site. However, the back-end server was an Amazon EC-based PHP agent. Now I have ported the server to Google App Engine which users can just use their Google authentication  login to finish the setup without giving away their passwords.

To begin the store setup you need to prepare your items on the Google Spreadsheet, you can see the example spreadsheet here. Make sure your spreadsheet has the same headers (case sensitive), the sku, title, price, picture url fields are required, all others are optional.

To start the set up go to  ezshop411.appspot.com

You need to have a Google account (Gmail or Google Apps account) to start. Once you login, you will be bringing to the User Preference page. Your nick name will be your Google account id and the email will be your Google Email. The following two fields asking for an additional Google account which should have minimum READ access right for the spreadsheet you gonna use for the store. You can enter the same account information as your original one, however, for the security, we recommend use different Google account.
Once all information filled out, click at the Update button to save them. Now click at "Main" button you start the build-up. The main page already load all your Google Spreadsheet files' name from your site for you to choose to generate the token to create the PayPal store.
user preference settings


Once you decide which file to use just click at "Add" button to create one store Gadget list. It will show you the time it was created and the store Gadget URL which you will need to use it when add the store gadget to your Google Site. You can also remove the listing by clicking at "Delete" button. The deleting will not delete your spreadsheet on your Google Doc, however, if you have any Gadget using this token to access the store information will stop to function. If you click at the name of the list it will show you the spreadsheet in CSV format, you can use the feature to double check if you choose the right file.

Now, open the Google Site, select the site you want to add the ezSHOP store, choose the PAGE you want to add the store Gadget, click at "Edit page" button. Once you are in EDIT mode, go to the section where you want to add the Gadget, then click at "Insert" button, choose "More gadgets"

A new window will pop out -

Click at "Add gadget by URL" on the left-hand side.

Type in the URL which you copy from your main page's Gadget URL then click at "Add" button.

A Gadget setup screen will be displayed as above. Gave the Gadget the proper width and height, make sure you check the "include a scroll-bar on gadget when necessary". Click "OK" to finish setup.
You can always come back to edit the Gadget setting by clicking at "Properties" of the Gadget.
Once you save the PAGE from EDIT mode, you should be able to see the store items listing right away. The current released version only supports PayPal "Buy Now" button. I will add the PayPal shopping cart function for the next release. Once customer click at "Buy Now" button, a PayPal payment page will show up and customer can fill up the information to complete the transaction!
There are some other issues like shipping charge, sales tax, inventory control... etc. You will need to go to your PayPal account page to  set up correctly. Some of the functions can be done programmatically through PayPal API, we will discuss these more details in the future releases.

Above is the sample spreadsheet we used to do the demo, you can download it and upload it to your Google Doc to test this ezSHOP Gadget.


********************************************************
NOTE:
This Gadget only works under HTTP not HTTPS since there is PayPal service url link within the HTML codes, unfortunately, now Google Sites default URL only allows HTTPS, like https://sites.google.com/a/.... therefore, you have to map your own domain host name to the Google SITES to use HTTP, for example, create a host named "store" under your Domain, so http://store.yourdomain.com will be your url. To map your domain host to Google Sites just go to "Manage Site" and choose "Map this site" button to proceed. Only done, you can see the Gadget under you own domain url page.