Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On the order confirmation page, an OrderSummary orderSummary object is also available:

Panel
bgColor#e4f4fb
titleBGColor#e8e8e8
titleOrder Data Members (only available in the ConfirmationExtra PagePart)

PF.OrderSummaryorderSummary.confirmation : int
PF.OrderSummaryorderSummary.subTotal : number
PF.OrderSummaryorderSummary.discount : number
PF.OrderSummaryorderSummary.tax : number
PF.OrderSummaryorderSummary.shipping : number
PF.OrderSummaryorderSummary.total : number
PF.OrderSummaryorderSummary.balanceDue : number

...

 

Integrating with 3rd-Party Shopping Cart Tracking Scripts 

In order to register order completion with 3rd-party shopping cart tracking scripts, the ConfirmationExtra-mobile PagePart can be used.  Within that PagePart, the PF.orderSummary object described above will be available for use.

If a 3rd-party integration includes a call to load an external script, that script will be loaded asynchronously meaning that any JS commands you place immediately afterwards may run before the script is actually loaded.

Code Block
languagejs
titleLoading a 3rd-Party Script
<script type=text/javascript" src="//www.some-shopping-cart-tracker.com/script.js"></script>

 

To combat this, you may need to wrap the subsequent integration code into an anonymous function that waits until the objects from the 3rd-party script are loaded and available to be used. 

 

Here's an example that creates an anonymous function to check for the existence of the 3rd-party tracker's object ("MyTracker" in our example) and then calls the fictitious "TrackOrder" method passing along the order # and total.

Code Block
languagejs
titleWait For 3rd-Party Script Before Using It
( function _trackerScript() {
                if (typeof (MyTracker) == "undefined") {
                    setTimeout(function () { _trackerScript(); }, 500);
                } else {
                    MyTracker.TrackOrder(PF.orderSummary.confirmation, PF.orderSummary.total);
                }
   })();

 

Scheduling Page Publishes

...