I get this error on all configurable products "You need to choose options for your item" when i try to add a product to cart even if size and color option are chosen

Magento 2.2.5

This error is only on product detail, in product list add to cart works fine

How can i degub?

  • Can we have frontend link ? Sep 10, 2018 at 5:32
  • no i'm sorry it is on local host
    – Altravista
    Sep 10, 2018 at 6:11

1 Answer 1


You need to check what parameters we are sending in post data.when we select color and size so it select their option id and these option id sent in post data.So you need to check Post data in addProduct function.

  • how can i check what parameters we are sending in post data?
    – Altravista
    Sep 11, 2018 at 6:20
  • When u click on add to cart it always hit a controller so in that controller you have to print_r the request which you are getting from the post. filePath: vendor/magento/module-checkout/Controller/Cart Add.php. Print this line: $params = $this->getRequest()->getParams(); Sep 11, 2018 at 6:58
  • @Altravista did u get post Data? Sep 11, 2018 at 8:20
  • no but the strange thing is that only firefox browser have this problem but i have delete cache and also reinstall firefox
    – Altravista
    Sep 11, 2018 at 8:23
  • @Altravista the only reason "You need to choose options for your item" error occur when you don't post proper data to function. if its related to your browser issue then you should check the post data in different different browser and check if there any parameter is missing or not.if you get all the parameters in all browser then this issue is related to browser cache. Sep 11, 2018 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.