Ext.define('TradePortal.store.ProductLengthTally', {
    extend: 'Ext.data.Store',
    model: 'TradePortal.model.ProductLengthTally',
    storeId: 'ProductLengthTally',
    proxy: {
        type: 'jsonajax',
        url: BASE_URL + '/fluid/FluidAppServerProxy?ipApi=presenter&ipService=Frameworks.Interfaces.Mobile.TradePortal&ipFunction=getLengthsForProduct',
        reader: {
            type: 'json',
            root: 'dataset.LengthList'
        }
    },
    listeners: {
        load: {
            fn: function (store, records, options) {
                Ext.getStore('TallyProducts').load({
                    params: {
                        sessionID: Ext.getStore('createCart').last().data.sessionID
                    }
                });
            }
        }
    }
});
