/**
 * Change Log
 *
 * v0.1.1
 *   + NON-VERSIONED MODIFICATIONS TO DANIEL'S LAST VERSION
 *   + Moved "Pay By PayPal" button onto Stage 2 page and deleted Stage 3
 *
 * v0.1.2
 *   + First version by Matthew Turnbull
 *   + Added configurable (flat rate) postage
 *     This is submitted to PayPal as the shipping amount on
 *     the first item in the basket
 *   + Fixed errors with breadcrumb trail in ConfirmPhotos.tpl
 *   + Fixed error where modifying order would lead to duplicates in
 *     the list of size/qty pairs sent to PayPal
 *   + Tweaked display of subtotals/total in ConfirmPhotos to
 *     right align, and lined up total with the rest of the column
 *
 * v0.1.3
 *   + Added persistent storage of transactions through
 *     GalleryCheckoutTransaction extension of GalleryEntity
 *   + Post transaction ID to PayPal as 'invoice' parameter
 *   + Accept PayPal Instant Payment Notification postback.  Set IPN URL to
 *     http://www.yoursite.com/gallery/main.php?g2_controller=checkout:IPN
 *   + Created HouseKeeper controller to purge abandoned transaction
 *     entities from the database.  Schedule something to get
 *     http://www.yoursite.com/gallery/main.php?g2_controller=checkout:HouseKeeper
 *     on a regular basis to run this task.  Cron->wget would work.
 *
 * v0.1.4
 *   + Added configurable currency code to pass to PayPal
 *   + Added admin parameter to allow use of either normal 'live'
 *     mode for PayPal, or the testing sandbox (requires a
 *     Pay Pal developer account [free])
 *   + Fixed display of system links during checkout
 *   + Made checkout module re-create the user's cart as fulfillment
 *     starts, so the user can navigate back to it if they want to.
 *   + Created return page for PayPal auto-return to get buyers
 *     straight back to the gallery.  URL should be set to
 *     http://www.yoursite.comgallery/main.php?g2_view=checkout:PaymentComplete
 *     This URL also triggers the user's cart to be emptied
 *   + More product/price option entries will be added as you
 *     fill up the standard 8 - there will always be at least
 *     4 blank entries on top of whatever you last saved.
 *   + Changed 'Sizes' to 'Products' throughout
 *   + Fixed issue where order quantities were lost if you tried
 *     to 'modify' without any paper options enabled
 *   + Changed selection of products in Stage 1 to be by a combo box
 *     instead of a full list - behaves better with lots of products
 *     and a large basket.
 *   + Changed PayPal to open in the existing window rather than a
 *     new window since we can use auto-return now.
 *   + Fixed bug where images without a title would be handed to
 *     PayPal without a name, and wouldn't show in the PayPal cart.
 *   + Added admin option to choose product selection view from
 *     either table (as original module) or drop-down (as of v0.1.4)
 *
 * v0.1.5
 *   + Created payment plugin framework
 *   + Hived off existing Paypal payment method into new plugin framework
 *     Download and install the 'CheckoutPaypal' plugin
 *     Don't forget to change the IPN and auto-return URLs in your Paypal
 *     account to refer to 'checkoutpaypal' instead of 'checkout'
 *   + Updated for latest APIs
 *
 * v0.1.6
 *   + Changed persistent storage schema to remove Paypal specific
 *     information - this is now the responsibility of checkoutpaypal.
 *   + Made the module stand alone as a plugin to Gallery rather than
 *     being a plugin to the Cart module.  This gives us much greater
 *     flexibiltiy in how we handle items.
 *   + Created permission '[checkout] Purchase item' to decide whether
 *     or not certain items are allowed into the cart.
 *
 * v0.1.7
 *   + Added persistent storage of items ordered, and updated housekeeper
 *     to purge these for non-completed transactions.
 *   + Changed storage of amounts to be string types rather than integer,
 *     and added field to store postage amount in transaction record.
 *   + Fixed many bugs, as listed at
 *     http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=150120#150120
 *
 * v0.1.8
 *   + Changed CheckoutTransaction schema to store details of which payment
 *     plugin was used, and the status of the transaction
 *   + Updated HouseKeeper controller to use status flags to determine
 *     abandoned transactions rather than empty email addresses
 *   + Updated for Beta 4 templating system
 *   + Added translation support
 *   + Added admin option to prevent user being redirected to the cart
 *     when adding items
 *   + Added 'Continue shopping' button in cart
 *   + Fixed numerous minor (nearly invisible) bugs in this upgrade
 *   + Improved module installation and initial configuration workflow
 *   + Added note in cart block to show when items were added OK
 *
 * v0.1.9
 *   + Added event listener to allow cart to be emptied by other modules
 *     (mainly for payment plugins once payment is complete)
 *   + If paper types are used, new items added to the cart default to the
 *     first configured type
 *
 * v0.1.10
 *   + Fixed bug for returnUrl in embedded mode (may also fix multi-site)
 *   + Added 'empty cart' function (from ebaptist in forums)
 *   + Validating product prices in admin page
 *   + Do not pass items with zero quantity through the checkout
 *
 * v0.1.11
 *   + Added rudimentary per-item pricing support using Custom Fields module
 *     Add two new custom fields to Photos (not supported on Albums):
 *       CheckoutPricing (string field)
 *       CheckoutProducts (choose either 'Any product' or 'Only listed products')
 *     For items to have per-item pricing set the CheckoutPricing field as follows:
 *       product 1 name:product 1 price|product 2 name:product 2 price
 *     These values will be parsed to overwrite the standard product prices
 *     It is not possible to define new products here that the Checkout module doesn't
 *     already have defined.
 *     If CheckoutProducts is set to 'Only listed products' then only the products with
 *     per-item prices defined will be available for that item.  Otherwise all products
 *     will be available, with per-item prices overriding the defaults where set.
 *
 * v0.1.12
 *   + Bug fix for when Custom Fields module is enabled and user tries to view
 *     an empty cart
 *
 * v0.1.13
 *   + Updated for version 2.1 APIs
 *
 * v0.1.14
 *   + Bug fix release, removed unstable development code that had made it into
 *     module.inc
 *
 */
