The add to cart function is not working for configurable products on product listing page.
When selecting the configurable product options(color,size) of the product and then trying to add the product to the cart, the cart is not updating and instead I'm redirected to the product detail page.
The configurable products need to be added to the cart when on the product listing page rather than redirecting to the product detail page.
There are no errors in the console and the Network tab is also showing no errors.
After redirecting to product detail page a message appears on top that you need to select options for your item.I have already chosen the required options.
Thanks in advance.