sprd/manager/ApiBasketManager.js
function (element, quantity, callback) {
                if (this.$.basket) {

                    this.fixBasketCurrency();

                    var basketItem = this.$.basket.addElement(element, quantity);
                    element = basketItem.$.element;

                    var originId = this.$.originId;
                    if (originId) {
                        basketItem.set('origin', new Entity({
                            id: originId
                        }));
                    }

                    this.extendElementWithLinks(element);
                }

                callback && callback();
            }
function (element, quantity, callback) {
                if (this.$.basket) {

                    this.fixBasketCurrency();

                    var basketItem = this.$.basket.addElement(element, quantity);
                    element = basketItem.$.element;

                    var originId = this.$.originId;
                    if (originId) {
                        basketItem.set('origin', new Entity({
                            id: originId
                        }));
                    }

                    this.extendElementWithLinks(element);
                }

                callback && callback();
            }
function ( element , quantity , callback ) { if ( this . $ . basket ) { this . fixBasketCurrency ( ) ; var basketItem = this . $ . basket . addElement ( element , quantity ) ; element = basketItem . $ . element ; var originId = this . $ . originId ; if ( originId ) { basketItem . set ( 'origin' , new Entity ( { id : originId } ) ) ; } this . extendElementWithLinks ( element ) ; } callback && callback ( ) ; }
Adds an element to the basket without saving it
@param element
@param quantity
@param callback
Adds an element to the basket without saving it