Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var subTotal = [];
- async.each(cartitems,function(eachItem,callbackEach) {
- modelProduct.getPriceById(eachItem.products_id,(hasil)=>{
- if (!hasil) {
- console.log('err');
- callbackEach();
- } else {
- console.log(hasil[0].publish_price); //3000, 32000
- subTotal.push(hasil[0].publish_price);
- callbackEach();
- }
- })
- },function(errEach) {
- console.log('subtotl '+ JSON.stringify(subTotal));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement