TTG CE2 Cart Changelog

v1.5.9 ( 2014-02-18 )

  • Added per-item shipping for non-base prices
  • Added code to ignore the tax state when the tax country is set to non-US

v1.5.8 ( 2012-10-17 )

  • Updated jquery.ttgcart.js file for TTG CE2 Client Response Gallery cart listening.
  • Fixed an error where free shipping thresholds were incorrectly calculated after tax had been applied.
  • Fixed warning messages when handling Discount Codes.

v1.5.7 ( 2012-03-28 )

  • Bug fixes to masthead.

v1.5.6 ( 2012-03-26 )

  • Bug fixes to masthead.
  • Bug fixes to forms.
  • Critical bug fix to Facebook OPG integration.

v1.5.5 ( 2012-03-23 )

  • Set z-index:100 for the cart widget.
  • Added option to remove menu dividers in drop-down menu.
  • Moved currentPageURL(), currentPageLocation(), currentPageName() PHP functions into main source, exposing them for generic use; previously only available when enabling Facebook OPG integration.
  • Navigation font-style, font-weight, text-decoration and text-transform settings now properly apply to drop-down style menus.

v1.5.4 ( 2012-01-18 )

  • Compatibility updates for LR4.
  • Fixed the display of tax country / state selects, so that they won't appear when INCLUDE_SALES_TAX is set to no. There's now no further need to play around with the tax country/state setting in order to make the select disappear.
  • Appended the text [DEMO MODE] to the subject of emails sent out when the cart is in demo mode.
  • Updated Documentation and Tutorials buttons linking to The Turning Gate; added Templates & Themes button.
  • Added new 'Marker Felt' font-stack to font-family choices.
  • Added German language file, courtesy of Thomas Menath.
  • New background inclusions for upcoming themes.
  • New handling of still images in the block for all engines to better address IE8's quirks.
  • Added 'Padding-bottom' slider to footer to match TTG CE2 Theme for WordPress UI.
  • Cleaned up and standardized PHPlugins examples in all engines.
  • Engine now exports filmstrip images; this is in an effort to maintain standard behavior for “the block” content area, so that images may be included there (though in the cart, I think it inappropriate to use that feature).

v1.5.3 ( 2011-12-27 )

  • Paragraph Font-family now applies to list items in the block.
  • Changed method of position footer at bottom of page.

v1.5.2 ( 2011-12-25 )

  • Public release.
  • Updated address hiding script for mobile browsers to use a more universal technique authored by Scott Jehl.
  • Bug fixes.

v1.5.1 ( 2011-12-20 )

  • Private QA release.
  • Revised PHPlugins G_STYLE identifier(s) to be more consistent with CE2 naming.

Setting 'yes' for either or both creates a new select on the cart checkout page. Selecting a value will update the shipping on the page, removing the shipping cost for anything other than 'shipped to my address'. For orders where Self-collection or Digital download are chosen, an additional note is added to the cart order emails stating that this fact and that no shipping is required.

  • Tax regions.

New settings for SALES_TAX_COUNTRY and SALES_TAX_STATE. If the tax country is configured but tax state left blank, then a country selector is given in the cart page. When a customer selects a country different from the configured tax country then sales tax is removed from the cart. When a user first visits the cart, SALES_TAX_COUNTRY will be set as the initial value of the select box.

Likewise, if the tax country is set to US and the tax state configured, a state selector is given, pre-populated with US states. Selecting a state other than the configured tax state removes the tax. The customer can choose 'Outside US' as the last item in the select.

These entered valuse are checked against the state and country as entered at PayPal. So for a photographer based in CA, if the customer selects something other than CA in the cart, the tax will be removed prior to visiting PayPal, but if they then select CA as a shipping state at PayPal, the tax will return into the cart on the final confirmation page.

Note that sales tax will also be applied in the following cases:

- The sales tax is configured and customer chooses self-collection of items, regardless of where the customer is located. - The sales tax is configured, customer chooses Digital download and the option TAX_DIGITAL_DOWNLOADS is set to 'yes'. By default this option is set to 'no'.

  • Display Tax up-front.

When DISPLAY_TAX_UPFRONT is set to 'yes', the sales tax, if applicable, is added into the price as soon as you click the Buy button. It's also included in the dynamic price fetched from the server as you change the quantity, and in the cart widget. When you reach the cart, the tax is shown separately. The cart remembers your tax status, so for example if you choose a state/country or digital downloads from the cart that won't incur tax, then upon return to the gallery taxes will no longer be included in the buy dialog and widget.

  • Purchase option separators.

