Access Keys:
Skip to content (Access Key - 0)

Contents

About This Guide

Use of PayPal Standard with SiteGrinder's "$" ecommerce hint for buttons and forms requires the optional "Commerce" add-on as well as a PayPal account.

This guide discusses only ecommerce features that are unique to the PayPal ecommerce module.

For a high level overview of SiteGrinder's ecommerce features see the Ecommerce Essentials Guide.  For details about creating ecommerce buttons, forms, and galleries see the Commerce Add-On reference.

The complete PayPal Standard documentation is found on the PayPal website

Setting Up Your PayPal Account

PayPal Website Payments Standard has no monthly fees or setup charges and is very easy to set up.  

Follow the instructions on the PayPal website to do so.

Setting Up Your SG Site to Link to Your PayPal Account

In order to get your SiteGrinder 3 site to correctly link to your PayPal account, it's important to correctly set the email address in the New Site dialog in the "ECommerce" section shown below.

This email address cannot be changed later without creating another new site, so be careful to enter the correct address and test it as soon as possible after deploying but before making a lot of changes in the Content Manager.

PayPal Operations

PayPal Standard supports four different operations:

  • buy now
  • donate
  • add to cart
  • view cart

The first three operations have two required pieces of information: the product name and its price. You can use ecommerce forms and the Content Manager's Operation Editor to add more options if you need them.

The view cart operation needs no additional information.

PayPal Shopping Cart

Note that unlike the FoxyCart shopping cart which appears directly above your page in a nice lightbox, the PayPal shopping cart takes your site visitor to a new page on the PayPal site.

When a site visitor adds something to the PayPal shopping cart they will leave your site and need to click "Continue Shopping" to return to the page they were on.  This can be awkward and is not conducive to selling multiple items. If ease of selling multiple items to the visitor is important, consider using the FoxyCart shopping cart module instead.

Ecommerce Forms with PayPal

Generally you will use ecommerce forms with PayPal exactly as described in the Commerce Reference Guide.

PayPal does provide some extra features you can take advantage of if you so choose:

  • Some form field names will be recognized by PayPal and given special significance
  • SiteGrinder allows you to pre-fill some of the fields on the check-out page if you gather that information in your SiteGrinder ecommerce form.

These are described in detail below.

Custom Field Names for Custom User Options

Many of PayPal's advanced features rely on your providing fields with specific identifiers from your form.  Normally a form's field name is its identifier. 

A field named "email:______" uses "email" as the identifier.

But sometimes the identifiers you need to use don't make very good field names for the user will see.

For example, PayPal can use an identifier named "first_name" to auto-fill the appropriate field on the PayPal check-out page.  You could make a form field like "first_name:________________", but that's an ugly name to display to the site visitor.

Luckily SiteGrinder forms allow you to specify a variable name that's different from the displayed name. 

In the previous example,we want to make the form field show "First name" to the user but send the value to PayPal with the variable name "first_name".

TO achieve this we will type the following into that line of the form type layer in Photoshop:

"First name/first_name:__________________"

Only the part of the label typed before the slash, "First name", will be displayed in the form on the page.

For more information see the "Separating Names and Value" section of the Forms Reference.

Preset Values

The section above discusses setting ecommerce identifiers up to interact with user input. But there are often times you will want custom identifiers to have a fixed value.  For example, maybe the object has a unique product number or weight.  

You may be using one of the standard identifiers that PayPal makes available, or a custom one that you want to receive with the order for internal tracking.  

Preset values can be initialized in the Ecommerce Operation dialog by following these steps.

1. Click New Option in the dialog:

2. Fill out the name of the option (such as item_number):

When you click "OK" this will add the new option to the options window.

3. Set the value for the option:

Standard Options Recognized By PayPal

Some ecommerce options, like color or size, are just information that you are gathering to go along with the order.  This kind of information will help you fill the order but won't affect the order process.

Other information, such as quantity, are recognized by PayPal and directly affect the transaction or the operation of the shopping cart.

Here are some common identifiers that PayPal recognizes.

  • item_name: The name of the product that will be displayed in the cart.
  • amount: The cost of the product. DO NOT enter a currency sign like "$".
  • item_number: Item number, can be used however you’d like.
  • quantity: Quantity of products. If left blank, it will default to 1. 
  • undefined_quantity: Allows the user to specify the quantity. Usable only with Buy Now controls.
  • handling: Handling charges. This is not quantity-specific. The same handling cost applies, regardless of the number of items on the order.
  • invoice: An option you can use to identify your invoice number for this purchase.

You can name your fields after these or use the technique described in the previous section to pass them as variables separate from the field names.

There are many other standard identifiers supported by PayPal.  For a complete list see the PayPal documentation at:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables

Pre-Filling PayPal Fields From A SiteGrinder Form

PayPal allows you to collect information in your form that can be passed along and pre-filled when your customer arrives on the PayPal check-out page.

The following names are supported:

  • address1
  • address2
  • city
  • country
  • email
  • first_name
  • last_name
  • lc
  • charset
  • night_phone_a
  • night_phone_b
  • night_phone_c
  • state
  • zip

For more information see the PayPal documentation at:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables#id08A6HI0J0VU

Options That Change The Price

Some options need to change the price.  A photographer might offer multiple print sizes, with each size at a different price.

With PayPal this can be set up, but can be difficult.

First, let's say we have the following form defined in Photoshop. It is a text layer named addcart-$-form and in it is the following text 

Size: small | medium | large
(add to cart)

and it looks like this when built:

Let's say we want the item to cost $10 normally.  But the small one is only $7 and the large one is $12.  We'll set that up in the Ecommerce Operations dialog that is accessed through the Content Manager.

First, we add a new option using the identifier  option_select0 .  We'll set the value of that to small (the same name that appears in the menu).

Next, we'll add a new option with the identifier option_amount0 . We'll set that value to $7.  

Those two new options will configure it so that the small choice is now $7.

After that we'll add a new option with the identifier  option_select1.  We'll set the value of that to large.

And lastly, we'll add a new option with the identifier option_amount1.  We'll set that value to $12.

The complete dialog for that form looks like this:

Important Note

For PayPal, the control that is going to vary the price must be the first control in the form.

So, if you are selling T-shirts with custom messages and the price is determined by the shirt size, this form will work correctly:

Size: small | medium | large

Message: ________

(Buy)

But this one will not adjust the prices correctly, since the Size control is not first

Message:________

Size: small | medium | large

(XXXXXXX)

Adaptavist Theme Builder Powered by Atlassian Confluence