Issue #932 fixed

This commit is contained in:
jitendra 2019-05-31 17:52:52 +05:30
parent 445b648b0a
commit 8202f58284
2 changed files with 5 additions and 2 deletions

View File

@ -135,6 +135,9 @@ class ConfigurableOption extends AbstractProduct
$attributeValue = $product->{$productAttribute->code};
if ($attributeValue == '' && $product instanceof \Webkul\Product\Models\ProductFlat)
$attributeValue = $product->product->{$productAttribute->code};
$options[$productAttributeId][$attributeValue][] = $productId;
$options['index'][$productId][$productAttributeId] = $attributeValue;

View File

@ -138,7 +138,7 @@
this.resetChildren(attribute.nextAttribute);
} else {
this.selectedProductId = attribute.options[attribute.selectedIndex].allowedProducts[0];
this.selectedProductId = this.simpleProduct;
}
//buy now anchor href changer with options
@ -219,7 +219,7 @@
if (prevOption) {
for (j = 0; j < options[i].products.length; j++) {
if (prevOption.products && prevOption.products.indexOf(options[i].products[j]) > -1) {
if (prevOption.allowedProducts && prevOption.allowedProducts.indexOf(options[i].products[j]) > -1) {
allowedProducts.push(options[i].products[j]);
}
}