Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Please specify the product required option(s) error when trying to add to cart
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

@JHubb, that works really well. Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
envisionweb
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-11-16
Orlando, FL
 

I am still getting the same error in the back end when I try and add “custom options” in a product.  The error is:

! One of options row has error

Does anyone else get this error?  Maybe most here don’t have a need to place a custom order in the Admin for a customer and fill out your own options but if someone could test their cart by doing this and see if you get the error, that would be great. Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
purplemine
Sr. Member
 
Total Posts:  143
Joined:  2008-05-20
London
 

Yes that’s right, I’ve changed hasRequiredOptions to hasOptions

I have tested it, but I only have simple and configurable products.  I don’t know the implications of this on other product types.

Thanks,

John

 
Magento Community Magento Community
Magento Community
Magento Community
 
envisionweb
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-11-16
Orlando, FL
 

JHubb, thanks for this.  But I tested it, and doesnt seem to fix my issue, which I thought might have been tied into the same error. 

Here is what I do (see attached screenshots) and I am still getting the “One of options row has error.” Can you test what I am doing here on your cart to see if you get the same error? 

Sorry if I am repeating myself, but once again, here’s what happens:

When I am in the admin placing a custom order (usually from a phone order) I first create a new customer. After selecting that customer, I then select “add products”.  There is a custom field beneath each product title called “custom options” I click on that to open text area, fill in the text field with custom remarks, or products not yet in the cart, etc, then I click “update options and Qnty’s”. After doing so an error shows up on top left.  Everything I had written in the custom options field disappears and it does not get added to order.  I’m using 1.3 Thanks so much!

Image Attachments
Picture 5.pngPicture 4.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
darryla
Member
 
Total Posts:  52
Joined:  2008-07-08
 

I would use this ‘fix’ with caution, I assume that for those who require certain custom options to be selected when the product is added to cart, that this circumvents this validation and therefore allows the sale of poorly defined products. No?

 
Magento Community Magento Community
Magento Community
Magento Community
 
purplemine
Sr. Member
 
Total Posts:  143
Joined:  2008-05-20
London
 

That’s right, it is OK for simple products, just a way to get my cart working again before 1.3.2 and the official fix.  Please use with caution and TEST TEST TEST

 
Magento Community Magento Community
Magento Community
Magento Community
 
winterradio
Sr. Member
 
Total Posts:  84
Joined:  2008-02-01
 

@ envisionweb

I can confirm the problem you are experiencing as well.  Should we post a seperate bug report since this this post and temporary fix are seemingly unconnected?

 
Magento Community Magento Community
Magento Community
Magento Community
 
xrussx
Member
 
Total Posts:  54
Joined:  2008-11-24
 
JHubb - 22 April 2009 05:14 AM

I’ve found a fix that works, but USE WITH CAUTION AND BACK UP YOUR FILES!!!

Also, since I have changed core files, they will be overwritten with the next update so
hopefully it will have been fixed by then.

in app/code/core/Mage/Catalog/Block/Product/List.php

change

public function getAddToCartUrl($product, $additional = array())
{
if ($product->hasRequiredOptions()) {
$url = $product->getProductUrl();
$link = (strpos($url, ‘?’) !== false) ? ‘&’ : ‘?’;
return $url . $link . ‘options=cart’;
}
return parent::getAddToCartUrl($product, $additional);
}

to

public function getAddToCartUrl($product, $additional = array())
{
if ($product->hasOptions()) {
$url = $product->getProductUrl();
$link = (strpos($url, ‘?’) !== false) ? ‘&’ : ‘?’;
return $url . $link . ‘options=cart’;
}
return parent::getAddToCartUrl($product, $additional);
}

Please note, I won’t be held responsible if you mess your store up!!! smile

Hopefully that will work for everyone else too!

All I have is simple products and this fix WORKED!

Thanks for your help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
envisionweb
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-11-16
Orlando, FL
 
winterradio - 22 April 2009 11:43 AM

@ envisionweb

I can confirm the problem you are experiencing as well.  Should we post a seperate bug report since this this post and temporary fix are seemingly unconnected?

Thanks for checking winterradio.  I think I posted this elsewhere, but I will need to double check.  If not we definitely need to post this in another thread if it is unrelated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
metalMilita
Member
 
Total Posts:  53
Joined:  2008-11-03
sweden
 
JHubb - 22 April 2009 05:14 AM

I’ve found a fix that works, but USE WITH CAUTION AND BACK UP YOUR FILES!!!

Also, since I have changed core files, they will be overwritten with the next update so
hopefully it will have been fixed by then.

in app/code/core/Mage/Catalog/Block/Product/List.php

change

