Payments (step-through instructions)

The main CAMWS site (but not TCL and CJ) has full e-commerce implementation, and all products we sell should use it (although it is not used for donations). The method for making something we can sell requires administrator privileges on the site. In outline, it is as follows.
1. Create a product.
2. Add the product (or a group of products) as a field to a Webform.
3. Set the Webform to redirect to the shopping cart page (the URL to enter is 'cart' without quotation marks) where the user can pay.

Whilst a Webform is not the only way to display a product, the CAMWS site in most cases collects additional information, beyond a simple billing and shipping address when a purchase is made. Therefore the method we use for displaying a product which a visitor can add to a shopping  cart, is to place it within a Webform, and this method used throughout the site. The Webform is the place a shipping address is collected. (Checkout requires also the input of a billing address). This means that details associated with an order appear in two places, (1) under Store > Orders; and (2) under the 'Results' tab of the Webform concerned, where the supplementary details entered by the customer, including shipping address, have been entered.

Each product has a product type. To sell a new range of items where there is not yet product type, it is best to create its own product type (though it is also possible to add the new items one-by-one as just 'General Product'). To create a new product type, from admin menu visit Store > Product Types > Add new product type. Give it a name, and save.

Now create the individual products. Visit Store > Add a Product > [select the product type to add - e.g. Journal Subscription]. Give it a name, give it a price, give it an SKU (a random number, so long as there is no existing product with that SKU: you can start a new product type at 200 or 300 or 400 etc if you wish). Save (or Save and Add Another to cut down the number of clicks if you have a lot of products to add).  You have now created a new product.

Now the products have been created. However, they will not be displayed to end users until they have been placed within a Webform.  Next they can be added to a new or an existing Webform. For example for Journal sales, you can visit this existing form, click Webform > Form Components tab, and edit so as to add or change those fields which contain a Product. To add a new item, give the field a name, under type select Commerce Product SKUs. The edit form allows to change the product label, and add any note in the description field.  You now have a few important choices. First you must decide whether to show all products of a given product type (from a drop-down) or alternatively individual products, in which case you need to enter the SKUs of those individual products in an auto-complete box.

Thus to present the customer with a list of all possible journal subscriptions, just choose product of type 'Journal Subscription' and all will show. If you want a user to be able to buy two types of subscription (unlikely, but for some other products this will make sense), tick 'Multiple'. If you want a customer also to be able to buy more than of any given product, tick 'Allow the user to set the quantity'. If you want the entire form, including any other products on it, to fail unless at least one item is select, tick 'Required.' If you have a bunch of products and you want the user to be able to choose one from a dropdown list, rather than a series of checkboxes, tick 'List box.' Save.

Drag the product you just created to the position on the form where it should show. Click save.

If you want to add for example 'I require shipping outside of the United States or Canada' there is already a product for this (it has SKU 53) so you can add a new field to your Webform offering that option.

There are already PayPal supplements set up (SKU 112 for a $3 supplement, and 113 for $6). *If a form includes any product of type = PayPal Supplement, and the customer adds one of these to his or her cart, the customer will be offered the option to pay by PayPal: otherwise they will not.* This has been set up in Rules and needs no further work. To charge a PayPal supplement of $9 for example, just create a new product of type PayPal Supplement with that value, add it to a Webform, and where a customer adds this to the cart, it will generate the option to pay by PayPal. The customer does have a review page where they can change the selection of items in their cart, but they can never get to pay by PayPal unless there is an item of product type PayPal Supplement in their cart.

Now the Webform is set up and ready to go. Set up its redirect so that it is redirecting to cart (or to any other page where a shopping cart has be designated to display) so that the customer can easily find their way to the checkout. This is done by visiting Webform > Form settings > Redirection Location > Custom URL and entering 'cart' in the box (without quotation marks or leading slash) and hit Save.  [Visit the old PayPal button form at, which no longer has any use, and unpublish it, or even delete it if you wish.]

With e-commerce, testing is never a bad idea.