var ishopModule = x3mModule.extend( { connector: null, preventJquery: false, constructor: function (preventJquery) { this.preventJquery = preventJquery; this.connector = new fConnector('ishop'); }, setPaySystem: function (paysystem) { this.connector.execute( { set_paysystem: { paysystem: paysystem } }); }, addToCart: function (id, count, ext, callback) { if (!id) return; obj = { id: id, count: count } if (ext) { obj['ext'] = ext; } this.connector.execute( {add_to_cart: obj}, callback); if (!callback) return this.connector.result.cart; }, getCartItems: function () { this.connector.execute( { get_cart: true }); return ishop.connector.result.cart_items; }, jqueryRun: function () { if (this.preventJquery) return; /* $('a[rev=tocart]').ishopToBasket(); */ $.fn.ishopToBasket = function (options) { var defaults = { count: 1, idAttribute: 'id', onGoodAdded: null, extDataFunc: null, syncAddToBasket: true, basketContainer: '.basket-container', basketCountSelector: '.basket-count', basketAllCountSelector: '.basket-count', basketSumSelector: '.basket-sum', basketElementTemplate: '