Skip to content

Commit 5b844db

Browse files
ENGCOM-4355: Show error message when customer click on Add to cart button without selecting atleast one product from recently orderred list #21401
- Merge Pull Request #21401 from mageprince/magento2:mageprince-2.3-Fix-no-errormessage-show-on-addtocart - Merged commits: 1. 0df8d31 2. adccc57
2 parents 94383aa + adccc57 commit 5b844db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/Checkout/Controller/Cart/Addgroup.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public function execute()
7474
}
7575
}
7676
$this->cart->save();
77+
} else {
78+
$this->messageManager->addErrorMessage(__('Please select at least one product to add to cart'));
7779
}
7880
return $this->_goBack();
7981
}

0 commit comments

Comments
 (0)