diff --git a/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php b/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php index 9f596b845..7aec6ea26 100644 --- a/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php +++ b/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php @@ -126,7 +126,7 @@ class ConvertXToProductId foreach ($attributeOptions as $attributeOption) { $selectedOptions = $attributeOption->value; - if ($attributeOption->type == 'select' || $attributeOption->type == 'multiselect') { + if (isset($attributeOption->type) && ($attributeOption->type == 'select' || $attributeOption->type == 'multiselect')) { $attribute = $this->attribute->findWhere([ 'code' => $attributeOption->attribute ]); @@ -164,6 +164,8 @@ class ConvertXToProductId $selectedAttributeValues = collect(); + $foundProducts = collect(); + if ($attributeOption->attribute == 'sku') { $testValue = $attributeOption->value; $testCondition = $attributeOption->condition;