This tutorial will outline how you can allow users to purchase products
off of your site using Listings Manager and PayPal. This is something
that is pretty quick to set up and is invaluable once it's up and running.
PayPal is a very powerful way for people and companies to send and
receive money online. In order to receive funds online through PayPal
you'll just want to signup for an account and you can do that here:
https://www.paypal.com/.
One great thing about PayPal is that visitors to your site can pay
for items whenever it's convenient for them using their preferred payment
method and all you really need to do is pay a small transaction fee.
Also, this tutorial is geared towards PayPal but if there is another
payment processing or shopping cart script you prefer the process should
be fairly similar.
Please let us know if you need assistance setting this up. We also
offer a Priority Consulting service if you would rather have us set
this up on your site for you. To inquire, send us an email or call 1-800-752-0455.
1. The PayPal Code
The first thing you'll want to do is copy this code and customize it
to match the site you're working with:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr"
target="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="business" value="your@email_address.com">
<input type="hidden" name="item_name" value="$lfield1$">
<input type="hidden" name="item_number" value="$lfield2$">
<input type="hidden" name="amount" value="$lfield3$">
<input type="hidden" name="shipping" value="0.00">
<input type="hidden" name="shipping2" value="0.00">
<input type="hidden" name="handling" value="0.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="http://www.yoursite.com/thankyou.htm">
<input type="hidden" name="undefined_quantity"
value="1">
<input type="image" src="http://images.paypal.com/en_US/i/btn/x-click-but22.gif"
border="0" name="submit" width="87" height="23"
alt="Make payments with PayPal - it's fast, free and secure!">
</form>
For "business" you'll want to put your company's email address
that is set up in PayPal. Also, you can change "shipping",
"shipping2", "handling", "currency_code"
and "return" to suit the needs of your site (and location).
The last thing to change in this code is the placeholders being used
for "item_name", "item_number" and "amount",
you can just customize these to match the actual fields you're using
in Listings Manager.
2. Creating the "Add to Cart" button
Once you have all of the PayPal code you'll just want to open up Listing
Manager's template files and insert the above code wherever you would
like the "Add to Cart" button to appear.
The template files you should be able to add this code onto will be:
/listman/templates/[industry]/_publish_listing.html
/listman/templates/[industry]/_publish_listing_index.html
/listman/templates/[industry]/_search_results.html
Notes:
1. On _publish_listing_index.html and _search_results.html
the PayPal code will need to be within the opening and closing tags
for a few different templatecells. This means the code will actually
be added several times to these templates.
In _search_results.html you'll add this
code four times, between the opening and closing templatecell tags for
'row_image', 'row_image_new', 'row_noimage' and 'row_noimage_new'.
In _publish_listing_index.html there are
just two templatecells you'll add the PayPal code to, 'listing_image'
and 'listing_noimage'.
2. If you would like to have this code on your
_search_results.html template you'll just need to make one other
change to this template. You'll want to find this piece of code:
<form method=post action="$cgiurl$">
<!-- template insert : $hidden_fields$ -->
And add a closing tag so it looks like this:
<form method=post action="$cgiurl$">
<!-- template insert : $hidden_fields$ -->
</form>
Variations:
While this tutorial outlines how to create an "Add to Cart"
button, for some sites you may find it more helpful to use a simple
"Buy Now" button, or even a button with a couple of options
(size, colour, etc). If you would like to have a look at a couple of
tutorials that outline some different ways you can set up PayPal, you
can have a look at these links:
Single Item Buy Now button: https://www.paypal.com/us/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside
Adding Option fields: https://www.paypal.com/us/cgi-bin/webscr?cmd=_pdn_xclick_options_help_outside