For pricing that includes many options, or options that are logically grouped together, it's now possible to add a separator line in the select box to improve clarity. This is configured by adding the word separator within the pricing configuration like this:

Size|base|4 x 6" print=10|5 x 7" print=12|separator|8 x 10" print=25|11 x 14" print=40|16 x 20" print=55

This will result in a selector that looks like this:
4 x 6” print - $10
5 x 7” print - $12
8 x 10” print - $25
11 x 14” print - $40
16 x 20” print - $55

The value for the separator, e.g. '-------', is pre-configured in the variable SELECT_SEPARATOR, which can be changed if needed in config/settings.php

  • Changed configuration items

For those who wish to manually update your cart configuration, the following configuration options have been added to the cart. However, we do not recommend attempting to manually update CE version carts to CE2; carts should be exported in full for this update.


//=============== New settings below SALES_TAX:

// Restrict sales tax to only be payable in this country.  Set to country code, e.g. US  
// See the "countries" list in config/globals.php for a full list of country codes

// Restrict sales tax to only be payable for customers from this state.  Set to state code, e.g. CA  
// See the "usStates" list in config/globals.php for a full list of US state codes

// Whether to include sales tax in the initial purchase price as seen on the gallery purchase dialog

//=============== New settings below TAX_SHIPPING:

// Whether to offer a self-collecion option at the cart.  Self-collected items do not incur shipping costs, but will be taxed if sales tax is configured above.

// Whether to offer a digital download option at the cart.  Downloads do not incur shipping costs.  Configure TAX_DIGITAL_DOWNLOADS, below, if tax is required for these

// Whether to apply sales tax on digital downloads

//=============== New settings below PAYPAL_BUTTON_LOCALE:

// Separator to use in the purchase select boxes.  To use a separator add a pricing entry of 'separator', 
// e.g. Size|base|4 x 6" print=10|5 x 7" print=12|separator|8 x 10" print=25|11 x 14" print=40|16 x 20" print=55



Additional lists for usStates and countries. Cut-and-paste these lists or the entire globals.php from a newly-exported cart.


//=============== Additional text below BUTTON_BACK_TO_THE_CART:

TEXT_DOWNLOAD_MESSAGE=Customer has requested items for digital download. No shipping required.
TEXT_PICKUP_MESSAGE=Customer will collect the items.  No shipping required.

v1.5.0 ( 2011-12-12 )

Private QA release.

TTG CE2 Cart; cart updated to CE2 framework.

Support added for TTG CE2 Photoswipe Gallery, TTG CE2 Horizon.

v1.2.2 ( 2011-10-22 )

Fixed the PAYPAL_BUTTON export so that it picks up the value from the settings rather than always setting to ‘text’ (edited in galleryInfo.lrweb).

Fixed the rounding issues by rewriting the code to check for all displayed values before determining whether decimals should be added.

Changed the behaviour of removing all items from the cart, so that now this causes the entire cart to be reset, removing applied discounts in the process.

Added a configuration option to set pricing style format to the ‘European’ style (e.g. 1 234,56). Note that this price format only applies to output. All amounts in the configuration still need to be set with the standard notation (1234.56).

v1.2.1 ( 2011-09-11 )

Display Discount Code in order emails (if set).



Fixed a bug where Before shipping line was missing for orders that included item pricing but neither flat shipping or sales tax.

Fixed a bug where free shipping threshold was being ignored for orders that included item pricing but neither flat shipping or sales tax.

Several changes to convert quotes and other characters to HTML entities, to improve presentation and avoid XSS attacks.

Fixed footer display issue on change item page.

v1.2.0 ( 2011-08-17 )

Implementation of a Minimum Order Amount (optional). The cart total before taxes and shipping must meet the amount before checkout can proceed.

Discount bands. Customers can receive percentage discounts should their cart total meet the configured amounts.

Discount codes. Customers can receive a percentage discount by entering in a discount code prior to checkout. Codes can be given an expiry.

Shipping per item type. Previously, the item shipping applied to any type of item for a pricing scheme. These can now be specified for each selection of the base pricing. For example, a small print can be given a $2 shipping rate, and a large print a $4 shipping rate, even with both falling under the same pricing scheme.

Customer order emails are now populated via a simple template. Savvy users can edit the template to add customisations such as a logo, or further company information.

Customer order emails include thumbnails.

Solved an issue with IE8 users being unable to access carts residing on a different domain from the gallery.

Solved an issue where pressing enter on a cart text field would lead to the edit item page instead of submitting the form.

