cancel
Showing results for 
Search instead for 
Did you mean: 

The product has required options

SOLVED

The product has required options

hi alll ,

adding product to cart I got this error in red line "The product has required options"

all product list is a simple product, please helpppppp

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: The product has required options

Hi @Victor Origanes

 

As this is a temp solution to find out your problem dont worry about overwriting the action, just remove the code when you are done. Go to the CartController (app/code/core/Mage/Checkout/controllers/CartController.php), and find the addAction method, this should contain a line saying:

 

} catch (Mage_Core_Exception $e) {

 

it should be around line 241, depending on your version. That was what I was refering to. However doing a quick search through the system I can see the message only being thrown from one place. and with Magento's habbit of doing multiple cathing and rethrowing exceptions, lets skip a head a bit.

 

The file you are looking for is properly:

 

app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php

 

Around line 582, this method contains as I though custome options validation, so these custom options are comming from some place. 

 

You can check what is being tested right before throwing the exception and find out what is broken that way.

 

I hope this helps :-)

View solution in original post

Re: The product has required options

MANY THANKS YOU ARE THE BEST Smiley Happy

View solution in original post

7 REPLIES 7

Re: The product has required options

hi @Victor Origanes

 

Products can still have required options even though they are simple, look under the custome options pannel in the admin for the product you are trying to add to your cart and make sure nothing is there.

 

If these are not active for your products, please paste in the exception being thrown to the cartController when adding the product.

Re: The product has required options

Hi Theis,

Thanks for your solution, actually I have not any options, I checked and i can confirm that is empty.

so I tried the other solution checking the cartController overriding the index action but i does not work, i am not sure if I do some mistakes.

i am not sure if that helpful nor not , cheking the console it create 2 lines

frist GET http://***********.***/checkout/onepage/

secound GET http://***********.***/checkout/cart/  (this line appear always when I got the red message error "The product has required options").

appreciate your help

Many thanks

Re: The product has required options

Hi @Victor Origanes

 

As this is a temp solution to find out your problem dont worry about overwriting the action, just remove the code when you are done. Go to the CartController (app/code/core/Mage/Checkout/controllers/CartController.php), and find the addAction method, this should contain a line saying:

 

} catch (Mage_Core_Exception $e) {

 

it should be around line 241, depending on your version. That was what I was refering to. However doing a quick search through the system I can see the message only being thrown from one place. and with Magento's habbit of doing multiple cathing and rethrowing exceptions, lets skip a head a bit.

 

The file you are looking for is properly:

 

app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php

 

Around line 582, this method contains as I though custome options validation, so these custom options are comming from some place. 

 

You can check what is being tested right before throwing the exception and find out what is broken that way.

 

I hope this helps :-)

Re: The product has required options

MANY THANKS YOU ARE THE BEST Smiley Happy

Re: The product has required options


@Theis Corfixen wrote:

Hi @Victor Origanes

 

As this is a temp solution to find out your problem dont worry about overwriting the action, just remove the code when you are done. Go to the CartController (app/code/core/Mage/Checkout/controllers/CartController.php), and find the addAction method, this should contain a line saying:

 

} catch (Mage_Core_Exception $e) {

 

it should be around line 241, depending on your version. That was what I was refering to. However doing a quick search through the system I can see the message only being thrown from one place. and with Magento's habbit of doing multiple cathing and rethrowing exceptions, lets skip a head a bit.

 

The file you are looking for is properly:

 

app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php

 

Around line 582, this method contains as I though custome options validation, so these custom options are comming from some place. 

 

You can check what is being tested right before throwing the exception and find out what is broken that way.

 

I hope this helps :-)



Alright, so how exactly would you see what's being required?  

 

BTW, finding that line is pretty simple by doing a text search of your magento installation for 'The product has required options.' instead of trying to backtrace it's origin... LOL

 

Anyhow, This isn't a full solution really, even though the reader marked it as such.

Re: The product has required options

The fix is to look in the database table catalog_product_option and find the product_id that coresponds to the product in question.

Re: The product has required options

this is the correct way i spend almost 2 hours and fix the problem (The fix is to look in the database table catalog_product_option and find the product_id that coresponds to the product in question.) change is-requre from 1 to 0. you can export the them and change them.