Attribute to product card
-
Hi, I would like to bring the attributes according to the product id on each product card.
E.g:
I have the x card with the product y information etc and I would like to bring some attributes on it
This thing is made from what I saw in product-card.vue and the attributes on the product page are in the blade.
Where could I send those attributes in vue?<div class="card-body"> <div class="product-name col-12 no-padding"> <a class="unset" :title="product.name" :href="`${baseUrl}/${product.slug}`"> <span class="fs16">{{ product.name | truncate }}</span> <span class="fs16">2</span> </a> </div> <div class="sticker new" v-if="product.new"> {{ product.new }} </div> <div class="product-price fs16" v-html="product.priceHTML"></div>
for example here i want to add some attributes
-
Hi @DaniD,
For this
product-card
component has been used. I am assuming that you are familiar with VueJS.You can pass attribute props to the component as per your needs.
This is just a sample you need to implement according to your need,
Declaration:
props: [ 'list', 'product', 'productAttributes', ],
Passing Props:
<product-card product-attributes="{{ $productAttributes }}" ...>