Namespace

stat_sales

stat_sales

Sales Manager

Classes

Product

Members

static Products

Product list

Methods

static addOrder(fp)

Activate Order tracking

Parameters:
Name Type Description
fp string

Final path, as computed for level2 mapping

static addProducts()

Add product list (generate xt_cart)

static getCartID()

Local CartID manager

static getCurrencyFloat(str) → {float}

Retrieve value as number rounded 2

Parameters:
Name Type Description
str string

Number with possible currency, comment or local separator (like "1 200,93 €" or "$1,200.93 VAT")

Number rounded 2 (like 1200.93)

float

static getCurrencyString(str) → {string}

Retrieve value as international string from string with currency and local separator.

Parameters:
Name Type Description
str string

Number with possible currency, comment or local separator (like "1 200,93 €" or "$1,200.93 VAT")

International number as string (like "1200.93")

string

static getFloatStringUpdate()

Return the first argument as float string if not zero, otherwise the second if it's a number, otherwise an empty string.

static getNodeCurrencyFloat(n) → {float}

Retrieve node value as number rounded 2

Parameters:
Name Type Description
n object

Node containing possible currency, comment or local separator (like "1 200,93 €" or "$1,200.93 VAT")

Number rounded 2 (like 1200.93)

float

static init(fp)

Initialize sales tracking

Parameters:
Name Type Description
fp string

Final path, as computed for level2 mapping

static initProducts(ap)

Product list initialization

Parameters:
Name Type Description
ap array

Array of product configuration

static isConfMode() → {boolean}

Ask if current mode is confirmation

true if confirmation mode, false otherwise

boolean

static productView()

Product impression

static reInit()

Clean all status

static setParams()

Set sales tracking parameters