Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tutaj musi być zmiana:
- addToCart() {
- const thisProduct = this;
- thisProduct.name = thisProduct.data.name;
- thisProduct.amount = thisProduct.amountWidget.value;
- app.cart.add(thisProduct);
- }
- brakuje tego name i amonut właśnie w tej chwili bo te info jest zaszyte trochę dalej w tym obiekcie.
- Możesz sobie dać console.log w funkcji add w Carcie żeby zobaczyć co ona otrzymuje po dodaniu do koszyka.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement