fire (JS API v2)

Version 2 API only.

fire

Method Signature

void ultraCart.fire(String event);

Description

Fires an ultraCart event. This is useful if you update something in the cart manually and wish to notify renderers to update.

Parameter

String event - the name of the event. Events are listed and discussed in the init() method documentation.

Result

no return value





function setSomeFlag(){
    // assume that this variable means something to your renderers
    var someFlag = '50% off';
    ultraCart.fire(ultraCart.events.EVENT_CART_CHANGE);