PHP Classes

File: resources/js/components/Shop/Product.vue

Recommend this page to a friend!
  Classes of Edward Paul   Flexible PHP Coupon System   resources/js/components/Shop/Product.vue   Download  
File: resources/js/components/Shop/Product.vue
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Flexible PHP Coupon System
E-commerce system that supports discount coupons
Author: By
Last change:
Date: 4 years ago
Size: 957 bytes
 

Contents

Class file image Download
<template> <figure class="figure"> <img :src="product.image" :alt="product.title" class="figure-img img-fluid rounded" > <figcaption class="figure-caption "> <a href="#">{{ product.title }}</a> ${{ product.price }} <p>{{ product.description }}</p> <button class="btn btn-primary" role="button" @click.prevent="addToCart">Add to cart</button> </figcaption> </figure> </template> <script> import { mapActions } from 'vuex'; export default { name: "Product", props: ['product'], methods:{ ...mapActions({ addProductToCart: 'addProductToCart' }), addToCart () { this.addProductToCart({ product: this.product, quantity: 1 }) } } } </script> <style scoped> .figure-img { width: 100%; } </style>