Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addToCart(product) {
- let productPrice = parseInt(product.sale_price) > 1 ? parseInt(product.sale_price) : parseInt(product.price);;
- let cartProduct = {
- product_id: product.id,
- name: product.title,
- thumb: product.image,
- count: this.productCount,
- totalPrice: productPrice
- };
- this.updateCartBadge(cartProduct);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement