Jump to content

[SOLVED] googlecheckout quantity error


richard330
 Share

Recommended Posts

Hi I am having an issue with googlecheckout and the quantity it is trying to process

when I place an order in my cart all looks fine, when I choose paypal everything is ok, but when I go to googlecheckout the quantity is wrong.

From what I can work out, googlecheckout is using the quantity of how many attributes a product has..for eg. I sell a drill bit that is available in 12 different sizes, I chose one in the cart, but when you get to google checkout you have a quantity of 12 to pay for

HELP!!!

Richard

SORRY I SHOULD HAVE PUT THIS IN third party modules!!

Share this post


Link to post
Share on other sites

  • 3 weeks later...

We are getting the same type of error when we use paypal checkout everything is good when I use google it use quantities in stock instead of the number selected.
this is not a good thing.
www.mechanictoolsonline.com/index.php

Share this post


Link to post
Share on other sites

Ok I think I fixed the trouble in gcheckout.php I changed

$googleCart->AddItem(new GoogleItem(utf8_decode($product['name'].($product['attributes']?' - '.$product['attributes']:'')), utf8_decode($product['description_short']), intval($product['quantity']), number_format(Tools::convertPrice($product['price_wt'], $currency), 2, '.', '')));



to

$googleCart->AddItem(new GoogleItem(utf8_decode($product['name'].($product['attributes']?' - '.$product['attributes']:'')), utf8_decode($product['description_short']), intval($product['cart_quantity']), number_format(Tools::convertPrice($product['price_wt'], $currency), 2, '.', '')));



When I went to classes I found the 'cart_quantity' instead of quantity this seems to fix the issue I was having so if any of the moderators will look at it and let me know for sure it would be appreciated

this was in the getproduct function

Rylersbud
www.mechanictoolsonline.com/indexphp going live soon

Share this post


Link to post
Share on other sites

  • 2 weeks later...
Ok I think I fixed the trouble in gcheckout.php I changed

$googleCart->AddItem(new GoogleItem(utf8_decode($product['name'].($product['attributes']?' - '.$product['attributes']:'')), utf8_decode($product['description_short']), intval($product['quantity']), number_format(Tools::convertPrice($product['price_wt'], $currency), 2, '.', '')));



to

$googleCart->AddItem(new GoogleItem(utf8_decode($product['name'].($product['attributes']?' - '.$product['attributes']:'')), utf8_decode($product['description_short']), intval($product['cart_quantity']), number_format(Tools::convertPrice($product['price_wt'], $currency), 2, '.', '')));



When I went to classes I found the 'cart_quantity' instead of quantity this seems to fix the issue I was having so if any of the moderators will look at it and let me know for sure it would be appreciated

this was in the getproduct function

Rylersbud
www.mechanictoolsonline.com/indexphp going live soon




I can verify that this solution works. I was having the same issue. Actually, with only "quantity" in the code, I'm really surprised that more folks have not had this issue. Can we get this included in the next update?

Thanks for the solution!

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More