Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got a problem using Magento about add to cart with custom options.

I filled up all required fields and when I hit "Add To Cart" button, It said

Please specify the product required option(s).

When I go to other products without custom options like Size or Color field. It works fine.

How can I fix this problem?

this is the link:


share|improve this question
Options are not submitted (what is not really the case if you ask me), id is wrong (5), value is wrong (7), or there are more options on the products which might not be visible in frontend? – Fabian Blechschmidt Mar 11 '14 at 7:27
up vote 12 down vote accepted

I don't know exactly how you can solve this but I can explain the problem, maybe it helps.

I see that the product page is on https but when you click on the add to cart button the form is submitted to,,/product/172/. Notice the http.

Then that pages does a 301 redirect to https://{same url} and what you send by post (the ring size) is lost.

If I use firebug and change the form url to https I can add the product to the cart without any problems.

You can try to change the submit url of the form Mage_Catalog_Block_Product_Abstract::getSubmitUrl or you can set the unsecure base url of your website to https://... avoiding 301 redirects from htaccess.

These are just my suggestions. I have no idea if they will work.

share|improve this answer
It works. Thank you so much Marius. I go to app/code/core/Mage/Catalog/Block/Product/View.php And I changed the getAddToCartUrl function from: return $this->helper('checkout/cart')->getAddUrl($product, $additional); to: $new_url = str_replace('http://','https://',$this->helper('checkout/cart')->getAddUrl($prod‌​uct, $additional)); return $new_url; – Enalds Mar 11 '14 at 8:42
@Enalds. I don't know if this is the cleanest solution but..."whatever floats your boat". – Marius Mar 11 '14 at 8:49
@Enalds change the unsecure url to https, your solution will bring you problems when you update! – Fabian Blechschmidt Mar 11 '14 at 9:33
@Fabian Blechschmidt - How can I change the unsecure url to https? I'm newbie to Magento :) – Enalds Mar 12 '14 at 5:44
I also add array('_secure' => true) to the <form action=... – Enalds Mar 12 '14 at 6:14

Check your ADD TO CART button code.

It should be:

<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)">
    <span><span><?php echo $buttonTitle ?></span></span>


app/design/frontend/default/<your theme name>/template/catalog/product/view and remove or rename addtocart.phtml.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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