This commit is contained in:
rahul shukla 2020-02-17 19:36:31 +05:30
parent 3c94cdf100
commit 8d2662b996
1 changed files with 9 additions and 3 deletions

View File

@ -189,9 +189,15 @@
computed: {
product_qty: function() {
return this.option.products[this.selected_product]
? this.option.products[this.selected_product].qty
: 0;
var self = this;
self.qty = 0;
self.option.products.forEach(function(product, key){
if (self.selected_product == product.id)
self.qty = self.option.products[key].qty;
});
return self.qty;
}
},