Hello guys, why does the add to cart button appear disabled?
In magento I have the stock correctly configured
![No description](https://cdn.answeroverflow.com/1166553434372182066/image.png)
![No description](https://cdn.answeroverflow.com/1166553434770657360/image.png)
5 Replies
Hi @jeanpier92 π , I think I'm looking at a VSF2 project so I'll base my answer off of that. There are several reasons why that button would be disabled. Let's go down the rabbit hole π
In the SimpleProduct Component if you find the button you'll see an attribute that determines if the button is disabled or not with a function being called . . .
![No description](https://cdn.answeroverflow.com/1166640391194427432/image.png)
In the same file you'll see the
canAddToCart
comes from the useCart
composable . . .![No description](https://cdn.answeroverflow.com/1166640888173309982/image.png)
There you'll find the reasons why the add to cart button might be disabled:
![No description](https://cdn.answeroverflow.com/1166641297856143379/image.png)
thank you so much!!