Ext.define('TradePortal.store.updateCartProduct', {
    extend: 'Ext.data.Store',
    model: 'TradePortal.model.Valid',
    storeId: 'updateCartProduct',
    proxy: {
        type: 'jsonajax',
        url: BASE_URL + '/fluid/FluidAppServerProxy?ipApi=presenter&ipService=Frameworks.Interfaces.Mobile.TradePortal&ipFunction=updateCartProduct'
    },
    listeners: {
        load: {
            fn: function (store, records, options) {
                if (!records[0].data.errorTable) {
                    Ext.getStore('Cart').load({
                        params: {
                            userName: Ext.getStore('HomeStatistic').last().data.id_user,
                            tpaID: 'tportal',
                            sessionID: Ext.getStore('createCart').last().data.sessionID
                        }
                    });
                }
            }
        }
    }

});
