diff --git a/city e-commerce 0.0.1.html b/city e-commerce 0.0.1.html index 7556d58..edf44cc 100644 --- a/city e-commerce 0.0.1.html +++ b/city e-commerce 0.0.1.html @@ -9575,20 +9575,13 @@ myInfo: { indexes: {floId: null} }, - my_orders_history: { - txid: null, - status: null, - }, + my_orders_history: {}, // for Seller view sellerProducts: {}, // for Buyer view - my_search_history: { - indexes: { - productCategory: null, - } - } + my_search_history: {}, } //add other given objectStores for (o in this.appObs) @@ -9939,6 +9932,21 @@ .substr(2, 9)}`; } + function printArrayOfArrays(arr, resultant_array={}) { + if ( typeof(arr) == "object") { + for (elem in arr) { + if (arr.hasOwnProperty(elem)) { + printArrayOfArrays(arr[elem], resultant_array); + if(typeof(arr[elem]) !== "object" + && typeof(arr[elem]) !== "undefined") { + resultant_array[elem] = arr[elem]; + } + } + } + return resultant_array; + } + } + @@ -10467,7 +10496,8 @@ { item_flo_id: item_flo_id, productCategory: category - }); + }, + category); }, remove_item_from_bucket: function(item) { for (i = 0; i < this.buy_list.length; i++) { @@ -10593,10 +10623,12 @@ console.log(buy_order_object); // Send buy info to server - floCloudAPI.sendGeneralData(buy_order_object, this.DATA_TYPE.BUY_ORDERS, { receiverID: floGlobals.adminID, senderIDs: [myFloID] }); + //floCloudAPI.sendGeneralData(buy_order_object, this.DATA_TYPE.BUY_ORDERS, { receiverID: cashier, senderIDs: [myFloID] }); + + floCloudAPI.sendApplicationData(buy_order_object, ecommerce.master_configurations.DATA_TYPE.BUY_ORDERS, {application:ecommerce.master_configurations.SUBJECT, receiverID:cashier}); // Store info in local history - compactIDB.addData('my_orders_history', buy_order_object); + compactIDB.addData('my_orders_history', buy_order_object, buy_order_object.txid); const payment_info_data = { payment_amount: this.final_price, @@ -10803,5 +10835,147 @@ } + + +