How to push array by component in bagisto vue js. ?
-
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);
-
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.phphere you can see $config = $configurableOptionHelper->getConfigurationConfig($product)
and then $config is used as json data in the component.
Thank you.