var App_Product_View = qs.createObject(); App_Product_View.prototype = { options: {}, _imageContainerId: 'additional-images', initialize: function (options) { this.options = $.extend(this.options, {}, options); this.initAdditionalImages(); }, initAdditionalImages: function () { if ($('#' + this._imageContainerId).size()) { Galleria.loadTheme('js/galleria/classic/galleria.classic.js'); Galleria.configure({ debug: false, responsive: true, imageCrop: true }); Galleria.run('#' + this._imageContainerId); } } }; var App_Product_View_AddItem = { onSuccessCallback: function(formId) { var response = Qs_Form.getFormOption(formId, 'response'); if (response.success === false) { alert('Error while add item to cart'); } else { if (response.success.type == 'message') { response.success.type = 'success'; } noty({text: response.success.message, type: response.success.type, timeout: 3000}); if (typeof App_Cart_Small != 'undefined') { App_Cart_Small.reset(); App_Cart_Small.updateQty(response.success.quantity); } } } };