Jump to content
Silverado05

Offical Google Checkout module for osCommerce Support Thread

Recommended Posts

Here is the piece of code.

You can try this... I'm not sure it's the best way but should work...

 

  case 'DELIVERED': {
	$check_status = tep_db_fetch_array(tep_db_query("select orders_status from " . TABLE_ORDERS . "
		where orders_id = '" . $google_order['orders_id'] . "'"));

	switch ($check_status['orders_status']){
	  case GC_STATE_REFUNDED: {
		$orders_status_id = GC_STATE_SHIPPED_REFUNDED;
		break;
	  }
	  case GC_STATE_PROCESSING:
	  default:
		$orders_status_id = GC_STATE_SHIPPED;
		break;
	}

Share this post


Link to post
Share on other sites

When i put the code you provided i still get the same error:

arse error: syntax error, unexpected T_DEFAULT in .. catalog/googlecheckout/responsehandler.php on line 1154

 

Then i commented the the default section as shown below:

 

case 'DELIVERED': {

$check_status = tep_db_fetch_array(tep_db_query("select orders_status from " . TABLE_ORDERS . "

where orders_id = '" . $google_order['orders_id'] . "'"));

 

switch ($check_status['orders_status']){

case GC_STATE_REFUNDED: {

$orders_status_id = GC_STATE_SHIPPED_REFUNDED;

break;

}

case GC_STATE_PROCESSING: {

//default:

$orders_status_id = GC_STATE_SHIPPED;

break;

 

}

}

 

When i access the url i get this warnings:

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in .. /catalog/googlecheckout/responsehandler.php on line 1303

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /.. /catalog/googlecheckout/responsehandler.php:1303) in /home/rosco892/public_html/catalog/includes/functions/sessions.php on line 102

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/rosco892/public_html/catalog/googlecheckout/responsehandler.php:1303) in .. /catalog/includes/functions/sessions.php on line 102

 

Warning: Cannot modify header information - headers already sent by (output started at /home/rosco892/public_html/catalog/googlecheckout/responsehandler.php:1303) in .. /catalog/googlecheckout/library/googleresponse.php on line 168

Invalid or not supported Message

 

In line 1303 i have this section of the code:

 

$total = tep_db_fetch_array(tep_db_query(

"SELECT orders_total_id, text, value from " .

"" . TABLE_ORDERS_TOTAL . " where orders_id = " .

"'" . $google_order['orders_id'] . "' AND class = 'ot_total'"));

 

$net_rev = tep_db_fetch_array(tep_db_query(\ // Line 1303

"SELECT orders_total_id, text, value from " .

"" . TABLE_ORDERS_TOTAL . " where orders_id = " .

"'" . $google_order['orders_id'] . "' AND class = 'ot_goog_net_rev'"));

$sql_data_array = array(

'orders_id' => $google_order['orders_id'],

'title' => '<b>' . GOOGLECHECKOUT_STATE_STRING_NET_REVENUE . '</b>',

'text' => '<b>' .

$currencies->format(

($total['value'] - ((double) $gc_data[$root]['total-refund-amount']['VALUE'])),

false,

$gc_data[$root]['total-refund-amount']['currency']) . '</b>',

'value' => ($total['value'] - ((double) $gc_data[$root]['total-refund-amount']['VALUE'])),

'class' => 'ot_goog_net_rev',

'sort_order' => 1010

);

 

 

Then i deleted '\' at the end of the line 1303.

 

Now when i access the responsehandler.php i get error message "Invalid or not supported Message" .....

 

Something has gone wrong.. These are version of software's in my server:

 

PHP - 5.2.8

MySQL - 5.1.30

Apache - Apache 2.2.11 (includes mod_rewrite and mod_security)

CGI - Built into Apache

OS - Linux x86 CentOS 5.x

 

I will appreciate any help you can provide. I am kind of stuck.

 

 

Thanks a lot.

Share this post


Link to post
Share on other sites
parse error: syntax error, unexpected T_DEFAULT in

your code above is not what I posted... you can comment default if you want?

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in

delete '\'

 

You'll find it a bit of a process to solve the responsehandler, every set up is unique, it will continue to complain tell... you work it out

Share this post


Link to post
Share on other sites

Thanks a lot for your reply.

 

I commented default in line 1154 and deleted "\" in line 1303 and I am kind of stuck here.

 

This is the error message i get when i go to the responsehandler.php now "nvalid or not supported Message". It is 404 error.

 

I am kind of out of ideas about what to do next. I will appreciate any help.

 

Thanks in Advance.

Share this post


Link to post
Share on other sites
nvalid or not supported Message"

 

what do you mean: go to responsehandler?

Share this post


Link to post
Share on other sites

I mean when i access it from the url? Like :https://<your-domain>/catalog/googlecheckout/responsehandler.php

 

I read it somewhere in the document that i should not get any errors when i access it before i can proceed.

 

Thanks again for your help.

Share this post


Link to post
Share on other sites
should not get any errors

I've never read that so I can't say but it's not meant to be opened in a browser...I got

 

Invalid or not supported Message

 

but no 404 error, which usually means page not found, or wrong url

Share this post


Link to post
Share on other sites

Ok. Now what i did is i tried to click the google checkout button and i used to get the default shipping cost but now i am getting

 

"You do not currently have any valid shipping methods." with yellow background and warning sign on the side of it. I have setup USPS account and i have also enabled.

Share this post


Link to post
Share on other sites
You do not currently have any valid shipping methods

I have not used USPS, maybe it's your setup, you're going to have to go to Shipping Modules and ask there for help on that..

Share this post


Link to post
Share on other sites

Ok I now got it working sort of.. I am having the same problem with this mod and I did with the last one..

 

the shipping.. for example I want the first shipping to be 2.00 and anything added will go up .50 untill 5.00 is reach..

and I set up the table

and when I go to use the sand box only a dollar shows up.. what am I doing wrong.

now I used table or zone based rates same result.

 

Remove the Canadian Post "CA" and try it again, there was a problem with it.

Edited by speed777

Share this post


Link to post
Share on other sites

Please HELP!!!!

 

I am trying to add google checkout to my store, I am a UK based shop, add V1.5, according to google website, V1.5 support UK merchant. However, when I test it in sandbox, the error message keeps showing

 

" The address that you are shipping from is invalid. Please send a correct US address."

 

I try to search solutions, one I found is to disable Google shipping calculation

http://forums.oscommerce.com/index.php?showtopic=292180

 

I have no idea how to disable Google shipping calculation

I can see the checkout page if I change my store address and shippng address from an UK address to US address.

 

Also I got this UPS, Fedex shipping choices, which I don't need at all, I already add royalmail shipping moudel, and currently working perfectly.

 

is there any other solution to put it right??

 

Thank you very much

Share this post


Link to post
Share on other sites
Please HELP!!!!

 

I am trying to add google checkout to my store, I am a UK based shop, add V1.5, according to google website, V1.5 support UK merchant. However, when I test it in sandbox, the error message keeps showing

 

" The address that you are shipping from is invalid. Please send a correct US address."

 

I try to search solutions, one I found is to disable Google shipping calculation

http://forums.oscommerce.com/index.php?showtopic=292180

 

I have no idea how to disable Google shipping calculation

I can see the checkout page if I change my store address and shippng address from an UK address to US address.

 

Also I got this UPS, Fedex shipping choices, which I don't need at all, I already add royalmail shipping moudel, and currently working perfectly.

 

is there any other solution to put it right??

 

Thank you very much

Set "GoogleCheckout Carrier Calculated Shipping" to False and set the UPS, Fedex values to 0.

Share this post


Link to post
Share on other sites

I am having the same problem..

 

I get this when I go to update the Google Checkout Module Dashboard

Warning: Cannot modify header information - headers already sent by (output started at /homeXXX/public_html/shop/googlecheckout/library/shipping/merchant_calculated_methods.php:37) in /home/hera/public_html/shop/admin/gc_dashboard.php on line 61

and on line 61 in the gc_dashboard.php is

 

// Redirect to this page via GET.

header('Location: ' . $_SERVER['PHP_SELF']);

 

thank you for any help.

below or above

noppie

 

 

Ok I now got it working sort of.. I am having the same problem with this mod and I did with the last one..

 

the shipping.. for example I want the first shipping to be 2.00 and anything added will go up .50 untill 5.00 is reach..

and I set up the table

and when I go to use the sand box only a dollar shows up.. what am I doing wrong.

now I used table or zone based rates same result.

 

Remove the Canadian Post "CA" and try it again, there was a problem with it.


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites
I am having the same problem..

 

I get this when I go to update the Google Checkout Module Dashboard

 

and on line 61 in the gc_dashboard.php is

 

 

 

thank you for any help.

below or above

noppie

Look at gc_dashboard.php and remove whitespace before and after the closing ?> and at the bottom.

Share this post


Link to post
Share on other sites

I am in this page "Google Checkout Module Dashboard" and i have disabled "Enable Carrier Calculated Shipping" (I also tried it when it is enabled) to change the default value to zero and when i click save button it again comes back to all the previous values. I cannot set the default values to zero to disable fedex and ups shipping. Are you able to do that? Please help.

 

 

Set "GoogleCheckout Carrier Calculated Shipping" to False and set the UPS, Fedex values to 0.

Share this post


Link to post
Share on other sites
I am in this page "Google Checkout Module Dashboard" and i have disabled "Enable Carrier Calculated Shipping" (I also tried it when it is enabled) to change the default value to zero and when i click save button it again comes back to all the previous values. I cannot set the default values to zero to disable fedex and ups shipping. Are you able to do that? Please help.

Your default values in your database must be wrong. Check that part of your installation with phpadmin.

Edited by speed777

Share this post


Link to post
Share on other sites
Zone Rate Shipping: Remove the Canadian Post "CA" and try it again, there was a problem with it.

Is it possible to get Google Checkout to work with merchant calculated zone rates shipping? I have setup a simple zone rates configuration in admin to ship to US only:

 

tax zones: 1) United States, 2) Florida

zone 1- US

set the weight of all products to 1.00

and a simplified zone 1 table ($6.00 per item): 1:6.00,2:12.00,3:18.00,4:24.00,5:30.00,...etc

 

I am not getting default shipping values in Google Cart, however the rates I'm getting are not correct. I have tried variations but Gcart cannot access the rates from the zone1 table properly > 1 lb. or 1 product = $6.00, 2 lb. or 2 products $12.00, etc? I've got to be missing something, Thanks for any help with this...

Share this post


Link to post
Share on other sites
Is it possible to get Google Checkout to work with merchant calculated zone rates shipping? I have setup a simple zone rates configuration in admin to ship to US only:

 

tax zones: 1) United States, 2) Florida