public function getAddToCartUrl($product, $additional = array())
{
if ($product->hasRequiredOptions()) {
$url = $product->getProductUrl();
$link = (strpos($url, ‘?’) !== false) ? ‘&’ : ‘?’;
return $url . $link . ‘options=cart’;
}
return parent::getAddToCartUrl($product, $additional);
}

to

public function getAddToCartUrl($product, $additional = array())
{
if ($product->hasOptions()) {
$url = $product->getProductUrl();
$link = (strpos($url, ‘?’) !== false) ? ‘&’ : ‘?’;
return $url . $link . ‘options=cart’;
}
return parent::getAddToCartUrl($product, $additional);
}

Please note, I won’t be held responsible if you mess your store up!!! smile

Hopefully that will work for everyone else too!

Hey! thanks for suggestion.But it didnt work exactly.Yes it solved ‘please specify product links’ warning but now I am getting ‘please specify product links’ warning.
I think i have to wait for 1.3.2

 
Magento Community Magento Community
Magento Community
Magento Community
 
advocat
Sr. Member
 
Avatar
Total Posts:  99
Joined:  2008-01-03
UA Kyiv
 

Resume:
For existing products with the problem - they have to resave products in admin
And to ensure that the problem does not recur in the future, add to the config.xml
in node in admin / fieldsets / catalog_product_dataflow

<required_options><system>1</system><ignore>1</ignore></required_options>
 
Magento Community Magento Community
Magento Community
Magento Community
 
sakwoya
Jr. Member
 
Total Posts:  12
Joined:  2008-01-20
UK
 

Hi - for the guys who are getting this with one template and not another

I hit this error with a 1.2.xx store and, after comparing the HTTP headers, I found that the form was not returning the full product - i.e

Content-Typeapplication/x-www-form-urlencoded
Content
-Length28
product
=100&related;_product=

instead of:

Content-Typeapplication/x-www-form-urlencoded
Content
-Length116
product
=100&related;_product=&super;_group&#x5B;96&#x5D;=0&super;_group&#x5B;97&#x5D;=4&super;_group&#x5B;98&#x5D;=0&super;_group&#x5B;99&#x5D;=0

Looking at the file YOUR TEMPLATE/catalog/product/view.phtml I found that the lines:

<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form" name="product_addtocart_form">
                            <
fieldset class="no-display">
              <
input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
              <
input type="hidden" name="related_product" id="related-products-field" value="" />
            </
fieldset>

Was too far down the page - moved this up to near the start of the html and now I get a result - YMMV

Graeme

 
Magento Community Magento Community
Magento Community
Magento Community
 
erwanpia
Member
 
Total Posts:  41
Joined:  2008-02-16
Locronan, Brittany
 

sakwoya, you made my day

I was wondering why this error was occuring and actually found out that in my case , the end of the form was to high ,so I moved DOWN the /form and now it works fine . I suspect the container1 with its options_container is required within the form too.

I’ve also found this thread because of the following message “Please specify the product required option(s)”, specific to pre 1.3 release (I’m on 1.2.1) -
in 1.3 the error is different but occurs too with the message ”Option validation failed to add product to cart” :

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
                
                  <?php 
echo $this->getChildChildHtml('container2'''truetrue?>
          
<div class="divider" style="clear:both;"></div><?php endif;?>
        
            
<fieldset class="no-display">
              <
input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
              <
input type="hidden" name="related_product" id="related-products-field" value="" />
            </
fieldset>

        
            
<?php echo $this->getChildHtml('other');?>

            <?php 
if ($_product->isSaleable() && $this->hasOptions()):?>
                <?php 
echo $this->getChildChildHtml('container1'''truetrue?>
            <?php 
endif;?>
 
<script type="text/javascript">
            var 
productAddToCartForm = new VarienForm('product_addtocart_form');
            
productAddToCartForm.submit = function(){
                    
if (this.validator.validate()) {
                            this
.form.submit();
                    
}
            }
.bind(productAddToCartForm);
    
</script>  </form>
 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 
envisionweb - 22 April 2009 06:36 AM

JHubb, thanks for this.  But I tested it, and doesnt seem to fix my issue, which I thought might have been tied into the same error. 

Here is what I do (see attached screenshots) and I am still getting the “One of options row has error.” Can you test what I am doing here on your cart to see if you get the same error? 

Sorry if I am repeating myself, but once again, here’s what happens:

When I am in the admin placing a custom order (usually from a phone order) I first create a new customer. After selecting that customer, I then select “add products”.  There is a custom field beneath each product title called “custom options” I click on that to open text area, fill in the text field with custom remarks, or products not yet in the cart, etc, then I click “update options and Qnty’s”. After doing so an error shows up on top left.  Everything I had written in the custom options field disappears and it does not get added to order.  I’m using 1.3 Thanks so much!

Hi @envisionweb, I’ve the same issue with you, Have you solve the problem yet ? thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

hi

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top