Bagisto Forum

    Bagisto

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

    How to push array by component in bagisto vue js. ?

    General Discussion
    2
    2
    218
    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.
    • _
      _developer_12 last edited by

      I have tried as a following code but not working : -

      data: function() {

                          return {
                              selectedProductId: '',
                              selectedProductIdArr: [],
                              config: @json($config),
                          }
                      },
      

      methods: {
      setQty: function(attribute, value, event) {

                                     this.simpleProduct = this.getSelectedProductId(attribute, value);
         
                                     this.simpleProduct=this.getSelectedProductIdArr=[{'d':this.simpleProduct}];
         
         
         
                                     console.log(this.getSelectedProductIdArr);
      
      1 Reply Last reply Reply Quote 0
      • N
        Naresh-webkul last edited by

        Hello @_developer_12 ,
        just check the following link:
        https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php

        here you can see $config = $configurableOptionHelper->getConfigurationConfig($product)

        and then $config is used as json data in the component.

        Thank you.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post