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
 
ManafMoh
Jr. Member
 
Total Posts:  1
Joined:  2009-04-28
 

Anyone please help asap. client is waiting ......

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikewhitby
Member
 
Total Posts:  38
Joined:  2008-09-08
 
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!

I can confirm that this works. We have these types of products in our store:
* Simple
* Simple with custom options
* Configurable

The change allows you to add simple items with no custom options, or non-required custom options straight to the basket. I have also tested that you are prompted for options for simple products with required custom options and configurable products with required options. I haven’t tested configurable products with non-required options though.

Anyhow, everything I tested worked fine, and I don’t think the change has any effect on any other page than the list page, and I imagine if you tried to add a product straight to the cart which had required options then I assume magento would throw an error anyway, but being as this doesn’t affect me I have not tested this.

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

I have yet to figure this problem out.  I need to do something fast because it is making much work for 3 of my employees. I will update once I figure it out! Thanks and sorry for late reply.

 
Magento Community Magento Community
Magento Community
Magento Community
 
onepack
Sr. Member
 
Total Posts:  98
Joined:  2008-06-02
Amsterdam
 

Hi Envisionweb,

I have the exact same issue as you. Actually I was trying to modify the admin order creation when I ran into this. I went to check in some other stores I built and they all have it (1.3.1)
I will try to fix this and keep you updated if I find a solution.
Greetings,

OnePack

 
Magento Community Magento Community
Magento Community
Magento Community
 
onepack
Sr. Member
 
Total Posts:  98
Joined:  2008-06-02
Amsterdam
 

This is what I found and seems to work:

http://www.magentocommerce.com/boards/index.php/viewthread/21742/#t77013

The thing is that it’s not logic at all and that’s why a lot of people think it’s an bug.
Hope it saves time finding a solution

Greeting,

OnePack

 
Magento Community Magento Community
Magento Community
Magento Community
 
renz0
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2008-09-18
 

does anyone know if 1.3.1.1 fixes this issue?  I did not see it in the release notes.

 
Magento Community Magento Community
Magento Community
Magento Community
 
onepack
Sr. Member
 
Total Posts:  98
Joined:  2008-06-02
Amsterdam
 

@renzO

When you read my two replies you will read that it works as supposed.

That it is not very usefull in this way is something I agree.

I’m working on a module to have extra functionality in the order creation process but I’m not sure when to finish it coz I’m really busy

 
Magento Community Magento Community
Magento Community
Magento Community
 
BjarneBK
Member
 
Total Posts:  61
Joined:  2009-01-04
 
onePack - 20 May 2009 06:26 AM

@renzO

When you read my two replies you will read that it works as supposed.

That it is not very usefull in this way is something I agree.

I’m working on a module to have extra functionality in the order creation process but I’m not sure when to finish it coz I’m really busy

renz0 was not referring to your post, i think, but rather the recent update to version 1.3.1.1.

I am also looking froward to hearing if the new update fixes this problem!

 
Magento Community Magento Community
Magento Community
Magento Community
 
onepack
Sr. Member
 
Total Posts:  98
Joined:  2008-06-02
Amsterdam
 

In my post I try to help and simply point out it is not a bug grin Look at the link I provide in the post and read.

In That thread they explain the field needs to be filled in with a syntax like this:

Add engraving to this order.:Yes. Please add engraving to my order.

I just want to save you guys from waiting for a fix.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BjarneBK
Member
 
Total Posts:  61
Joined:  2009-01-04
 
onePack - 20 May 2009 07:15 AM

In my post I try to help and simply point out it is not a bug grin Look at the link I provide in the post and read.

In That thread they explain the field needs to be filled in with a syntax like this:

Add engraving to this order.:Yes. Please add engraving to my order.

I just want to save you guys from waiting for a fix.

Hmmm… that sounds like a bug to me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
elitriona
Sr. Member
 
Total Posts:  106
Joined:  2008-10-23
 

It is not fixed in the 1.3.1.1 release.

 
Magento Community Magento Community
Magento Community
Magento Community
 
renz0
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2008-09-18
 
meph137 - 11 May 2009 12:11 AM

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!

I can confirm that this works. We have these types of products in our store:
* Simple
* Simple with custom options
* Configurable

The change allows you to add simple items with no custom options, or non-required custom options straight to the basket. I have also tested that you are prompted for options for simple products with required custom options and configurable products with required options. I haven’t tested configurable products with non-required options though.

Anyhow, everything I tested worked fine, and I don’t think the change has any effect on any other page than the list page, and I imagine if you tried to add a product straight to the cart which had required options then I assume magento would throw an error anyway, but being as this doesn’t affect me I have not tested this.

The above solution works for me

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

I believe some of us are talking about TWO (2) separate issues here.  I still have the FOLLOWING problem, please read carefully and anyone here can try and duplicate the problem but it is in BACK END (Admin) where the problem lies, and type of product is irrelevant. My problem is not with customers placing orders in cart. 

My issue specifically:

• I often take phone orders, probably 70% of my business because I sell complicated products with complicated accessories and options etc.

• Many of the items a customer needs may be uncommon and not often sold and not previously listed or added in our catalog. However I can supply it to them.

• I previously added several BLANK/Generic permanent products called custom product 1, custom product 2, etc. with $0 pricing and only description says “custom product 1” etc. and they can fill out the details in the custom options box, as I did before These blank product are accessible in admin catalog only BTW.

• This way my salesmen and order processors can add custom items quickly and easily, on the fly, just by creating new order in back end, selecting a “custom product” from the catalog and writing out description in the custom options field and then type in the price.

• After adding “custom product” there is a link below the name of that says “custom options”.  When you click it it opens up a text box/field. I then type in my custom product description, model numbers etc, doesn’t matter what it is, anything.

• Then I type in a price. Click “update Qtys/Price” and that’s when I get the error and the field goes blank and all my descriptions disappear and no product is added.  Prior to this last update I COULD perform this task easily and did it often. 

So now when any of my salesman sell anything NOT already in the cart, they have to call me, I have to drop what I am doing, then log into Admin and go through the longer process of adding a product in the “manage products” section.  This is 3-4 times a day.  If I am not available the order gets held up!  Salesmen and order processors have limited access to Admin and can only place orders and not add products in permanent catalog.  Furthermore I dont need to add permanent products I may never sell again.

So if anyone can help me with THIS particular problem I will buy them dinner for 2, I don’t care what city you live in.

I hope I didn’t complicate this and everyone gets what I am saying. Please feel free to look at the attached screen shots.  Thanks and again I’m sorry if I am being redundant.

Image Attachments
Picture 1.pngPicture 2.pngPicture 3.pngPicture 4.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
BjarneBK
Member
 
Total Posts:  61
Joined:  2009-01-04
 
renz0 - 20 May 2009 02:58 PM

meph137 - 11 May 2009 12:11 AM
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!

I can confirm that this works. We have these types of products in our store:
* Simple
* Simple with custom options
* Configurable

The change allows you to add simple items with no custom options, or non-required custom options straight to the basket. I have also tested that you are prompted for options for simple products with required custom options and configurable products with required options. I haven’t tested configurable products with non-required options though.

Anyhow, everything I tested worked fine, and I don’t think the change has any effect on any other page than the list page, and I imagine if you tried to add a product straight to the cart which had required options then I assume magento would throw an error anyway, but being as this doesn’t affect me I have not tested this.

The above solution works for me

It doesn’t work for me! :(

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

It looks like this is due to be released with 1.3.2 so a bit of patience is needed!

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