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

Can’t update shopping cart quantity
 
tm1579
Jr. Member
 
Total Posts:  5
Joined:  2013-10-04
 

After upgrade from 1.8.0 to 1.8.1 , it has problem with update quantity of shopping cart in community version 1.8.1. For example just change quantity from 1 to 2 and hit update, the quantity did not change.
Any one see this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
realmind
Jr. Member
 
Total Posts:  1
Joined:  2011-08-09
Chicago, IL
 

I’m experiencing the same exact issue. Anyone have a fix for this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
emile_rdam
Sr. Member
 
Total Posts:  89
Joined:  2010-05-20
 

Just tried it and unfortunately the same problem over here.

Just don’t understand why they call this a stable version with this kind of errors.

Any solutions out there yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
asantos_pt
Jr. Member
 
Total Posts:  7
Joined:  2012-08-31
 

Same problem :(

Edit:

Found the possible solution! After digging a bit on the code I have found, at least, a workaround.

It seems this has the same problem as the post “Customers can not Login after upgrade to 1.81”, there isn’t a form key on the form of the checkout cart page thus it doesn’t validate correctly (ofc this should have sent something to the logs of throw an error message so one would know why this don’t work!). Why this happens on 1.8.1 I don’t know, but if you add:

<input type="hidden" name="form_key" value="<? echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
on your /app/design/frontend/<theme>/default/template/checkout/cart.phtml file, right after the ‘<form action=...’ around line 50 the qty updates seem to work.

Hope it helps you guys, however I think that this problem should probably be fixed in a more global way because there might be more forms that are affected by the lack of validation. If a more skilled programmer can look into this it would be better.

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
mehode
Jr. Member
 
Total Posts:  3
Joined:  2009-11-15
 

I had the same problem.

Check your file app/design/frontend/{{YOUR PACKAGE}}/default/template/checkout/cart.phtml
Compare this with the app/design/frontend/base/default/template/checkout/cart.phtml file.

I just had a minor design change so I just copied the file from base and reapplied the design modification I originally had.

 
Magento Community Magento Community
Magento Community
Magento Community
 
asantos_pt
Jr. Member
 
Total Posts:  7
Joined:  2012-08-31
 
asantos_pt - 12 December 2013 05:38 PM

Same problem :(

Edit:

Found the possible solution! After digging a bit on the code I have found, at least, a workaround.

It seems this has the same problem as the post “Customers can not Login after upgrade to 1.81”, there isn’t a form key on the form of the checkout cart page thus it doesn’t validate correctly (ofc this should have sent something to the logs of throw an error message so one would know why this don’t work!). Why this happens on 1.8.1 I don’t know, but if you add:

<input type="hidden" name="form_key" value="<? echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
on your /app/design/frontend/<theme>/default/template/checkout/cart.phtml file, right after the ‘<form action=...’ around line 50 the qty updates seem to work.

Hope it helps you guys, however I think that this problem should probably be fixed in a more global way because there might be more forms that are affected by the lack of validation. If a more skilled programmer can look into this it would be better.

Cheers

You can also use:

<?php echo $this->getBlockHtml('formkey'); ?>
instead of the other code I posted above. It gives similar html code, but this is the same code that is used throughout the base and default templates.
 
Magento Community Magento Community
Magento Community
Magento Community
 
tm1579
Jr. Member
 
Total Posts:  5
Joined:  2013-10-04
 

Thanks so much this solution works :  <?php echo $this->getBlockHtml('formkey'); ?>
for both customer can not login and shopping cart can’t update.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pradeepsanku
Jr. Member
 
Total Posts:  15
Joined:  2013-05-22
 

<?php echo $this->getBlockHtml('formkey'); ?>
This worked for me.
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
sammbiz
Jr. Member
 
Total Posts:  16
Joined:  2013-12-15
 

Some quick debugging:

Do you have any modifications to any of the core code?
Have you changed the PHTML for the product page? The cart page?
Are any errors logged in the exception or system logs?
Can you modify the quantities directly in the database?
What version of Magento are you using?

Hope this will help you in resolving the issue.

Regards,
Sanjeev


Website URL

 
Magento Community Magento Community
Magento Community
Magento Community
 
oustin
Jr. Member
 
Total Posts:  3
Joined:  2012-04-24
 

Many thanks
it works!!! when I added
<?php echo $this->getBlockHtml('formkey'); ?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
jguiss
Member
 
Avatar
Total Posts:  75
Joined:  2007-11-30
France / Avignon
 

Perfect ! Thanks for this solution smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
GoMageTeam
Guru
 
Avatar
Total Posts:  356
Joined:  2013-01-13
Warsaw, Poland
 

Hello,

We advise you to use GoMage ProCart extension. You will easily add products to cart, increase their quantity and the extension will update the cart automatically. Moreover, you will see the updated total.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Leo Leung
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2012-02-08
 

The form_key problem is very annoying which happens at many areas in magento.

To summarize, most of the form submission in magneto requires form_key now and there is a condition checking in the form post destination controller, if it cannot see the form_key, then the function returns and dont execute any more.

e.g. in the checkout review part, add to cart, checkout register form

Some people said they were not affected because they didnt overwrite those template, so that after upgraded, they could use the new version of template.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rbr8
Jr. Member
 
Total Posts:  1
Joined:  2014-01-14
 

Use the “app/design/frontend/base/default/template/checkout/cart.phtml” file content. Change your theme “cart.phtml” file content. It’s worked me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
konceptdesign
Jr. Member
 
Total Posts:  4
Joined:  2014-03-03
 

Inserting
<?php echo $this->getBlockHtml('formkey'); ?>
immediately after
<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>” method="post">
and before
<fieldset>
works perfectly for me with my custom theme.

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
vizfx
Jr. Member
 
Total Posts:  9
Joined:  2014-03-01
 

Same problem for me.
The solution with adding the code

<?php echo $this->getBlockHtml('formkey'); ?>
did not work for me.
This line of code is present in the default theme.
I’m using a modified (CSS) Modern theme and Xogenics_CleanCarts extension.
Any ideas?
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top