-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
TripleMoons
And I get this from Sandbox:
<error serial-number="4d14d924-6527-47fe-9bba-197dd6f20f8a">
<error-message>No seller found with id 233870035457987</error-message>
</error>
Are you certain you have created a "sandbox" account, which has a different Merchant ID and Merchant Key than your "live" or "production" Google Checkout account? I made the same initial mistake (indicated in previous post on this thread). ;-)
Log into your sandbox account at https://sandbox.google.com/ to ensure everything is correctly configured for Google Checkout sandbox settings and to ensure you have copied the correct ID and key for your sandbox account.
Then double check your GCO payment mod settings within Zen Cart admin:
(Config > Modules > Payment > GoogleCheckout)
to ensure correct sandbox configuration settings for:
Merchant ID: (sandbox ID)
Merchant Key: (sandbox key)
Select Mode of Operation: https://sandbox.google.com/
--
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Ok, my Sandbox is working. I thought the thing was setup, but I had to go to sandbox.google.com/sell/ for the complete setup. [Note: Google's website for this is confusing]
How do I process these tests if I get this:
Quote:
Oops!
Buying from yourself is not allowed in the system, please use another account to purchase the shopping cart.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
TripleMoons
I just noticed something else...The API callback thing required an https:// but when I put that in front of my URL, it bounces to the Admin login for a hosting server. Why is it doing that, and would that affect the items not showing up in the Zen Admin?
Double check Google sandbox account config.
Log into sandbox account, click the "Settings" tab, then click "Integration" in left column menu.
API callback URL: (adjust accordingly)
https://www.your_domain.com/shop_dir...nsehandler.php
Callback method: XML
For sandbox testing you can change above from https to http, if you do not yet have SSL properly set-up on your webhost account/webserver.
Woody
-
Re: Google Checkout module for Zen Cart (beta)
So you do have to have SSL to use Google?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
TripleMoons
Ok, my Sandbox is working. I thought the thing was setup, but I had to go to sandbox.google.com/sell/ for the complete setup. [Note: Google's website for this is confusing]
How do I process these tests if I get this:
Oops!
Buying from yourself is not allowed in the system, please use another account to purchase the shopping cart.
Stef, I have to say again that almost every question you have asked recently is very well documented in the readme and installation document files for version 1.05 (and most questions are answered is in previous version 1.04 docs).
You have to set-up a separate "buyers" account. You cannot buy from yourself using your "sellers" (merchant) account.
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
TripleMoons
So you do have to have SSL to use Google?
Recommends:
1. Read the mod documentation.
2. Search this thread on keyword "SSL".
3. Read the documentation on Google Checkout Sellers site.
4. If still not certain go back to step 1 above.
Good luck,
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Yeah, well I don't have 1.05 readme and it isn't at this location:
http://google-checkout-zencart.googl...ooglecheckout/
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
TripleMoons
From that page, click the ".." to traverse back a level and you will find the README and INSTALLATION files.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
BBG
From that page, click the ".." to traverse back a level and you will find the README and INSTALLATION files.
Thank you. :laugh:
-
Re: Google Checkout module for Zen Cart (beta)
This is wonderful...
I now have this error in my Admin area of Zen Cart:
Quote:
Fatal error: Call to undefined function: zen_cfg_select_shipping() in /home/www/keystoneexoticssupply.com/shoponline/admin/modules.php(283) : eval()'d code on line 1
All's I did was hit uninstall and then install & it came up. I have never TOUCHED this file.
-
Re: Google Checkout module for Zen Cart (beta)
Hey -
This is working great for me - two things so far don't seem to be working:
1. Status updates fine from Google Checkout > Zen; however, when I attempt to change the Status from Zen (ie. change to "backordered", etc) - I get an error:
Fatal error: Call to undefined function google_checkout_state_change() in /home/httpd/vhosts/getskinsnow.com/httpdocs/admin/orders.php on line 129
2. Google Checkout is properly writing orders to my database, however I notice that the products are not passed (cart contents). So, although the order is present, the items purchased are not .. I have to go to Google Checkout to see what they bought - is this normal?
3. Any chance that ultimately, the USPS Shipping Charges API could be implmeneted - I don't use table or "per item" shipping - I use USPS?
Thanks!
FRED
-
Re: Google Checkout module for Zen Cart (beta)
Lets get this thing working:
Google announced it is extending its promotion for Google Checkout for another year. The checkout service, used by online merchants to process payments from customers, launched in June with lower fees than PayPal's payment service, as well as an incentive for those merchants using Google AdWords. In early November, Google announced that from November 8 through December 31, 2006,
Google would process all Checkout transactions for free:jawdrop: , and today, it extended the promotion through December 31, 2007.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dharma
Lets get this thing working:
Google announced it is extending its promotion for Google Checkout for another year. The checkout service, used by online merchants to process payments from customers, launched in June with lower fees than PayPal's payment service, as well as an incentive for those merchants using Google AdWords. In early November, Google announced that from November 8 through December 31, 2006,
Google would process all Checkout transactions for free:jawdrop: , and today, it extended the promotion through December 31, 2007.
Theyactually extended it thru December 31, 2007 some time ago, but yes it is great news and definitely a reason to get this thing going.... However there is a $5,000/month limit (unless I misunderstood) which I think for most stores is going to put a damper on things, we do $5k several times over...
-
Re: Google Checkout module for Zen Cart (beta)
ok everything was working fine, but now when i try to checkout with google it gives me this error.
<error serial-number="c21664a6-1d98-47ac-802c-e91c0e799d81">
<error-message>No seller found with id 121418258075668</error-message>
</error>
is this a problem on google's side or mine?
you can check it out at www.airinfantry.com/catalog
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
blackinches
...is this a problem on google's side or mine?
Yours likely. Read posts from today for potential solution(s).
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
blackinches
ok everything was working fine, but now when i try to checkout with google it gives me this error.
<error serial-number="c21664a6-1d98-47ac-802c-e91c0e799d81">
<error-message>No seller found with id 121418258075668</error-message>
</error>
is this a problem on google's side or mine?
you can check it out at
www.airinfantry.com/catalog
If fixed that by switching my User / Password to the Sandbox account. If you're useing the Live version, it's a different User / Password.
-
Re: Google Checkout module for Zen Cart (beta)
Ok...I'm done with this...
Could someone email me when their is a working version of this approved & available (as a ZIP file)?
-
Re: Google Checkout module for Zen Cart (beta)
i'm using a sandbox account, and it used to work fine, but it just recently started to give me this error.
-
Re: Google Checkout module for Zen Cart (beta)
i get the following error in error log file:
Quote:
Wed Dec 20 0:12:15 EST 2006:- Line 119: headers['Authorization'] is NULL.
what did i miss ?
-
Re: Google Checkout module for Zen Cart (beta)
i was successfully able to install and even process a transaction using google checkout
recently, i logged into my checkout.google.com account and saw this:
sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: basic constraints check failed: pathLenConstraint violated - this cert must be the last cert in the certification path
as a problem with responsehandler.php
any suggestions?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
Alik
i get the following error in error log file:
Wed Dec 20 0:12:15 EST 2006:- Line 119: headers['Authorization'] is NULL.
what did i miss ?
Alik -
Start at page 34 of this topic. There are 2 approaches for this. One is to comment out a couple of sections in your current responsehandler.php. The other is to get the latest version and replace all the files in your GoogleCheckout folder.
Details are in the posts. The choice is yours.
-
Re: Google Checkout module for Zen Cart (beta)
I added the google checkout mod today and when I click the button on the shopping cart page I get a Google screen that says this:
Oops!
We were unable to process your request.
So besides setting up the google stuff on the admin is there something else I missed?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
chain_man
Alik -
Start at page 34 of this topic. There are 2 approaches for this. One is to comment out a couple of sections in your current responsehandler.php. The other is to get the latest version and replace all the files in your GoogleCheckout folder.
Details are in the posts. The choice is yours.
Thanks for the help!
I replaced all files with new (1.05) but still no update on admin side, though the response_message file gets the info ...I'll do more research and see if i can get it to work.
Thanks
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
lhhgbh
I added the google checkout mod today and when I click the button on the shopping cart page I get a Google screen that says this:
Oops!
We were unable to process your request.
So besides setting up the google stuff on the admin is there something else I missed?
Have you set up your accounts with Google?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
chain_man
Have you set up your accounts with Google?
yeah i have both sandbox.checkout and checkout accounts - they all work fine, just not getting updated in the admin.
-
Re: Google Checkout module for Zen Cart (beta)
Originally Posted by chain_man
Have you set up your accounts with Google?
Quote:
Originally Posted by
Alik
yeah i have both sandbox.checkout and checkout accounts - they all work fine, just not getting updated in the admin.
Sorry Alik,
That question was mainly for lhhgbh.
About your issues ... I guess that you're no longer getting the 'AUTHORIZE' message that you were getting previously. Are you getting any other messages in the error log? Do you have the 2 new files from 1.05 in your GoogleCheckout folder?
-
Re: Google Checkout module for Zen Cart (beta)
Yeah my account is setup and has been since August..
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
lhhgbh
Yeah my account is setup and has been since August..
lhhgbh -
What are your configuration settings? Sandbox or production?
What version of GoogleCheckout did you install? 1.04 or 1.05?
Do you have anything in the response_error.log file?
Did you get the Google message right away or when you entered payment information?
I've gotten an OOPS message when I tried to buy something from myself.
-
Re: Google Checkout module for Zen Cart (beta)
Im using 1.04, didnt know there was a 1.05...
The only thing I see in the error log is this:
Wed Dec 20 17:02:46 EST 2006:- Line 119: headers['Authorization'] is NULL.
I get the message as soon as I click on the Google Checkout box located on the shopping cart page..
And I have tried to checkout using a different pc and login..
-
Can't install
Ok, I followed the instructions and I know I'm doing something wrong that must be very basic as I'm pretty new to zen cart too. I have PHP 5 with libcurl, have zencart 1.3.6.
I followed OPTION A since I have no other modules installed, the only thing different is I'm using a template I downloaded from here.I copied all the files to the locations specified. However, when I go to my admin, under modules, payment I don't see google checkout anywhere. I double checked and all the files copied fine.
I think I'm doing something wrong when it comes to the
12.YOUR_ZENCART_FOLDER/includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_payment_default.php
13.YOUR_ZENCART_FOLDER/includes/templates/YOUR_TEMPLATE/templates/tpl_login_default.php 14.YOUR_ZENCART_FOLDER/includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart_default.php
My folder structure is: /public_html/includes/templates
under here I have my custom template simple_zen. So I installed to /public_html/templates/simple_zen.
When I looked and saw GC wasn't in my modules, I checked again and looked at public_html/includes/templates/template_default and that's when I saw those files exist there. So I figured I was suppose to copy over there instead, so I backed up the existing files, and copied over the new ones....and I'm still not getting it.
I'm I doing something wrong with the templates or is there something else I'm missing? Any help would be appreciated for this newb, thanks.
-
Re: Can't install
nevermind, figured it out. one of the files didn't transfer completely for some reason. got a new question though=)
i'm testing this out in the sandbox, i setup table rates for different zones. usa shipping works great, however when i try to choose any other country in the dropdown box, it comes up with a message highlighted in yellow that says i don't ship to that country?
i did add all the countries in the shipping module in zen cart. i don't see where to specify valid countries with google checkout settings. where am i suppose to configure this or what step am i missing? thx.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
lhhgbh
Im using 1.04, didnt know there was a 1.05...
The only thing I see in the error log is this:
Wed Dec 20 17:02:46 EST 2006:- Line 119: headers['Authorization'] is NULL.
I get the message as soon as I click on the Google Checkout box located on the shopping cart page..
And I have tried to checkout using a different pc and login..
Start at page 34 of this topic. There are 2 approaches for this. One is to comment out a couple of sections in your current responsehandler.php. The other is to get the latest version and replace all the files in your GoogleCheckout folder.
Details are in the posts. The choice is yours.
-
Re: Can't install
Quote:
Originally Posted by
eva01
I'm I doing something wrong with the templates or is there something else I'm missing? Any help would be appreciated for this newb,
SHORT ANSWER:
The mod does not consist of only template files, but also language and module files and other files. Not all files go into your templates directory.
LONG ANSWER:
The path to the shop "root" directory would usually be something like:
/public_html/your_shop_name
The path to the 'includes' directory then would be:
/public_html/your_shop_name/includes
Then "custom" template files 'typically' go into:
/public_html/your_shop_name/includes/templates/custom_template_name
Custom module files 'usually' go in:
/public_html/your_shop_name/includes/modules/custom_template_name
But payment module files 'usually' go into:
/public_html/your_shop_name/includes/modules/payment
And then you have 'admin' files which go into:
/public_html/your_shop_name/admin
(or whatever you named your admin direcotry... it is recommended you change the admin directory name... see Zen Cart security docs for more info...).
The above are just general examples. Which directories where files should go varies for different mods. Before unzipping a downloaded mod zip file, be sure your unzip software is configured to retain the directory structure for unzipped files. Then after unzipping look at the resulting directory structure of the unzipped mod. You should be able to identify which directories to upload the files to your server. Be sure to read the mod readme docs for specific info. (The Google Checkout mod for Zen Cart currently comes with two "readme" docs: one titled 'readme' and the other 'installation'.). Then if you still have questions post to the support forum for the mod.
So before proceeding any further I recommend that you first read up on the Zen Cart file structure, custom templates and overrides. The FAQ and wiki covers these areas well.
Click on tutorials/FAQ at the very top menu bar in the support forum.
Recommend reading the docs in the following FAQ categories (among others):
1. All Time Favorites - FAQs
2. Template Customization/ Building Overrides
3. What Every New Zen Cart User Needs to Know
Focus on reading documents regarding custom templates, template overrides and the override system.
Lots of good info in the wiki also. http://www.zen-cart.com/wiki/
Good luck,
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Thanks Woodymon, I did a lot more reading about templates to figure it out last night. Turns out that wasn't the problem and I figured it out. I replied to my initial post right away noting that I got it working (couldn't figure out how to edit my original post, i'll get to that one later).
However I'm running into a new problem and I'm wondering if it's a limitation of this add on, gc, or a combination. I searched and it looks like at least one other person is having a similar issue? It's about shipping, basically:
i'm testing this out in the sandbox, i setup table rates for different zones. usa shipping works great, however when i try to choose any other country in the dropdown box, it comes up with a message highlighted in yellow that says i don't ship to that country?
i did add all the countries in the shipping module in zen cart. i don't see where to specify valid countries with google checkout settings. where am i suppose to configure this or what step am i missing? thx.
-
Re: Google Checkout module for Zen Cart (beta)
I suspect many newbies will be joining the ecommerce bandwagon soon after the news fully spreads that Google Checkout will not be charging transaction fees until 2008, etc. Article in yesterdays New York Times - http://www.nytimes.com/2006/12/20/te...0checkout.html
Hopefully this will be good for Zen Cart and help further accelerate development of the GCO for ZC mod!
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
eva01
i'm testing this out in the sandbox, i setup table rates for different zones. usa shipping works great, however when i try to choose any other country in the dropdown box, it comes up with a message highlighted in yellow that says i don't ship to that country?
I did add all the countries in the shipping module in zen cart. i don't see where to specify valid countries with google checkout settings. where am i suppose to configure this or what step am i missing? thx.
There are many outstanding issues/questions regards to shipping issues with the current GCO for ZC mod which have been posted to this thread but which the the new lead devs for the mod project have yet to respond to. Apparently the latest v1.05 version was suppose to rectify many shipping issues (specifically regards to "Merchant Calculated Shipping/Real Time Shipping", for example USPS, FedEx, etc).
But 1.05 has been problematic for those who have tried installing the full package and I have reverted to running a "combo" install, utilzing a mix of files from both the 1.04 and 1.05 version packages.
Myself I'm having issues with 1.05 in that it still does not correctly support simple per item zone based shipping (I want two zones, one zone = USA states only, and another zone international, all other countries). This works fine in Zen Cart 1.36 with PayPAl and authorizenet but I've yet to make this work with GCO. I have posted several times to mod devs, hoping for some guidance, but have yet to receive response. I'm now thinking that mod development and "official" mod support has been suspended for the holidays. I plan to contact Google directly to hopefully acquire more wisdom on this topic.
BTW someone previously posted some possible workarounds to enable the desired shipping policy I just described, but I was not able to make it work. So I am still experimenting.
Wish I could be of more assistance.
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
Woodymon
There are many outstanding issues/questions regards to shipping issues with the current GCO for ZC mod which have been posted to this thread but which the the new lead devs for the mod project have yet to respond to. Apparently the latest v1.05 version was suppose to rectify many shipping issues (specifically regards to "Merchant Calculated Shipping/Real Time Shipping", for example USPS, FedEx, etc).
But 1.05 has been problematic for those who have tried installing the full package and I have reverted to running a "combo" install, utilzing a mix of files from both the 1.04 and 1.05 version packages.
Myself I'm having issues with 1.05 in that it still does not correctly support simple per item zone based shipping (I want two zones, one zone = USA states only, and another zone international, all other countries). This works fine in Zen Cart 1.36 with PayPAl and authorizenet but I've yet to make this work with GCO. I have posted several times to mod devs, hoping for some guidance, but have yet to receive response. I'm now thinking that mod development and "official" mod support has been suspended for the holidays. I plan to contact Google directly to hopefully acquire more wisdom on this topic.
BTW someone previously posted some possible workarounds to enable the desired shipping policy I just described, but I was not able to make it work. So I am still experimenting.
Wish I could be of more assistance.
Woody
Thanks Woody, I'll wait until there's an update. I really need to have 3 zones setup and working. I haven't spent a whole lot of time learning ZC so I may try OSCommerce instead. I believe they have more of a functioning GC module at this time, but I'm sure they have their own issues.
-
Re: Google Checkout module for Zen Cart (beta)
Ok, I've been following this thread for some time now so I figured I would post up my experiences since I noticed something today trying to track down what the problem is here...
I'm using the 1.0.4 plugin version of GCO (tried the 1.0.5 but it wouldn't function as well as 1.0.4... no shipping, not adding in admin panel, etc...).
After commenting out the code Krypton posted about I now have the following happening:
-User can add things to cart, then check out via google.
-Flat rate table shipping charges are functioning correctly (I however do not like this shipping choice. We pull in rates from fedex and ups and use shipping rates based on that for our standard authorizenet checkout.. I hope GCO will support passing these rates eventually as well, because until it does, it is not realistic for us to put it in to production if this feature is not added, even if all other glitches are fixed).
-Item description and quantity, shipping, tax, and everything else is being passed TO GCO fine.
-An order shown as pending appears in Zen's admin panel... however, this order has no item information. It shows the purchaser's info, and price paid, but there is nothing in there showing WHAT they actually purchased.
-Item can be charged and marked sent fine in google. Emails are sent with products in them
-Order is changed to processed in Zen's admin, but there is still no description of the actual item ordered. In addition, the item purchased is NOT deducted out of current quantity
I have gone through the response_message log and it looks like google IS sending this information back... it's at minimum hitting the log file, but the item is not being passed to Zen... and I might have an idea as to why.
Looking in the log file I see this:
Code:
<product-data>;502</product-data>
I believe this is an error being passed from Google. This is the product ID number in zen, but there is a ; in there that I don't think should be in there.
I'm pretty sure it should just be:
Code:
<product-data>502</product-data>
If my theory here is right, then because Zen is not getting a valid product ID number, it doesn't know what product to associate to the order, and what product to take the quantity away from... right?
I think this could be part of the issue... it's at least something to look at and consider.
And I don't know if it matters or not, but I figure I should also mention my error log is clean except for the null error:
Code:
Tue Dec 26 10:54:33 CST 2006:- Line 119: headers['Authorization'] is NULL.
I hope to see a working GCO with all shipping features working soon.
We're really wanting to get GCO working on our production store. :smartass:
-
Re: Google Checkout module for Zen Cart (beta)
GldRush98: For me, the admin portion of GCO 1.0.5 worked properly right from the start, without any modification to that area. Perhaps there was a change in 1.0.5 that resolved your 1.0.4 issue? <shrug>
I have GCO 1.0.5 up and running on a live site (it's my only payment option) and have processed orders without any problem. I needed to make a few changes to get it working with calculated USPS shipping (and to offer more than 1 shipping choice), but I don't believe much (if anything) needed to be changed to get the table rate working.
I can try to help if you have any 1.0.5 related issues that I've run into, but I don't think I'll be much help in 1.0.4 since I'm not running that version.
Shawn
-
Re: Google Checkout module for Zen Cart (beta)
BBG: Could you verify a couple things for me?
Is GCO passing the items actually purchased back to your Admin panel... showing your proper invoices and everything with the items purchased?
Also, once you click ship on GCO, is it properly subtracting the item out of your quantity stock?
Also, what did you have to do to get the USPS/FedEx rates to pass to GCO?
Thanks for your help :)
Edit: I'm going to reinstall the 1.0.5 files and see what I can get to happen.
-
Re: Google Checkout module for Zen Cart (beta)
ok... reinstalled 1.0.5 and first thing I noticed is that it is passing my FedEx/USPS options to GCO, but they all have no monetary value?
-
Re: Google Checkout module for Zen Cart (beta)
really I'm not trying to post so much... but,
the no monetary value is my fault... I'm on a new testing server and google is calling the production server's address for the reference handler for some reason. This will probably be resolved later once I can get the sub-domain added on to the secure server.
So it looks like GCO 1.0.5 might be working correctly... this is excitting.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
GldRush98
really I'm not trying to post so much... but,
the no monetary value is my fault... I'm on a new testing server and google is calling the production server's address for the reference handler for some reason. This will probably be resolved later once I can get the sub-domain added on to the secure server.
So it looks like GCO 1.0.5 might be working correctly... this is excitting.
Set up a GCO sandbox account and configure your paynent mod for sandbox mode and enter the sandbox account authetication info.
-
Re: Google Checkout module for Zen Cart (beta)
Yeah, I've got all the sandbox stuff set up right, and I have the address of the test server entered in the integration panel on GCO sandbox, but for some reason GCO keeps calling the address of the secure server and not the testing server. I'm not sure why. But like I said, I will hopefully have this resolved in the next hour or so, and then I will know if it's all working or not :)
-
Re: Google Checkout module for Zen Cart (beta)
Hi everyone
im posting a fix for merchant calculation shipping
this fix solves the problem when retrieving more than one quote (method) form the same shipping provider.
ex. getting FedEx: Priority (by 10:30AM, later for rural), FedEx: 2 Day Air
before the module returns for all methods the same shipping cost.
now it retrieves the correct price for each one.
change code in responsehandler.php line ~426
Code:
$quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
//print_r($quotes);
$price = $quotes[0]['methods'][0]['cost'];
$shippable = "true";
//if there is a problem with the method, i mark it as non-shippable
if(!isset($quotes[0]['methods'][0]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
for this one
Code:
$quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
//print_r($quotes);
$quote_id = count($quotes[0]['methods'])-1;
$price = $quotes[0]['methods'][$quote_id]['cost'];
$shippable = "true";
//if there is a problem with the method, i mark it as non-shippable
if(!isset($quotes[0]['methods'][$quote_id]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
please feel free to give us some feed back.
ropu
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
GldRush98
Yeah, I've got all the sandbox stuff set up right, and I have the address of the test server entered in the integration panel on GCO sandbox, but for some reason GCO keeps calling the address of the secure server and not the testing server. I'm not sure why. But like I said, I will hopefully have this resolved in the next hour or so, and then I will know if it's all working or not :)
tip:
have a look to googlecheckout/gcheckout.php line 476
PHP Code:
if ($srv_mode == 'https://sandbox.google.com/' && $http_mode == 'http') {
$url = HTTP_SERVER . DIR_WS_CATALOG . 'googlecheckout/responsehandler.php';
} else {
$url = HTTPS_SERVER . DIR_WS_CATALOG . 'googlecheckout/responsehandler.php';
}
$gcheck->push('merchant-calculations');
$gcheck->element('merchant-calculations-url', $url);
$gcheck->element('accept-merchant-coupons', 'true');
//$gcheck->element('accept-gift-certificates', 'true');
$gcheck->pop('merchant-calculations');
here is set the url for the merchant calculations process
ropu
-
Re: Google Checkout module for Zen Cart (beta)
ok, I seem to have run in to a big wall on this one.
I thought everything would work once I got the secure server's ip address entered in to our DNS but it's just not working.
When I go to Google Checkout it won't pull in any shipping rates from my site.
In GCO's Sandbox inegration panel under Integrtion Issues all I'm getting now is
Quote:
Your server returned no data in its response; Checkout requires data of type merchant-calculation-results in response to merchant-calculation-callback
Every single time I go to the GCO cart.
ropu, thanks for your suggestion, and I tried manually editing and setting the secure server's address in there but it didn't help me.
Any insight here? This is me stumped.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
Hi everyone
im posting a fix for merchant calculation shipping
this fix solves the problem when retrieving more than one quote (method) form the same shipping provider.
ex. getting FedEx: Priority (by 10:30AM, later for rural), FedEx: 2 Day Air
before the module returns for all methods the same shipping cost.
now it retrieves the correct price for each one.
change code in responsehandler.php line ~426
Code:
$quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
//print_r($quotes);
$price = $quotes[0]['methods'][0]['cost'];
$shippable = "true";
//if there is a problem with the method, i mark it as non-shippable
if(!isset($quotes[0]['methods'][0]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
for this one
Code:
$quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
//print_r($quotes);
$quote_id = count($quotes[0]['methods'])-1;
$price = $quotes[0]['methods'][$quote_id]['cost'];
$shippable = "true";
//if there is a problem with the method, i mark it as non-shippable
if(!isset($quotes[0]['methods'][$quote_id]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
please feel free to give us some feed back.
ropu
I reinstalled 1.0.5 entirely in hopes of using the merchant selection for shipping. I removed my mzmt shipping module as it did not seem to be recognized anyway. (I'll probably have to edit on the the obscure googlecheckout.php files... shouldn't have to though...)
I have table method and usps now. When setting up GCO module, the only shipping method that displays is usps. table does not appear.
Made the modification suggested 3 posts above this. Created order for sandbox. Shipping options are all usps and all have the same price - $3.63, no matter how many items purchased. (usps has $3.00 handling charge included...)
At times, messing with various mods suggested in this thread, I got yellow "Does not ship to this address" message in GCO screen. Figured out this is standard error message produced when shippable is set to false (code around same area as latest mods were installed.) For grins, commented out error handler that set shippable to false. Amazingly, I had a variety of shipping methods to choose from in GCO screen, including freeshipper, usps and table. Values were defaults from Payment module configuration, but the selection of methods displayed...
Comments:
We should not have to edit includes/modules/payment/googlecheckout.php to include or exclude values for the arrays. A better method would be to read the enabled methods from the active shipping modules and build the arrays dynamically. Addin methods (such as mzmt) should also be included dynamically depending upon whether they have been enabled.
The usps array in the file includes/modules/payment/googlecheckout.php does not have an entry for media mail. If you have to hard-code the array values, at least check the modules they are based on...
-
Re: Google Checkout module for Zen Cart (beta)
this topic has so many posts.
i'm having a similar problem as others.
I've got GCO sandbox setup on my shop, and I can click it and checkout. The orders are shown in my GCO account orders section, however nothing appears in ZC. My response_error and response_message logs are blank. Just out of curiosity, at the top of response_handler.php, I wrote some code to write a timestamp to a 3rd file. The 3rd file get written to when I directly to the response handler URL, but it never gets written to when I check out through GCO. I have set the API callback URL to the http://www.sss.com/googlecheckout/response_handler.php file on my site, and the callback method is XML.
I don't know what else to do or try, since it seems GCO will not even attempt to do any thing w/ myu response handler file. (as shown by no timestampe being written to the 3rd file).
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
xinno
this topic has so many posts.
i'm having a similar problem as others.
I've got GCO sandbox setup on my shop, and I can click it and checkout. The orders are shown in my GCO account orders section, however nothing appears in ZC. My response_error and response_message logs are blank. Just out of curiosity, at the top of response_handler.php, I wrote some code to write a timestamp to a 3rd file. The 3rd file get written to when I directly to the response handler URL, but it never gets written to when I check out through GCO. I have set the API callback URL to the
http://www.sss.com/googlecheckout/response_handler.php file on my site, and the callback method is XML.
I don't know what else to do or try, since it seems GCO will not even attempt to do any thing w/ myu response handler file. (as shown by no timestampe being written to the 3rd file).
Check your API callback URL. Unless you renamed your file, responsehandler.php should not have an underscore in it.
-
Re: Google Checkout module for Zen Cart (beta)
to follow up on my post,
i looked at my raw log files.
"POST /googlecheckout/responsehandler.php HTTP/1.0" 403 - "-" "Jakarta Commons-HttpClient/3.0.1"
any ideas as to why my server is returning 403?
I am on a shared hosting server. there is nothing in my .htaccess files except just enough to make zencart work.
.htaccess
php_value session.use_trans_sid off
php_value register_globals off
<Files ".ht*">
deny from all
</Files>
php_flag session.use_trans_sid off
-
Re: Google Checkout module for Zen Cart (beta)
to follow up with my last issue, my web host looked into the issue and there was a security rule that was preventing the post to requesthandler.php
Now since that's settled, I need to figure out why my orders will not show up.
Is the product ID being passed with a ; first an issue?
-
Re: Google Checkout module for Zen Cart (beta)
I am currently using GCO 1.0.4 with the order issues. My stock quantity is deducted properly, but the orders do not show up correctly.
Maybe I should try GCO 1.0.5, any help on where I can download this? I've looked on Zen and on Google's website and have been unable to find this download.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
xinno
I am currently using GCO 1.0.4 with the order issues. My stock quantity is deducted properly, but the orders do not show up correctly.
Maybe I should try GCO 1.0.5, any help on where I can download this? I've looked on Zen and on Google's website and have been unable to find this download.
Start back about page 34 of this thread. A lot of troubleshooting and links to 1.0.5.
-
Re: Google Checkout module for Zen Cart (beta)
Update on my issues...
I finally have GCO 1.0.5 working 100% as it should.
It is finally pulling in our custom fedex and usps shipping rates properly which was the major snag. It's also finally sening ALL information back to our cart about which product was ordered, and how many, etc...
A programmer here had to re-write the entire merchant callback function as the one that was in there does not work.
I also had to change some other things around that 1.0.5 actually broke...
What a head ache.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
xinno
to follow up with my last issue, my web host looked into the issue and there was a security rule that was preventing the post to requesthandler.php
Now since that's settled, I need to figure out why my orders will not show up.
Is the product ID being passed with a ; first an issue?
No, the ; in front of order numbers was not an issue as I thought it might have been.
That is just the format it expects it in.
If ZC is not getting any data from google, I would first try using the 1.0.5 files and seeing if that helps. Also triple check the API callback url in your google sandbox settings.
-
Re: Google Checkout module for Zen Cart (beta)
...
i just found that my orders section under customers shows all my google orders.
the reports section shows none.
is this normal?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
xinno
...
i just found that my orders section under customers shows all my google orders.
the reports section shows none.
is this normal?
All my GCO orders are in my reports...
-
Re: Google Checkout module for Zen Cart (beta)
where do I get 1.0.5 files ?
I still don't have my orders showing in the Admin side.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
aktiveradio
where do I get 1.0.5 files ?
I still don't have my orders showing in the Admin side.
ropu has the code posted at:
http://google-checkout-zencart.googl...com/svn/trunk/
You will have to package the files yourself.
My suggestion is that you install 1.0.4 from the downloads then replace only these files - in the googlecheckout folder:
responsehandler.com
xmlbuilder.php
xmlparser.php
and add - in the googlecheckout folder:
googlemerchantcalculations.php
googleresult.php
You will be able to select one of the shipping methods as in 1.0.4. I use the table method.
This is the setup I have that works.
I believe that the newer responsehandler.php resolves the issue of items not feeding back to Admin. The two new files contain functions called by the new responsehandler.php and are needed to prevent error messages. The 2 xml...php files have improved xml handling functions.
The parts of 1.0.5 that don't seem to work - the merchant selectable shipping methods - are partly contained in gcheckout.php and the other files in the other folders that I don't recommend changing.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
BBG
GldRush98: For me, the admin portion of GCO 1.0.5 worked properly right from the start, without any modification to that area. Perhaps there was a change in 1.0.5 that resolved your 1.0.4 issue? <shrug>
I have GCO 1.0.5 up and running on a live site (it's my only payment option) and have processed orders without any problem. I needed to make a few changes to get it working with calculated USPS shipping (and to offer more than 1 shipping choice), but I don't believe much (if anything) needed to be changed to get the table rate working.
I can try to help if you have any 1.0.5 related issues that I've run into, but I don't think I'll be much help in 1.0.4 since I'm not running that version.
Shawn
What did you do to make USPS shipping work? Can you elaborate? I am testing GCO1.05 on ZC 1.36 and everything pretty much works without having to do anything special (orders showing up correctly in ZC admin, and when updating order status in admin, it is reflected in seller's Google checkout account as well as buyer's account). Major problem is: shipping is still not working. I use USPS but even after I put the "fix" ropu recommended a few posts back in responsehandler.php, I am still getting the same number ($15.40) for all USPS shipping options.
-
Re: Google Checkout module for Zen Cart (beta)
Another thing I want to mention: I found my response_message.log (and the error log as well) is wide open to the world. Whoever wants to see it just needs to enter
https://mycompany.com/googlecheckout...se_message.log
If the site goes live I'd be worried. I guess I could do something from Apache side to prevent this, but there should be a standard recommendation in the README how to secure the files.
-
Re: Google Checkout module for Zen Cart (beta)
I have installed GC1.0.5, and then reverted to some older files from 1.0.4 as described above because I use flat rate shipping. My server does not have getallheaders() defined. I still get the error message about "headers['Authorization'] is NULL" using the newest responsehandler.php so I still need to comment out the two sections. I do not know what is causing this behavior.
Once I went live with google checkout, I got an email from Google that my account would be suspended if I did not put a button for the gift certificate items that shows that those items are not available for Google Checkout. I don't know if that means that if there is a gift certificate in a shopping cart, then I would also need the disabled button in the shopping cart as well. I ended up taking down gift certificates as they are rarely purchased anyway.
When viewing an empty shopping cart, I get the normal message that the shopping cart is empty, followed by Featured Products and whatever else normally follows, and at the bottom it says "-Or use-" followed by a button for Google checkout not available for this purchase.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
malka
I have installed GC1.0.5, and then reverted to some older files from 1.0.4 as described above because I use flat rate shipping. My server does not have getallheaders() defined. I still get the error message about "headers['Authorization'] is NULL" using the newest responsehandler.php so I still need to comment out the two sections. I do not know what is causing this behavior.
I believe that the 1.0.5 responsehandler.php does not even have the sections that you commented out. Double-check the version of the file you have installed. It sounds like you are using 1.0.4 of responsehandler.php.
-
Re: Google Checkout module for Zen Cart (beta)
I am commenting out the equivalent sections in the 1.0.5 response handler that involve the error message:
Quote:
//Parse the http header to verify the source
/* if(isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) && isset($HTTP_SERVER_VARS['PHP_AUTH_PW'])) {
$compare_mer_id = $HTTP_SERVER_VARS['PHP_AUTH_USER'];
$compare_mer_key = $HTTP_SERVER_VARS['PHP_AUTH_PW'];
} else {
error_func("Line 119: headers['Authorization'] is NULL.\n");
exit(1);
}
*/
and
Quote:
/*
if($compare_mer_id != $merchant_id || $compare_mer_key != $merchant_key) {
error_func("Line 127: merchant_id or merchant_key does not match.\n");
exit(1);
}
*/
-
1 Attachment(s)
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
What did you do to make USPS shipping work? Can you elaborate? I am testing GCO1.05 on ZC 1.36 and everything pretty much works without having to do anything special (orders showing up correctly in ZC admin, and when updating order status in admin, it is reflected in seller's Google checkout account as well as buyer's account). Major problem is: shipping is still not working. I use USPS but even after I put the "fix" ropu recommended a few posts back in responsehandler.php, I am still getting the same number ($15.40) for all USPS shipping options.
To get the shipping to work I had to get the entire merchant callback function re-written. The one in there is pretty useless as it doesn't properly use zen cart's functions.
Try replacing your responsehandler.php file with the one I've attached here and see if GCO will pull in the correct shipping rates then. :lamo:
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
GldRush98
To get the shipping to work I had to get the entire merchant callback function re-written. The one in there is pretty useless as it doesn't properly use zen cart's functions.
Try replacing your responsehandler.php file with the one I've attached here and see if GCO will pull in the correct shipping rates then. :lamo:
Thanks very much but unfortunately it does not work for my setup. I have GCO 1.0.5 which does not have the [FONT=monospace][/FONT]getallheaders() function (neither is it provided by the server) so I added the definition of that function from 1.0.4 code. But then I got that Authorization NULL error.
So, I guess I will need a little bit more help ... Did you start from GCO 1.04 or 1.05? What other files did you have to change to make it work?
-
Re: Google Checkout module for Zen Cart (beta)
I've upgraded to 1.3.7.
I've found that , if you want to use PayPal Express checkout too, you will have to do a bit of merging the GoogleCheckout code into the new versions of the 3 template files found in includes\templates\YOUR_TEMPLATE\templates. All of the 1.3.7 versions of those files have PayPal Express modifications in them. I found it easier to modify tpl_login_default.php and tpl_shopping_cart_default.php from the new versions by adding the GCO code. With the tpl_checkout_payment_default.php it was easier to add the PayPal Express code as it was better documented.
It appears that I have both checkout modules working together.
-
Re: Google Checkout module for Zen Cart (beta)
Has anyone been able to get table rates working with international orders? It works fine for orders in the USA, but if you try to put in a country outside GCO says I don't ship to that country.
-
Re: Google Checkout module for Zen Cart (beta)
GldRush98: Glad to hear you have GCO 1.0.5 working properly! I'm sorry for not responding, I assumed I'd have Internet access over the holidays while I was away, unfortunately that was not the case
dhan99: How I have it set up is most likely different that what you want, I currently have it set up to offer only Priority Mail shipping unless the shopping cart contains all books- then I offer Media Mail and Priority Mail as shipping options. Since I only offer a second shipping method in certain cases, I had to hack and slash my way through a few php files- and left an ugly mess.
I'm going to check out ropu's latest fix and GldRush98's responsehandler on a fresh 1.0.5 yet this extended weekend to get multiple USPS options working w/o my hacks for Media Mail. I'll report back my progress and try my best to take notes. :)
Shawn
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
BBG
GldRush98: Glad to hear you have GCO 1.0.5 working properly! I'm sorry for not responding, I assumed I'd have Internet access over the holidays while I was away, unfortunately that was not the case
dhan99: How I have it set up is most likely different that what you want, I currently have it set up to offer only Priority Mail shipping unless the shopping cart contains all books- then I offer Media Mail and Priority Mail as shipping options. Since I only offer a second shipping method in certain cases, I had to hack and slash my way through a few php files- and left an ugly mess.
I'm going to check out ropu's latest fix and GldRush98's responsehandler on a fresh 1.0.5 yet this extended weekend to get multiple USPS options working w/o my hacks for Media Mail. I'll report back my progress and try my best to take notes. :)
Shawn
Happy New Year, Shawn. I just took a closer look at the responsehandler.php file from GldRush98 and I don't think it would work correctly. It seems to me $total_weight in process_merchant_calculation_callback() would need to be declared global in order for it to be picked up in the shipping function. Also, the $total_weight calculation assumes product_id's can be found in root/shopping-cart/items/item/merchant-item-id entry in the XML from Google, but in all the XML I've seen so far, the merchant-item-id entry simply doesn't exist and the product_id's can be found only in root/shopping-cart/merchant-private-data/product-data. Is it that Google API has changed at some point? Does anybody know? Logically one would think there should be a "merchant-item-id" inside <item>, which corresponds to product_id in ZenCart, but in reality it is simply not there. So I guess we will need to parse the ID's from product-data.
[FONT=monospace][/FONT]
-
Re: Google Checkout module for Zen Cart (beta)
Ok, I wrote down the steps I took to get multiple USPS shipping options working for me. I DID NOT try it with other non-USPS shipping modules, so your mileage may vary. I should note, I tried GldRush98's responsehandler.php, but as a direct replacement, it did not work. I also tried roku's fix, but that did not work for me either.
Here's the steps I took:
- Installed fresh ZC 1.3.6
- Installed fresh GCO 1.0.5 (overwriting any existing ZC files)
- Modified includes/modules/payment/googlecheckout.php
- Added Media Mail in array
- Commented out Bound Printed Material and Library
- Note: I moved the ")," at end of Library line to new uncommented line
- ZC Admin->Modules->Shipping->USPS->Install
- Entered in Web Tools User ID
- Changed Shipping methods (only left express, priority, first class, parcel and media selected)
- ZC Admin-> Uninstalled all other shipping modules
- ZC Admin->Modules->Payment->GoogleCheckout->Install
- Entered Merchant ID/Key
- Set fallback prices for shipping methods
- ZC Admin->Configuration->Postal Code
- Set Postal Code
- ZC Admin->Catalog->Categories/Products
- Added new test category and test products
- sandbox.google.com Admin->Settings->Integration
- Set API Callback URL
- **TEST #1**
- Went to new store front-end, added test product (weight was 1lb) to cart
- Clicked Estimate Shipping button:
Express - $25.50
Priority - $5.60
Parcel Post - $5.35
Media Mail - $3.03 - Clicked Google Checkout button
- Shipping & Handling dropdown on Google Checkout page contained:
Express - $22.20
First Class - $22.20
Priority - $22.20
Parcel Post - $22.20
Media Mail - $22.20 - None of the numbers match and First Class shouldn't be available!
- Modified googlecheckout/responsehandler.php (line 353)
changed:
Code:
global $googlepayment, $order, $db;
to:
Code:
global $googlepayment, $order, $db, $total_weight;
- **TEST #2**
- Shipping & Handling dropdown NOW contains:
Express - $25.50
First Class - $25.50
Priority - $25.50
Parcel Post - $25.50
Media Mail - $25.50 - At least one of the numbers match but still not right, and it's still showing First Class as available!
- Modified googlecheckout/responsehandler.php (lines 422-441)
replaced:
Code:
if(isset($data[$root]['calculate']['shipping'])) {
$shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
foreach($shipping as $curr_ship) {
$name = $curr_ship['name'];
//Compute the price for this shipping method and address id
list($a, $method_name) = explode(': ',$name);
//print_r($order);
$methods_hash[$method_name][0]. $methods_hash[$method_name][2]."\n";
$quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
//print_r($shipping_modules);
$price = $quotes[0]['methods'][0]['cost'];
$shippable = "true";
//if there is a problem with the method, i mark it as non-shippable
if(!isset($quotes[0]['methods'][0]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
with:
Code:
if(isset($data[$root]['calculate']['shipping'])) {
$shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
//Let's just get all the quotes at once
$quotes = $shipping_modules->quote();
foreach($shipping as $curr_ship) {
$name = $curr_ship['name'];
list($a, $method_name) = explode(': ',$name);
$quote_id=0;
// Not all methods are returned, such as First Class if
// weight >13oz, so need to marked as not shippable below
while (($quotes[0]['methods'][$quote_id]['id'] != $methods_hash[$method_name][0]) && $quote_id<count($quotes[0]['methods'])) {
$quote_id++;
}
$price = $quotes[0]['methods'][$quote_id]['cost'];
$shippable = "true";
if(!isset($quotes[0]['methods'][$quote_id]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
- **TEST #3**
- Shipping & Handling dropdown NOW contains:
Express - $25.50
Priority - $5.60
Parcel Post - $5.35
Media Mail - $3.03 - Finally, Google Checkout matches the Zen Cart shipping estimate!
I'm sure there's a more "programmatically correct" way to deal with it, unfortunately my PHP skills are lacking. Again, I have not tested it with other shipping modules enabled so it may not play nicely with others. Also, I didn't get a chance to try it out with tax so I'm not sure if it works with tax. I plan to have a look at that later.
Happy New Year!
Shawn
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
BBG
Ok, I wrote down the steps I took to get multiple USPS shipping options working for me. I
DID NOT try it with other non-USPS shipping modules, so your mileage may vary. I should note, I tried GldRush98's responsehandler.php, but as a direct replacement, it did not work. I also tried roku's fix, but that did not work for me either.
Here's the steps I took:
- Installed fresh ZC 1.3.6
- Installed fresh GCO 1.0.5 (overwriting any existing ZC files)
- Modified includes/modules/payment/googlecheckout.php
- Added Media Mail in array
- Commented out Bound Printed Material and Library
- Note: I moved the ")," at end of Library line to new uncommented line
- ZC Admin->Modules->Shipping->USPS->Install
- Entered in Web Tools User ID
- Changed Shipping methods (only left express, priority, first class, parcel and media selected)
- ZC Admin-> Uninstalled all other shipping modules
- ZC Admin->Modules->Payment->GoogleCheckout->Install
- Entered Merchant ID/Key
- Set fallback prices for shipping methods
- ZC Admin->Configuration->Postal Code
- Set Postal Code
- ZC Admin->Catalog->Categories/Products
- Added new test category and test products
- sandbox.google.com Admin->Settings->Integration
- Set API Callback URL
- **TEST #1**
- Went to new store front-end, added test product (weight was 1lb) to cart
- Clicked Estimate Shipping button:
Express - $25.50
Priority - $5.60
Parcel Post - $5.35
Media Mail - $3.03 - Clicked Google Checkout button
- Shipping & Handling dropdown on Google Checkout page contained:
Express - $22.20
First Class - $22.20
Priority - $22.20
Parcel Post - $22.20
Media Mail - $22.20 - None of the numbers match and First Class shouldn't be available!
- Modified googlecheckout/responsehandler.php (line 353)
changed:
Code:
global $googlepayment, $order, $db;
to:
Code:
global $googlepayment, $order, $db, $total_weight;
- **TEST #2**
- Shipping & Handling dropdown NOW contains:
Express - $25.50
First Class - $25.50
Priority - $25.50
Parcel Post - $25.50
Media Mail - $25.50 - At least one of the numbers match but still not right, and it's still showing First Class as available!
- Modified googlecheckout/responsehandler.php (lines 422-441)
replaced:
Code:
if(isset($data[$root]['calculate']['shipping'])) {
$shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
foreach($shipping as $curr_ship) {
$name = $curr_ship['name'];
//Compute the price for this shipping method and address id
list($a, $method_name) = explode(': ',$name);
//print_r($order);
$methods_hash[$method_name][0]. $methods_hash[$method_name][2]."\n";
$quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
//print_r($shipping_modules);
$price = $quotes[0]['methods'][0]['cost'];
$shippable = "true";
//if there is a problem with the method, i mark it as non-shippable
if(!isset($quotes[0]['methods'][0]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
with:
Code:
if(isset($data[$root]['calculate']['shipping'])) {
$shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
//Let's just get all the quotes at once
$quotes = $shipping_modules->quote();
foreach($shipping as $curr_ship) {
$name = $curr_ship['name'];
list($a, $method_name) = explode(': ',$name);
$quote_id=0;
// Not all methods are returned, such as First Class if
// weight >13oz, so need to marked as not shippable below
while (($quotes[0]['methods'][$quote_id]['id'] != $methods_hash[$method_name][0]) && $quote_id<count($quotes[0]['methods'])) {
$quote_id++;
}
$price = $quotes[0]['methods'][$quote_id]['cost'];
$shippable = "true";
if(!isset($quotes[0]['methods'][$quote_id]['cost']) || isset($quotes[0]['error'])) {
$shippable = "false";
$price = "0";
}
- **TEST #3**
- Shipping & Handling dropdown NOW contains:
Express - $25.50
Priority - $5.60
Parcel Post - $5.35
Media Mail - $3.03 - Finally, Google Checkout matches the Zen Cart shipping estimate!
I'm sure there's a more "programmatically correct" way to deal with it, unfortunately my PHP skills are lacking. Again, I have
not tested it with other shipping modules enabled so it may not play nicely with others. Also, I didn't get a chance to try it out with tax so I'm not sure if it works with tax. I plan to have a look at that later.
Happy New Year!
Shawn
Yep, it seems to work correctly for me as well. Thanks very much for the detailed explanation. (And it is simpler to get $total_weight from _SESSION, as it is done in original v1.0.5 Google Checkout code, instead of trying to calculate from google XML.)
-
Re: Google Checkout module for Zen Cart (beta)
I was hoping international shipping would work, but no. If address in buyer's google checkout account is not US location (I tried a UK address), when reaching the google checkout page there will be an error message saying "XXXX online store does not ship to this address." This is true even if I set to use flat rate only.
So does that mean international buyers cannot really use Google Checkout?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
I was hoping international shipping would work, but no. If address in buyer's google checkout account is not US location (I tried a UK address), when reaching the google checkout page there will be an error message saying "XXXX online store does not ship to this address." This is true even if I set to use flat rate only.
So does that mean international buyers cannot really use Google Checkout?
I just tried some bigger companies that use Google Checkout and found none of them seem to ship to that UK address (I am pretty sure that address itself is valid):
- General Nutrition Centers does not ship to this address.
- Buy.com does not ship to this address.
- PETCO Animal Supplies, Inc. does not ship to this address.
- Toys"R"Us & Babies"R"Us does not ship to this address.
So is this a current Google Checkout limitation, despite their claim that "Google Checkout merchants can ship goods inside and outside the United States."? (see https://checkout.google.com/support/...871&topic=8664)
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
I just tried some bigger companies that use Google Checkout and found none of them seem to ship to that UK address (I am pretty sure that address itself is valid):
- General Nutrition Centers does not ship to this address.
- Buy.com does not ship to this address.
- PETCO Animal Supplies, Inc. does not ship to this address.
- Toys"R"Us & Babies"R"Us does not ship to this address.
So is this a current Google Checkout limitation, despite their claim that "Google Checkout merchants can ship goods inside and outside the United States."? (see
https://checkout.google.com/support/...871&topic=8664)
Try a canadian address - I'm sure they ship to Canada at least :P
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
samad64
Try a canadian address - I'm sure they ship to Canada at least :P
Nope. Tried a Canadian address and still got the same thing. I think those shops would gladly ship to Canadian addresses if the buyer choose one of their traditional checkout methods, not the fancy Google checkout. I guess it is a limitation for the time being. See http://code.google.com/apis/checkout...ationalization
Maybe the limitation is such that if there is any shipping related tag in the initial shopping cart posted to google, and if the destination address (from buyer's Google account) is non-US, the buyer will see that "does not ship to this address" error. But what about flat-rate? What's the reason even a flat-rate cannot work for shipping outside US? I hope somebody can show us a work-around, such as flat international rate for all non-US destinations and USPS/Fedex/UPS for domestic ones....but on second thought, that probably won't work either (if my understanding of this limitation is correct): as long as shipping costs depend on ship-to address in any way, we are going to run into the same wall. So, can we reach the conclusion: if you want to ship outside the US, you cannot use Google Checkout?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
Maybe the limitation is such that if there is any shipping related tag in the initial shopping cart posted to google, and if the destination address (from buyer's Google account) is non-US, the buyer will see that "does not ship to this address" error. But what about flat-rate? What's the reason even a flat-rate cannot work for shipping outside US? I hope somebody can show us a work-around, such as flat international rate for all non-US destinations and USPS/Fedex/UPS for domestic ones....but on second thought, that probably won't work either (if my understanding of this limitation is correct): as long as shipping costs depend on ship-to address in any way, we are going to run into the same wall. So, can we reach the conclusion: if you want to ship outside the US, you cannot use Google Checkout?
The workaround for international shipping appears to be to find out BEFORE the customer clicks the Google Checkout where it's being shipped to. If it's a non-US address, add the shipping fee as a shopping cart item and omit the shipping-methods block from the XML sent to Google Checkout.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
BBG
The workaround for international shipping appears to be to find out BEFORE the customer clicks the Google Checkout where it's being shipped to. If it's a non-US address, add the shipping fee as a shopping cart item and omit the shipping-methods block from the XML sent to Google Checkout.
Yep, we could add a checkbox right underneath the Google Checkout button (if it is enabled), with a label saying "Check this box if you are shipping outside U.S.". And get some javascript in there so that the action of checking that box would trigger what you just said --constructing a new shopping cart with the shipping-methods block taken out and an additional shipping fee item added.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
Yep, we could add a checkbox right underneath the Google Checkout button (if it is enabled), with a label saying "Check this box if you are shipping outside U.S.". And get some javascript in there so that the action of checking that box would trigger what you just said --constructing a new shopping cart with the shipping-methods block taken out and an additional shipping fee item added.
I was thinking of prompting the user when they first add an item to the shopping cart, something like "Please enter your shipping location so we can calculate shipping costs". Although, I'm not sure if that would violate Google's TOS. As a bonus, for US addresses, you could also send Google the calculated shipping values (instead of the fallback guesstimates) if you knew where it was being shipped to- although I've never seen the live callback timeout yet <knock on wood>.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
BBG
I was thinking of prompting the user when they first add an item to the shopping cart, something like "Please enter your shipping location so we can calculate shipping costs". Although, I'm not sure if that would violate Google's TOS. As a bonus, for US addresses, you could also send Google the calculated shipping values (instead of the fallback guesstimates) if you knew where it was being shipped to- although I've never seen the live callback timeout yet <knock on wood>.
That would work too. But from the stand point of buyer experience I would still prefer a simple checkbox (if that does not turn out to be too difficult to implement). This way, U.S. buyers will need to do nothing extra when using Google checkout (the checkbox is unchecked by default), and international buyers will need to make merely one more click, and everything should work.
Whether or not somebody will find it worthwhile to put in effort and implement something like this, will depend on how soon Google can be expected to get rid of this shipping limitation itself. Does anybody know what can we expect in this regard? If this limitation is going to stay for the good part of 2007, I really hope somebody would step forward and create this work-around for us all.
-
Re: Google Checkout module for Zen Cart (beta)
HI GldRush98
could you mail me ur version so i can update the release?
thx and happy new year
ropu
Quote:
Originally Posted by
GldRush98
Update on my issues...
I finally have GCO 1.0.5 working 100% as it should.
It is finally pulling in our custom fedex and usps shipping rates properly which was the major snag. It's also finally sening ALL information back to our cart about which product was ordered, and how many, etc...
A programmer here had to re-write the entire merchant callback function as the one that was in there does not work.
I also had to change some other things around that 1.0.5 actually broke...
What a head ache.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
HI GldRush98
could you mail me ur version so i can update the release?
thx and happy new year
ropu
ropu: I tried the responsehandler.php file from GldRush98 but it did not work for me. But BBG's fix (see post #473) worked, at least for USPS shipping to US addresses.
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
ropu: I tried the responsehandler.php file from GldRush98 but it did not work for me. But BBG's fix (see post #473) worked, at least for USPS shipping to US addresses.
Another thing. Since ZC 1.3.7 is out, maybe you can release the 1.0.5 module based on ZC 1.3.7 files (or better, one download for 1.3.6 and another for 1.3.7) so that people with default installations won't have to do the manual editing.
For me, the major issue is international shipping. I don't know if it ever worked for anybody :lookaroun
-
Google Checkout and Paypal express not working...
I had just installed the "GoogleCheckout" mod on our site: http://www.stunmasters.net. It was working fine until I enabled the "PayPal Express Checkout". Now the GoogleCheckout button does not show at all. I have the GoogleCheckout sort order set to 1 and PayPal Express Checkout sort order set to 2. Anybody experienced this problem?
Thanks in advance for any comments/help.
Jose
-
Re: Google Checkout and Paypal express not working...
Quote:
Originally Posted by
bigjoed
I had just installed the "GoogleCheckout" mod on our site:
http://www.stunmasters.net. It was working fine until I enabled the "PayPal Express Checkout". Now the GoogleCheckout button does not show at all. I have the GoogleCheckout sort order set to 1 and PayPal Express Checkout sort order set to 2. Anybody experienced this problem?
Thanks in advance for any comments/help.
Jose
Check the last 3 or 4 pages of posts in this thread. The 3 template files that are used for GoogleCheckout (in YOUR_TEMPLATE/templates) have been modified for PayPal Express. You will have to merge code in the 2 versions to have them work together.
-
Re: Google Checkout module for Zen Cart (beta)
Hi,
Can someone tell me what I am doing wrong? I get these errors from googlecheckout/responsehandler.php
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/rusty2/public_html/newcatalog/googlecheckout/xmlparser.php:166) in /home/rusty2/public_html/newcatalog/includes/functions/sessions.php on line 102
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/rusty2/public_html/newcatalog/googlecheckout/xmlparser.php:166) in /home/rusty2/public_html/newcatalog/includes/functions/sessions.php on line 102
Warning: Cannot modify header information - headers already sent by (output started at /home/rusty2/public_html/newcatalog/googlecheckout/xmlparser.php:166) in /home/rusty2/public_html/newcatalog/includes/init_includes/init_templates.php on line 78
Google sandbox gives me this error-
Warnings:
XML We Received:
<br />
<b>Warning</b>: session_start(): Cannot send session cookie - headers already sent by (output started at /home/rusty2/public_html/newcatalog/googlecheckout/xmlparser.php:166) in <b>/home/rusty2/public_html/newcatalog/includes/functions/sessions.php</b> on line <b>102</b><br />
<br />
<b>Warning</b>: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/rusty2/public_html/newcatalog/googlecheckout/xmlparser.php:166) in <b>/home/rusty2/public_html/newcatalog/includes/functions/sessions.php</b> on line <b>102</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/rusty2/public_html/newcatalog/googlecheckout/xmlparser.php:166) in <b>/home/rusty2/public_html/newcatalog/includes/init_includes/init_templates.php</b> on line <b>78</b><br />
<div class="systemError">1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1<br />in:<br />[select products_id, products_weight from products p where products_id in ()]<br /></div>
XML We Sent:
<?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="fce27712-9424-46b0-995a-c0d23173fe30">
<shopping-cart>
<merchant-private-data>
<session-data>81f6366d23cd0728b8e7d400d45ae2a5;zenid</session-data>
<product-data>;44</product-data>
<ip-address>69.128.162.164</ip-address>
</merchant-private-data>
<items>
<item>
<quantity>1</quantity>
<unit-price currency="USD">5.79</unit-price>
<item-name>Angler 2</item-name>
<item-description></item-description>
<tax-table-selector></tax-table-selector>
</item>
</items>
</shopping-cart>
<buyer-id>326975014161047</buyer-id>
<calculate>
<addresses>
<anonymous-address id="924377622528329">
<country-code>US</country-code>
<city>Salisbury</city>
<region>NH</region>
<postal-code>03268</postal-code>
</anonymous-address>
</addresses>
<merchant-code-strings />
<tax>false</tax>
<shipping>
<method name="Free Options: Free Options" />
<method name="UPS: Next Day Air Early AM" />
<method name="UPS: Next Day Air Early AM Letter" />
<method name="UPS: Worldwide Expedited" />
<method name="USPS: Express Mail" />
<method name="USPS: First-Class Mail" />
<method name="USPS: Priority Mail" />
<method name="USPS: Parcel Post" />
<method name="USPS: Bound Printed Material" />
<method name="USPS: Library" />
</shipping>
</calculate>
<buyer-language>en_US</buyer-language>
</merchant-calculation-callback>
-
Re: Google Checkout module for Zen Cart (beta)
Thanks for responding chain_man.
I looked at your site and saw how you have google checkout and paypal express together, how did you do that?
You mentioned looking back on this thread about this subject but all I see is a reply posted by you stating to merge the codes, but I don't exactly know how to do that without really messing things up on my site.
Could you provide me with some more details?
How exactly do I add the GCO code?
Thanks for your time...
-
Re: Google Checkout module for Zen Cart (beta)
It is probably easiest to use winmerge to compare the two files. But I don't have that tool, so did it the hard way.
Essentially, it's probably easiest to start with the new 1.3.7 version as your base code. Search the comparable GCO version for "google". In two of the files, there are only a couple of lines in the GCO version. Copy and paste these lines into the 1.3.7 version. (I'm hedging about which files as I don't have them in front of me.)
In the third file, there is a lot more "google" in the GCO code, and it is well commented. I used this at a base and compared the 1.3.7 version, picking out the PayPal Express sections and copying and pasting them into the CGO version.
I think either way would be about the same.
I placed all merged versions of the template files in the YOUR_TEMPLATE/templates folder, as specified in the Google Checkout mod. This will keep your mods in override mode and keep your 1.3.7 default template code intact.
Sorry I can't be more specific. I hope this helps.
-
Re: Google Checkout module for Zen Cart (beta)
That helped, I got it working. I modified tpl_login_default.php and tpl_shopping_cart_default.php using winmerge. I left the tpl_checkout_payment_default.php untouched since by this page, customers already had paypal express and google checkout as option for payment.
Thanks for everything.
-
Re: Google Checkout module for Zen Cart (beta)
Has anyone tried to integrate GCO with MZMT (multi table multi zone) shipping that dreamscape made?
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
Another thing. Since ZC 1.3.7 is out, maybe you can release the 1.0.5 module based on ZC 1.3.7 files (or better, one download for 1.3.6 and another for 1.3.7) so that people with default installations won't have to do the manual editing.
For me, the major issue is international shipping. I don't know if it ever worked for anybody :lookaroun
dhan99, do you know if this new version will affect the actual release of GC Module?
if so, could you address where?
ropu
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
dhan99
For me, the major issue is international shipping. I don't know if it ever worked for anybody :lookaroun
Can anyone confirm if this has been resolved? This is also my major stumbling block. I cannot use GC unless it can support separate shipping policies for USA zone and international zone.
@ropu - do you see any daylight on this? I think you spoke previously that your team was working on this issue. Any news? Thanks.
For more info on the basic shipping configuration I refer to please see the "National and International Per Item Shipping" package at
http://www.zen-cart.com/index.php?ma...roducts_id=334
Woody
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
dhan99, do you know if this new version will affect the actual release of GC Module?
if so, could you address where?
ropu
ropu,
The 3 template files that are included with the GCO mod have also been modified by the zen team for 1.3.7 to accommodate PayPal Express. There does not seem to be any other overlaps.
-
1 Attachment(s)
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
dhan99, do you know if this new version will affect the actual release of GC Module?
if so, could you address where?
ropu
ropu, you can use attached file if you like. I have tested with ZC 137 and it seems to work fine. It is just your GCO 1.0.5 files with the orders.php and the three tpl_* files from ZC 1.3.7 (because of the "split" login in ZC137, the show_google_components part needs to appear at an additional place in tpl_login_default.php so that both GCO and PayPay buttons will show up on this split login page, if both methods are enabled), and responsehandler.php modified as suggested by BBG. In case both express payment methods are enabled, the page layout needs some work to align the buttons better on shopping cart page and split login page (for the latter, the text mentions only PayPal, it should mention GCO as well) And you may want to also use the split login page when GCO is enabled but PayPay is disabled.
These are minor issues. For me, the single major issue remains to be: INTERNATIONAL SHIPPING!! I hope somebody can shed some light on this.
-
Re: Google Checkout module for Zen Cart (beta)
Just thought I'd share my experience attempting to use coupons with GCO 1.0.5.
There's a section for adding coupons within the GCO website (Settings->Coupons). "Create and manage coupons to offer discounts to your customers", sounds easy! I added several coupons, and tried it out. Nope, didn't work. I tried to search for documentation regarding this coupon feature, but couldn't find anything at all. I couldn't find anything on the GC merchant forums either. I assume this just doesn't work since there's merchant calculations being done, but I wish I could have found some documentation saying so. If anyone found any documentation regarding using the GCO web admin coupon feature, I'd appreciate it if you could send me a link.
Moving on, I added some coupons in the ZC Coupon Admin and tried it out. It seemed to be working, however (isn't there always a however?), GCO completely ignored the minimum order restriction I specified with the coupon. So you could add any of the coupons regardless of the shopping cart total. So, I had to modify the the calculate_coupons() function within responsehandler.php to reject coupons if the shopping cart didn't reach the minimum order restriction. I only added 4 lines of code, but I've included the whole calculate_coupons() function for googlecheckout/responsehandler.php for those interested:
Code:
function calculate_coupons($root, $data, &$merchant_result, $price=0) {
global $order, $db;
require_once(DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'functions_general.php');
$currencies = new currencies();
require_once(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/discount_coupon.php');
$codes = get_arr_result($data[$root]['calculate']['merchant-code-strings']['merchant-code-string']);
//print_r($codes);
$first_coupon = true;
foreach($codes as $curr_code) {
$text_coupon_help = '';
//Update this data as required to set whether the coupon is valid, the code and the amount
$coupon = $db->Execute("select * from " . TABLE_COUPONS . " where coupon_code = '" . zen_db_input($curr_code['code']) . "' and coupon_type != 'G'");
if (!$first_coupon || $coupon->RecordCount() < 1) {
// invalid discount coupon code or more than one entered!
$text_coupon_help = $first_coupon?sprintf(TEXT_COUPON_FAILED,$curr_code['code']):'Sorry, only one coupon per order';
$coupons = new GoogleCoupons("false", $curr_code['code'],0, "USD", $text_coupon_help);
$merchant_result->AddCoupons($coupons);
// BBG Start - Invalid discount coupon if coupon minimum order is over 0 and the order total doesn't meet the minimum
} else if ($coupon->fields['coupon_minimum_order']>0 && $order->info['total'] < $coupon->fields['coupon_minimum_order']) {
$text_coupon_help = 'Sorry, the minimum purchase hasn\'t been reached to use this coupon';
$coupons = new GoogleCoupons("false", $curr_code['code'],0, "USD", $text_coupon_help);
$merchant_result->AddCoupons($coupons);
// BBG End
} else {
// valid discount coupon code
$lookup_coupon_id = $coupon->fields['coupon_id'];
$coupon_desc = $db->Execute("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . (int)$lookup_coupon_id . "' and language_id = '" . (int)$_SESSION['languages_id'] . "'");
$coupon_amount = $coupon->fields['coupon_amount'];
switch ($coupon->fields['coupon_type']) {
case 'F':
$text_coupon_help = 'Discount Coupon: '.$curr_code['code'];
break;
case 'P':
$text_coupon_help = 'Discount Coupon: '.$curr_code['code'];
$coupon_amount = $coupon_amount * $order->info['total'] / 100;
break;
case 'S':
$text_coupon_help = 'Free Shipping Coupon: '.$curr_code['code'];
$coupon_amount = $price;
break;
default:
}
$get_result=$db->Execute("select * from " . TABLE_COUPON_RESTRICT . " where coupon_id='" . (int)$lookup_coupon_id . "' and category_id !='0'");
$cats = '';
while (!$get_result->EOF) {
if ($get_result->fields['coupon_restrict'] == 'N') {
$restrict = TEXT_CAT_ALLOWED;
} else {
$restrict = TEXT_CAT_DENIED;
}
$result = $db->Execute("SELECT * FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.categories_id = cd.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' and c.categories_id='" . $get_result->fields['category_id'] . "'");
$cats .= '<br />' . $result->fields["categories_name"] . $restrict;
$get_result->MoveNext();
}
if ($cats=='') $cats = TEXT_NO_CAT_RESTRICTIONS;
$get_result=$db->Execute("select * from " . TABLE_COUPON_RESTRICT . " where coupon_id='" . (int)$lookup_coupon_id . "' and product_id !='0'");
while (!$get_result->EOF) {
if ($get_result->fields['coupon_restrict'] == 'N') {
$restrict = TEXT_PROD_ALLOWED;
} else {
$restrict = TEXT_PROD_DENIED;
}
$result = $db->Execute("SELECT * FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'and p.products_id = '" . $get_result->fields['product_id'] . "'");
$prods .= '<br />' . $result->fields['products_name'] . $restrict;
$get_result->MoveNext();
}
if ($prods=='') $prods = TEXT_NO_PROD_RESTRICTIONS;
$coupons = new GoogleCoupons("true", $curr_code['code'],$coupon_amount,"USD", $text_coupon_help);
$merchant_result->AddCoupons($coupons);
$first_coupon = false;
}
}
}
You can see the lines I've added within the // BBG Start and // BBG End comments.
Disclaimer: This modification was done to fill my particular need, so YMMV.
Shawn
-
Re: Google Checkout module for Zen Cart (beta)
Hi,
I fixed the erros I was recieving the other day. Now I am getting this one from sandbox.google.com Do I need to edit my responsehandler.php in some was to add this information? I can place orders, recieve the emails, and I can see the order in my admin but I can not getting the shipping charges pulled through.
Error: Error parsing XML; message from parser is: Unexpected element (div) encountered: div
Warnings: The namespace of all API requests and postings should be "http://checkout.google.com/schema/2", but this document has: "". Try <div xmlns="http://checkout.google.com/schema/2" ...> for your root element.
XML We Received: <div class="systemError">1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1<br />in:<br />[select products_id, products_weight from products p where products_id in ()]<br /></div>
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
michelle_rvc
Hi,
I fixed the erros I was recieving the other day. Now I am getting this one from sandbox.google.com Do I need to edit my responsehandler.php in some was to add this information? I can place orders, recieve the emails, and I can see the order in my admin but I can not getting the shipping charges pulled through.
Error: Error parsing XML; message from parser is: Unexpected element (div) encountered: div
Warnings: The namespace of all API requests and postings should be "http://checkout.google.com/schema/2", but this document has: "". Try <div xmlns="http://checkout.google.com/schema/2" ...> for your root element.
XML We Received: <div class="systemError">1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1<br />in:<br />[select products_id, products_weight from products p where products_id in ()]<br /></div>
hi, i dont think you have the latest version of admin/includes/functions/extra_functions/added_functions_for_google_checkout.php
have a look at line ~147 and change it for this code
PHP Code:
if(isset($notify_comments)) {
$postargs = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<send-buyer-message xmlns=\"http://checkout.google.com/schema/2\" google-order-number=\"". $google_order. "\">
<message>". strip_tags($notify_comments) . "</message>
</send-buyer-message>";
fwrite($message_log, sprintf("\r\n%s\n",$postargs));
send_google_req($googlepay->request_url, $googlepay->merchantid, $googlepay->merchantkey,
$postargs, $message_log);
}
look at the line 150,
PHP Code:
<message>". strip_tags($notify_comments) . "</message>
.
This eliminates html tags that are confused as part of the xml if sent in plain text. There is no sense to scape them because GC srv will strip them the same.
try this and send ur feedback
ropu
-
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
hi, i dont think you have the latest version of admin/includes/functions/extra_functions/added_functions_for_google_checkout.php
have a look at line ~147 and change it for this code
PHP Code:
if(isset($notify_comments)) {
$postargs = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<send-buyer-message xmlns=\"http://checkout.google.com/schema/2\" google-order-number=\"". $google_order. "\">
<message>". strip_tags($notify_comments) . "</message>
</send-buyer-message>";
fwrite($message_log, sprintf("\r\n%s\n",$postargs));
send_google_req($googlepay->request_url, $googlepay->merchantid, $googlepay->merchantkey,
$postargs, $message_log);
}
look at the line 150,
PHP Code:
<message>". strip_tags($notify_comments) . "</message>
.
This eliminates html tags that are confused as part of the xml if sent in plain text. There is no sense to scape them because GC srv will strip them the same.
try this and send ur feedback
ropu
Re reading your post, i think there is an other error. regarding a wrong sql query. but i couldnt find the line nor the file where that error is taking place.
do you have that info?
ropu
-
Re: Google Checkout module for Zen Cart (beta)
ropu, are you referring to:
Warning: Invalid argument supplied for foreach() in /admin/includes/functions/extra_functions/added_function_for_google_checkout.php on line 267
because that's the sql error I'm getting
By the way whoever coded to have GCO detect the other methods, I LOVE U!