Configuring a Paypal Checkout on Gallery 2
These days, gallery is a massive image oriented CMS (so much so that the developers are refocusing on their core objectives for Version 3), with a ton of modules / plugins and themes. It should be no surprise therefore that it’s easy to add a cart / checkout to it.
First, ensure you are using the latest version of Gallery 2 and that any existing plugins you have installed are up to date. When you start selling from your site it is doubly important that this is not vulnerable to attack, especially content injection which could lead to your site appearing on Google Badware or similar and putting off your potential customers.
1. Uninstall the “cart” plugin if it is installed.
2. Install the “checkout” plugin.
- Site Admin / Plugins / Get more Plugins / Show repository list
- Enable “Community Plugins”. Save, then update plugins list.
- Checkout should now be listed for install.
3. Configure the checkout plugin.
- Most options are self explanatory, if you are not selling images or prints you may find the setup a little confusing. It is of course geared towards selling prints, posters etc of the images held in gallery. Don’t worry however, you can configure individual items later, just make sure you have some generic product types in there to begin with. Make sure towards the bottom you have created notification email options for both your own sales@ (or equivalent) address and the customer’s.
- You may find that your main album now has the “Everybody [checkout] Purchase item” permission. If this isn’t appropriate to you, remove it from the main album and add it to whichever sub-albums you require. You can also use the “Everybody [checkout] Purchase album” if relevant to you.
- You may well now see a little cart icon or link (depending on your theme) on the relevant pages of your site. If you had previously disabled the cart link in your theme’s options, you may need to re-enable these.
- If you need to configure your items individually (pricing / description etc) this can be done under the new tab that has appeared under “edit photo”.
4. Configure a payment plugin
The checkout plugin can pair up with other modules to provide google checkout, paypal, or invoice by email functionality. We plumped for paypal.
- Install the paypal plugin under “more plugins” as before. Don’t fill in your real paypal details for now.
At this point you’ll need to break off and register with the Paypal developer site so that you can access the sandbox. This allows you to test your cart setup before pulling money off real credit cards.
- Head over to the Paypal Developer site and sign up. Don’t use your real Paypal email address. You’ll need to click a link in a confirmation email, but setup is otherwise quick and painless.
- Create two accounts within the sandbox, a seller account to simulate the Business account for your site and at least one buyer account for testing with.
- You can now configure the plugin within gallery. Ensure that you have input the email address for your test seller account (not the one you input but the “made up” one with loads of extra characters in it that the sandbox creates for you). Select the option for sandbox mode and activate.
- Note that you’ll need to be logged in with your sandbox account when clicking through testing your purchase process.
5. Edit email templates / terms and conditions
Within checkout’s options you can include terms and conditions that will display / the customer must agree to. It’s probably best at a minimum to list where you’ll ship to and your returns policy.
Templates can be found under modules/checkout/templates/email
6. Go live!
Once you’re sure everything is working you can input your real Paypal address into the settings and disable sandbox mode. You’ll probably want to try a test transaction with a real card as suggested in the checkout docs, you can always refund the payment.
That’s it, you’re largely done and it was pretty easy in the grand scheme of things. Just one final note…
7. Be ready for something to go wrong
Gallery is extremely reliable, however upgrades are required on a regular basis and occasionally an upgrade or change outside of your control may break something. Consider the following.
- If your gallery install or checkout suddenly stops working, are you happy troubleshooting it? (Checking error logs, searching Google / the developer’s forums for useful information).
- Are you comfortable upgrading gallery / your theme?
- Are you confident you have a full backup of your gallery’s file base and a method in place for taking regular backups of the database / data directory? Would you be happy restoring these backups on your existing host, or a new one if required?
Don’t expect your web host to be able to sort the above for you, unless you’re specifically paying them to do so. If the money you’re making from your website cart is important, then you need someone who can sort the above sort of issues for you on speed dial if you can’t sort it yourself, or won’t have the time to sort it yourself.
