Latest Register Log In

+ Advanced Search

Shopping Cart

Shopping Cart
By
09/09/09 (Edited 11/10/15)

At Admin Panel -> Settings -> Switches, the 'shopping cart' switch allows you to use WSN for a shopping site. When enabled, "add to cart" buttons appear on the detail pages of articles. When clicked, the article is added to the cart as shown in a running total in the top right.

The user can click "view cart" to compare items, remove items or check out.

Automatic processing is available via PayPal or 2checkout. Please note: Your paypal email or 2checkout id must be entered at Admin Panel -> Revenue -> Sales Settings in order to receive your payments.

The automatic processing sends an email to the administrative address containing a list of the purchased items. You can then ship in whatever way you desire. Note that the email text can be edited at Admin Panel -> E-Mails -> Edit Outgoing E-Mails -> search for where name contains "email_cart".

Adding Options

You can add options to the cart, like size or color. You can also make particular options result in a price increase. The simplest way to do this is on the submit or edit category page (to apply a set of options to everything in a given category) or on the submit or edit listing page (for options that are specific to a particular listing). Just click the + Add Cart Option link there.

Alternately, advanced users can add fields to the template. Keep the value in a cartoption1 field, and you can add a human-readable label for it in the cartoption1label field (make it a hidden field). For subsequent options increment from 1 to 2 to 3 etc. For an example, here's what you'd add to your listing details template to include size and color options:

What size would you like?
<select name="cartoption1">
<option value="small">small</option>
<option value="medium">medium</option>
<option value="large">large</option>
</select>
<input type="hidden" name="cartoption1label" value="Size" >
<br >
What color would you like?
<select name="cartoption2">
<option value="red">red</option>
<option value="green">green</option>
<option value="blue">blue</option>
</select>
<input type="hidden" name="cartoption2pricebumpgreen" value="2.50" >
<input type="hidden" name="cartoption2label" value="Color" >


You'll see the selected options listed in the email you receive on purchase.

Cart Template Variables

On any page, as in the top right by default, you can show information about the current cart totals. Here are the available template variables:

{CARTNUMITEMS} - shows the number of items in the cart
{CARTPRICE} - the total cost of everything in the cart
{CARTPRICECURRENCY} - the total cost of everything in the cart, with currency symbol
{CARTPRICENUMBER} - a purely numeric unformatted version of the price (useful for doing manipulations with template php)

{CARTPRICEAFTERTAX} - adds any applicable tax to the price
{CARTPRICEAFTERTAXCURRENCY} - adds any applicable tax and includes currency symbol

Important Note: The shopping cart is incompatible with the "send purchase payments to submitter" option -- only one or the other can be enabled. WIth the shopping cart, all payments go to you... with "send purchase payments to submitter" none of the payments go to you but instead to each individual listing owner (you would presumably charge the listing owner a per-listing fee with listing type sponsorship).





Description Enabling purchases.
Rating
Views 519 views. Averaging 0 views per day.