v1.1.5 ( 2011-07-27 )

Fixes a new bug in 1.1.4 where PayPal transactions wouldn’t clear the cart correctly.

v1.1.4 ( 2011-07-25 )

Horizon compatibility

Attempts to send smtp emails without authentication when both SMTP_USERNAME and SMTP_PASSWORD are empty.

Set individual photos to be unavailable for purchase by using a the pricing_scheme not-for-sale.

Added return lines to HTML emails to prevent smtp truncation.

v1.1.3 ( 2011-07-23 )

Added total amount to PayPal description.

Moved error display setting above importing PHP files, so that notices can be disabled prior to any displayed by sourced files.

Added MAIL_DEBUG setting to index.php, so that users can find debug messages upon sending out actual order emails.

Changed handling of post forms for edit and update item, so that IIS would not attempt an internal redirect with post variables causing an infinite loop.

Cleaned up several points in the code that could generate notices.

v1.1.2 ( 2011-07-15 )

Bug fixes.

v1.1.1 ( 2011-07-11 )

Updated menu defaults to synch with TTG Pages CE.

Fixed localization bug with “Quantity”.

v1.1.0 ( 2011-06-27 )

Check-box configuration. Check-boxes may be configured to display on checkout and may be either mandatory or optional. Example uses may be to force agreement to terms and conditions of sale, or to allow uses the option of signing up for mailing lists. Check-boxes may have messages associated, defining terms, conditions, policies, etc. These terms support Markdown formatting. Configure check-boxes within settings.php, after exporting your cart.

Enhanced order editing. New function allowing shoppers to modify their item options from within the cart view.

Per-item shipping prices allow different shipping amounts for different items, defined as defined within price profiles.

Free shipping threshold. Configure INCLUDE_FREE_SHIPPING_THRESHOLD and FREE_SHIPPING_THRESHOLD to set a minimum order value over which free shipping is applied.

Colorbox added to cart page and item update page (users can click on thumbnails within the cart to view a larger photo).

Option for text PayPal button. Configure PAYPAL_BUTTON to include a textual button for PayPal in the style of all other cart buttons, or to use an image button from PayPal. Set to ‘text’ or ‘image’.

Added quantity to modal purchase dialogue when clicking the BUY button.

Added [COMPANY_NAME] to email subjects.

Diagnosis page now differentiates between order save directories that don’t exist, and those that exist but are unwritable.

Altered parameter when sending URLs to avoid mod_security filtering.

New styling options for cart appearance.

New reset function (cart/?action=reset). This clears the settings, clears the cart, and sends the user to the gallery.

Added diagnostics and validation for checkboxes and additional field configuration.

Improved URL handling for IIS.

v1.0.3 ( 2011-06-16 )

Background-color fix

Modal dialogue height fix. The modal dialogue now expands correctly with a long list of options.

Multi-double-quote pricing option fix. Users can now use more than one ” in a pricing option.

Byte Order Mark removal on prices. Price files created in Windows and including non-Western characters will no longer cause a mis-match error on pricing options.

Rounding to 2 decimal places on passing total to PayPal. This prevents an invalid total message from PayPal when calculating with sales taxes over two decimal places.

Hostname resolved from HTTP_HOST rather than SERVER_NAME. This fixes the issue in the case that SERVER_NAME not include ‘www’, so that the cookie and cart appears lost after returning from PayPal.

v1.0.2 ( 2011-06-13 )

Admin includes Test SMTP function.

Made adjustments to page styling for notices and thank you page.

All form actions use cart URI as resolved from the domain name when the cart is created. This solves the 1.0.1 issue of buttons not working should a cart be named something other than ‘cart’. You may need to do a once-off action=clearCart for this to take effect.

Changed the way templates/views are found, so that renaming cart directories doesn’t break the cart.

Improved handling of item_name, so that if the is non-existent the modal won’t show an empty ‘Item Name:’

Improved include directives so that if the code won’t attempt to include the same PHP file more than once.

Cart defaults for now setup for running a ‘live’ cart rather than a ‘demo’ cart, as it seems more intuitive to assume an exported cart is live.

v1.0.1 ( 2011-06-09 )

Bug-fix: Orders should no longer save to disk as blank documents.

Bug-fix: Added a default form action of “../cart/”. This solves the issue of the PayPal “Cancel” button not working.

Fixed some errors in the UI.

Added sandbox credentials as a .txt file, stored in the /config/ folder.

Fixed an erroneous error report in admin.

v1.0.0 ( 2011-06-07 )

First release.