Advertisement
erick21

test 1

Jan 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. var subTotal = [];
  2. async.each(cartitems,function(eachItem,callbackEach) {
  3. modelProduct.getPriceById(eachItem.products_id,(hasil)=>{
  4. if (!hasil) {
  5. console.log('err');
  6. callbackEach();
  7. } else {
  8. console.log(hasil[0].publish_price); //3000, 32000
  9. subTotal.push(hasil[0].publish_price);
  10. callbackEach();
  11. }
  12. })
  13. },function(errEach) {
  14. console.log('subtotl '+ JSON.stringify(subTotal));
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement