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

“Add to cart” not working for iphone theme
 
llenchikk
Jr. Member
 
Total Posts:  1
Joined:  2012-07-21
 

Hello!
I have installed iphone theme with CE 1.7 out of the box. I setup it for mobile devices. The problem is that “Add to cart” button not working (nothing happens after pressing), and cart is always empty. Do you have any ideas why?
Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
vinkes
Jr. Member
 
Total Posts:  1
Joined:  2011-05-04
 

Unfortunately i have the same problem, in the meanwhile llenchikk self or someone else have a clue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
muzafar
Member
 
Avatar
Total Posts:  60
Joined:  2009-03-28
Lahore
 

Hi,

anyone fixed this issue, i’m also facing this issue on my magento store CE 1.7

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
jtipton
Jr. Member
 
Total Posts:  2
Joined:  2012-01-13
 

solution:

go into app/design/frontend/base/default/template/catalog/product/view and copy the file addtocart.phtml

paste that file into your theme directory at this location:

app/design/frontend/package_name/iphone/template/catalog/product/view/

open the file to edit

find this line (should be line 36):

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

change this line to:
<button type="submit" title="<?php echo $buttonTitle ?>” class="button btn-cart” ><span><span><?php echo $buttonTitle ?></span></span></button>

the difference is 1. removing the onclick and 2.changing type="button" to type="submit"

 
Magento Community Magento Community
Magento Community
Magento Community
 
seromenho
Jr. Member
 
Total Posts:  3
Joined:  2012-12-02
 
jtipton - 09 November 2012 10:39 AM

solution:

go into app/design/frontend/base/default/template/catalog/product/view and copy the file addtocart.phtml

paste that file into your theme directory at this location:

app/design/frontend/package_name/iphone/template/catalog/product/view/

open the file to edit

find this line (should be line 36):

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

change this line to:
<button type="submit" title="<?php echo $buttonTitle ?>” class="button btn-cart” ><span><span><?php echo $buttonTitle ?></span></span></button>

the difference is 1. removing the onclick and 2.changing type="button" to type="submit”

It works.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Xiwazi
Jr. Member
 
Total Posts:  3
Joined:  2013-02-22
 

Thank you very much it works!

But what is causing the error?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kingsin
Jr. Member
 
Total Posts:  1
Joined:  2012-07-06
 
jtipton - 09 November 2012 10:39 AM

solution:

go into app/design/frontend/base/default/template/catalog/product/view and copy the file addtocart.phtml

paste that file into your theme directory at this location:

app/design/frontend/package_name/iphone/template/catalog/product/view/

open the file to edit

find this line (should be line 36):

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

change this line to:
<button type="submit" title="<?php echo $buttonTitle ?>” class="button btn-cart” ><span><span><?php echo $buttonTitle ?></span></span></button>

the difference is 1. removing the onclick and 2.changing type="button" to type="submit”

Yes, it works. but if it is pay with the paypal express, seems the paypal still can’t work. Then how to fix it? thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
solutions5ms
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2013-05-17
 
jtipton - 09 November 2012 10:39 AM

solution:

go into app/design/frontend/base/default/template/catalog/product/view and copy the file addtocart.phtml

paste that file into your theme directory at this location:

app/design/frontend/package_name/iphone/template/catalog/product/view/

open the file to edit

find this line (should be line 36):

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

change this line to:
<button type="submit" title="<?php echo $buttonTitle ?>” class="button btn-cart” ><span><span><?php echo $buttonTitle ?></span></span></button>

the difference is 1. removing the onclick and 2.changing type="button" to type="submit”

We only found the problem with a few select handsets including Galaxy Note, S3 and a new Nokia but did the above and works fine!

Thanks to the poster!

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