Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Attribute to product card

    General Discussion
    2
    2
    160
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User last edited by A Former User

      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

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        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 }}" ...>
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post