zone 1- US

set the weight of all products to 1.00

and a simplified zone 1 table ($6.00 per item): 1:6.00,2:12.00,3:18.00,4:24.00,5:30.00,...etc

 

I am not getting default shipping values in Google Cart, however the rates I'm getting are not correct. I have tried variations but Gcart cannot access the rates from the zone1 table properly > 1 lb. or 1 product = $6.00, 2 lb. or 2 products $12.00, etc? I've got to be missing something, Thanks for any help with this...m

No, Zones will work with oscommerce but not with googlecheckout.

I'm trying to get Googlecheckout to work with Zones by using the following in shipping_methods.php:

'zones' => array(

'domestic_types' =>

array(

'zones1' => 'AL',

'zones2' => 'FL',

'zones3' => 'GA',

 

 

),

 

It still needs a lot more work on the code to figure it all out.

Share this post


Link to post
Share on other sites
It still needs a lot more work on the code to figure it all out.

Well it seems I've achieved a constant... using the setup I previously described and the the original (unaltered) merchant_calculated_methods.php > Google is charging exactly double for zone rates. So when I change the zone 1 table as below I'm getting correct values.

zone 1 table : 1:6.00,2:12.00,3:18.00,4:24.00,5:30.00,...etc // getting x2 ($6.00 per item)values

 

change to:

 

zone 1 table : 1:3.00,2:6.00,3:9.00,4:12.00,5:15.00,...etc // getting correct ($6.00 per item)values

Any idea how/why Google Cart is doubling the values?

Share this post


Link to post
Share on other sites
Well it seems I've achieved a constant... using the setup I previously described and the the original (unaltered) merchant_calculated_methods.php > Google is charging exactly double for zone rates. So when I change the zone 1 table as below I'm getting correct values.

 

Any idea how/why Google Cart is doubling the values?

I don't know why but why don't you try halving the numbers and see what happens. Ok, now I understand what you're saying.

Edited by speed777

Share this post


Link to post
Share on other sites
Well it seems I've achieved a constant... using the setup I previously described and the the original (unaltered) merchant_calculated_methods.php > Google is charging exactly double for zone rates. So when I change the zone 1 table as below I'm getting correct values.

 

Any idea how/why Google Cart is doubling the values?

I haven't upgraded to v1.5_rc 1 yet so that was the cause of the confusion.

Share this post


Link to post
Share on other sites
I haven't upgraded to v1.5_rc 1 ....

It may have something to do with having 2 tax zones but only one zone X table, so I'm going to look at that, or altering merchant_calculated_methods.php with > '/2', or other Google Checkout files, because leaving it as is will affect other payment modules? I have a copy of GC v1.45 but never installed, I have compared the the code in each version, and v1.5 seems to have improvements, you should setup a testing version and see if you like it?

Share this post


Link to post
Share on other sites
It may have something to do with having 2 tax zones but only one zone X table, so I'm going to look at that, or altering merchant_calculated_methods.php with > '/2', or other Google Checkout files, because leaving it as is will affect other payment modules? I have a copy of GC v1.45 but never installed, I have compared the the code in each version, and v1.5 seems to have improvements, you should setup a testing version and see if you like it?

I've been meaning to make the upgrade but have been busy so far.

Share this post


Link to post
Share on other sites
have been busy so far.

Know what you mean, sometimes it's hard to find the time.... I got it working, was not a Google issue, had to set tare wt. to "0"

Share this post


Link to post
Share on other sites

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

×