Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. const payload = {
  2. address: thisCart.dom.address.innerHTML,
  3. totalNumber: thisCart.totalNumber,
  4. subtotalPrice: thisCart.subtotalPrice,
  5. deliveryFree: thisCart.deliveryFree,
  6. totalPrice: thisCart.totalPrice,
  7. products: []
  8. };
  9.  
  10. Powinno być [] zamiast {}
  11.  
  12. I druga rzecz ważniejsza, odpal sobie ten kod:
  13.  
  14. for (let product in thisCart.products) {
  15. console.log(product);
  16. payload.products.push(thisCart.products[product].getData());
  17. }
  18.  
  19. Generalnie chodzi mi o console.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement