Jump to content
Silverado05

Offical Google Checkout module for osCommerce Support Thread

Recommended Posts

hi,

 

i have up loaded all files, but i do not see any google modules

 

please advise.

 

thanks

 

You don't have Google checkout out in Admin>modules>payment?

 

If you do then click on it and install it. If not then double check your installation.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
so with shipping generator I'm getting

 

<?php
/**
 * File: googlecheckout/shipping_methods.php file
 */ 
$mc_shipping_methods = array(
							  );

$mc_shipping_methods_names = array(

				   );
?>

can somebody else gives me what u get?

 

 

That is your shipping_methods.php file you posted that you are suppose to paste the code into that is generated from the shipping_generator.php.

 

You can find that at googlecheckout/shipping_generator/shipping_method_generator.php


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
yes and this is what I get from shipping_generator.php empty

 

Do you not have any shipping modules set up?

 

What exactly are you doing when you run the shipping method generator?


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites

I tested it with flat rate and it works...

 

So I have Domestic Shipping address and Int'l Shipping address to insert, I insert all of this and Cart Description with Weight, Quantity, Total Price.

 

Then I go get shipping method and after that generate but I get blank...

Share this post


Link to post
Share on other sites
You don't have Google checkout out in Admin>modules>payment?

 

If you do then click on it and install it. If not then double check your installation.

 

 

HI,

 

i manually opened a few files direct from file manager and i got the message below :-

 

 

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/bikers/public_html/catalog/shopping_cart.php on line 13

 

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/bikers/public_html/catalog/shopping_cart.php on line 13

 

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/bikers/public_html/catalog/shopping_cart.php on line 13

 

Fatal error: main() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bikers/public_html/catalog/shopping_cart.php on line 13

Share this post


Link to post
Share on other sites
HI,

 

i manually opened a few files direct from file manager and i got the message below :-

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/bikers/public_html/catalog/shopping_cart.php on line 13

 

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/bikers/public_html/catalog/shopping_cart.php on line 13

 

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/bikers/public_html/catalog/shopping_cart.php on line 13

 

Fatal error: main() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bikers/public_html/catalog/shopping_cart.php on line 13

 

 

Can you tell me which files you opened directly from file manager?


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
I tested it with flat rate and it works...

 

So I have Domestic Shipping address and Int'l Shipping address to insert, I insert all of this and Cart Description with Weight, Quantity, Total Price.

 

Then I go get shipping method and after that generate but I get blank...

 

You need to make sure you have a shipping module installed. So double check you have one installed. Then fill out Domestic Shipping address and if you are going to ship internationally then feel out Int'l Shipping address, if not clear those feilds. Cart Description leave it as is and then hit Get Shipping Methods button. If you have any shipping modules installed it will produce the code that you will need to put into the shipping_methods.php


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
http://www.******.co.uk/catalog/shopping_cart.php

 

hi,

 

i am going to reinstall again, can you let me know which is the best downloads available to start with.

 

thanks

 

What do you mean by "Best Downloads"? the current version of Google Checkout is 1.4


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites

Well, I thought it was fixed, but now, I'm still getting orders via GCO with $0.00 shipping charges using the FedEx shipping module. Logging into GCO, and looking at the errors in the integration tab, I have two:

 

We timed out waiting for your server at https://www.mydomain.com/catalog/googlechec...onsehandler.php -- the error we got is: Read timed out Your server must respond faster to merchant calculation callback requests.

 

We encountered an error trying to access your server at https://www.mydomain.com/catalog/googlechec...onsehandler.php -- the error we got is: java.net.SocketTimeoutException: Read timed out

 

What's the fix for these two?


John Skurka

Share this post


Link to post
Share on other sites

so I was able to get something out with shipping generator but I don't see how inserting this would work.

 

I need to know which data GC gets from site and does it do own shipping calculations???

Share this post


Link to post
Share on other sites
What do you mean by "Best Downloads"? the current version of Google Checkout is 1.4

 

 

hello,

 

i have downloaded Google Checkout 1.4 and uploaded all files to my oscommerce install directory.

 

but the module does not appear so i can not install.

 

had lookd through the forum again and again and tried few things but no luck.

 

thanks.

Share this post


Link to post
Share on other sites
so I was able to get something out with shipping generator but I don't see how inserting this would work.

 

I need to know which data GC gets from site and does it do own shipping calculations???

 

 

You run the shipping generator to get your shipping methods so you can past it into your shipping_methods.php so at checkout it will pass your shipping methods to Google checkout. If you don't copy and past that code into your shipping_methods.php then Google has no way of knowing what shipping methods you are using. So to anwser your question but doing what I have told you to do is how GC gets its shipping calculations and calculates the shipping for the order.

 

Did you post the code into the shipping_methods.php from the shipping generator? If you had done this, we would not be having this discussion right now.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
hello,

 

i have downloaded Google Checkout 1.4 and uploaded all files to my oscommerce install directory.

 

but the module does not appear so i can not install.

 

had lookd through the forum again and again and tried few things but no luck.

 

thanks.

 

 

Is this on a fresh install of OSC?

 

Are you uploading all the files or manually editing the files with the code changes?

 

When you said you "uploaded all files to my oscommerce install directory" did you put everything inside that folder? If so that is not correct. It needs to go in your catalog folder or if you site is in the root then just upload it straight to your site under public_html.

 

Is googlecheckout not showing as a payment option in admin>modules>payment?


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
Well, I thought it was fixed, but now, I'm still getting orders via GCO with $0.00 shipping charges using the FedEx shipping module. Logging into GCO, and looking at the errors in the integration tab, I have two:

 

We timed out waiting for your server at https://www.mydomain.com/catalog/googlechec...onsehandler.php -- the error we got is: Read timed out Your server must respond faster to merchant calculation callback requests.

 

We encountered an error trying to access your server at https://www.mydomain.com/catalog/googlechec...onsehandler.php -- the error we got is: java.net.SocketTimeoutException: Read timed out

 

What's the fix for these two?

 

 

Yes their is a fix for this. It is suppose to be packaged in the next release but I will have to get back to you and get it from Ropu. He emailed me the other day about it. In the meantime it should default to the shipping values you have set on the OSC side of the module.

 

If you have your default values set this replace this part of the Google code in admin/includes/function/general.php with the one below.

 

// ** GOOGLE CHECKOUT** 
// Function to store configuration values(shipping options) using 
// checkboxes in the Administration Tool 

 function gc_cfg_select_multioption($select_array, $key_value, $key = '') {

for ($i=0; $i<sizeof($select_array); $i++) {
  $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
  $string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"';
  $key_values = explode( ", ", $key_value);
  if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED';
  $string .= '>' . $select_array[$i];
}
$string .= '<input type="hidden" name="' . $name . '" value="--none--">';
return $string;
 }


// Custom Function to store configuration values (shipping default values)  
function gc_compare($key, $data)
{
	foreach($data as $value) {
		list($key2, $valor) = explode("_VD:", $value);
		if($key == $key2)		
			return $valor;
	}
	return '0';
}
// perhaps this function must be moved to googlecheckout class, is not too general
 function gc_cfg_select_shipping($select_array, $key_value, $key = '') {

//add ropu
// i get all the shipping methods available!
global $PHP_SELF,$language,$module_type;

$module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';

$file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
$directory_array = array();
if ($dir = @dir($module_directory)) {
  while ($file = $dir->read()) {

	if (!is_dir($module_directory . $file)) {
	  if (substr($file, strrpos($file, '.')) == $file_extension) {
		$directory_array[] = $file;
	  }
	}
  }
  sort($directory_array);
  $dir->close();
}

  $installed_modules = array();
  $select_array = array();
  for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) {
	$file = $directory_array[$i];

	include_once(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/' . $file);
	include_once($module_directory . $file);

	$class = substr($file, 0, strrpos($file, '.'));
	if (tep_class_exists($class)) {
	  $module = new $class;
	  //echo $class;
	  if ($module->check() > 0) {

		$select_array[$module->code] = array('code' => $module->code,
							 'title' => $module->title,
							 'description' => $module->description,
							 'status' => $module->check());
	  }
	}
  }
require_once (DIR_FS_CATALOG . 'includes/modules/payment/googlecheckout.php');
$googlepayment = new googlecheckout();

$ship_calcualtion_mode = (count(array_keys($select_array)) > count(array_intersect($googlepayment->shipping_support, array_keys($select_array)))) ? true : false;
if(!$ship_calcualtion_mode) {
	return '<br/><i>'. GOOGLECHECKOUT_TABLE_NO_MERCHANT_CALCULATION . '</i>';
}

$javascript = "<script language='javascript'>

				function VD_blur(valor, code, hid_id){
					var hid = document.getElementById(hid_id);
					valor.value = isNaN(parseFloat(valor.value))?'':parseFloat(valor.value);
					if(valor.value != ''){ 
						hid.value = code + '_VD:' + valor.value;
				//		valor.value = valor.value;	
				//		hid.disabled = false;
					}else {		
						hid.value = code + '_VD:0';
						valor.value = '0';			
					}


				}

				function VD_focus(valor, code, hid_id){
					var hid = document.getElementById(hid_id);		
				//	valor.value = valor.value.substr((code  + '_VD:').length, valor.value.length);
					hid.value = valor.value.substr((code  + '_VD:').length, valor.value.length);				
				}

				</script>";


  $string .= $javascript;

  $key_values = explode( ", ", $key_value);

foreach($select_array as $i => $value){
  if ( $select_array[$i]['status'] && !in_array($select_array[$i]['code'], $googlepayment->shipping_support) ) {
	  $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
	  $string .= "<br><b>" . $select_array[$i]['title'] . "</b>"."\n";
	  if (is_array($googlepayment->mc_shipping_methods[$select_array[$i]['code']])) {
	  foreach($googlepayment->mc_shipping_methods[$select_array[$i]['code']] as $type => $methods) {
		if (is_array($methods) && !empty($methods)) {
		  $string .= '<br>     <b>'. $type .'</b>';			
			  foreach($methods as $method => $method_name) {
				  $string .= '<br>';

				  // default value 
				  $value = gc_compare($select_array[$i]['code'] . $method. $type , $key_values);
				  $string .= '<input size="5"  onBlur="VD_blur(this, \'' . $select_array[$i]['code']. $method . $type . '\', \'hid_' . $select_array[$i]['code'] . $method . $type . '\' );" onFocus="VD_focus(this, \'' . $select_array[$i]['code'] . $method . $type . '\' , \'hid_' . $select_array[$i]['code'] . $method . $type .'\');" type="text" name="no_use' . $method . '" value="' . $value . '"';
				  $string .= '>';
				  $string .= '<input size="10" id="hid_' . $select_array[$i]['code'] . $method . $type . '" type="hidden" name="' . $name . '" value="' . $select_array[$i]['code'] . $method . $type . '_VD:' . $value . '"';		  
					$string .= '>'."\n";
					$string .= $method_name;
			  }
		}
		}
	}
	else {
	  $string .= $select_array[$i]['code'] .GOOGLECHECKOUT_MERCHANT_CALCULATION_NOT_CONFIGURED;
	}
  }
}
return $string;
 }

// ** END GOOGLE CHECKOUT **


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
Is this on a fresh install of OSC?

 

Are you uploading all the files or manually editing the files with the code changes?

 

When you said you "uploaded all files to my oscommerce install directory" did you put everything inside that folder? If so that is not correct. It needs to go in your catalog folder or if you site is in the root then just upload it straight to your site under public_html.

 

Is googlecheckout not showing as a payment option in admin>modules>payment?

 

 

yes it is on fresh install and i upleaded using ftp,

 

in root directory i have uploaded catelog folder because my ocs is in root.

 

no i do not see the payment option in admin>modules>payment

 

thanks

Share this post


Link to post
Share on other sites
yes it is on fresh install and i upleaded using ftp,

 

in root directory i have uploaded catelog folder because my ocs is in root.

 

no i do not see the payment option in admin>modules>payment

 

thanks

 

 

 

 

You have not uploaded everything or your FTP missed something. You need to double check that every file that is suppose to be uploaded is uploaded correctly to each folder that it is suppose to be in. On a fresh install this works out of the box if you just upload the files correctly. Can you give me a screen shot of your admin>modules>payment screen and post it.

 

If you have to upload one file at a time to it's correct location.

Edited by Silverado05

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
You have not uploaded everything or your FTP missed something. You need to double check that every file that is suppose to be uploaded is uploaded correctly to each folder that it is suppose to be in. On a fresh install this works out of the box if you just upload the files correctly. Can you give me a screen shot of your admin>modules>payment screen and post it.

 

If you have to upload one file at a time to it's correct location.

 

 

ok i will try fresh install again.

 

can you confirm me if i need to cmod any files.

 

http://lh3.google.com/motor.cars.london/Rt....jpg?imgmax=576

 

thanks

Share this post


Link to post
Share on other sites

Don't think you need to change any file permissions. If it doesn't say it in the install docs then you are good.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
If you have your default values set this replace this part of the Google code in admin/includes/function/general.php with the one below.

 

Well, I do have them set, but GCO is not using them. I've replaced the code as you suggest and we'll see what happens.


John Skurka

Share this post


Link to post
Share on other sites

"Error: Shipping Methods not configured"

 

Greetings, The above error is showing below the Google Checkout Logo.

 

- Using 1.4beta1.

- Utilized the shipping_method_generator.php

- Results pasted in shipping_methods.php

- attempted a module uninstall and reinstall

 

Same error. If someone would be so kind as to lend an extra set of eyes and brain - it would be most appreciated. I have searched the forums, web, along with backtracking through the entire installation a few times - but i am not making progress. I missed something somewhere.

 

<?php
/**
 * File: googlecheckout/shipping_methods.php file
 */ 
$this->mc_shipping_methods = array(
					'upsxml' => array(
								'domestic_types' =>
								  array(
									  'UPS Ground' => 'UPS Ground',
									  'UPS 3 Day Select' => 'UPS 3 Day Select',
									  'UPS 2nd Day Air' => 'UPS 2nd Day Air',
									  'UPS Next Day Air Saver' => 'UPS Next Day Air Saver',
									  'UPS Next Day Air A.M.' => 'UPS Next Day Air A.M.',
									  'UPS Next Day Air' => 'UPS Next Day Air',

									   ),

								'international_types' =>
								  array(
									  'UPS Worldwide Expedited' => 'UPS Worldwide Expedited',
									  'UPS Saver' => 'UPS Saver',

									   ),
									),
							  );

$this->mc_shipping_methods_names = array(
									 'upsxml' => 'United Parcel Service',
									);
?>

Share this post


Link to post
Share on other sites
"Error: Shipping Methods not configured"

 

Greetings, The above error is showing below the Google Checkout Logo.

 

- Using 1.4beta1.

- Utilized the shipping_method_generator.php

- Results pasted in shipping_methods.php

- attempted a module uninstall and reinstall

 

Same error. If someone would be so kind as to lend an extra set of eyes and brain - it would be most appreciated. I have searched the forums, web, along with backtracking through the entire installation a few times - but i am not making progress. I missed something somewhere.

 

<?php
/**
 * File: googlecheckout/shipping_methods.php file
 */ 
$this->mc_shipping_methods = array(
					'upsxml' => array(
								'domestic_types' =>
								  array(
									  'UPS Ground' => 'UPS Ground',
									  'UPS 3 Day Select' => 'UPS 3 Day Select',
									  'UPS 2nd Day Air' => 'UPS 2nd Day Air',
									  'UPS Next Day Air Saver' => 'UPS Next Day Air Saver',
									  'UPS Next Day Air A.M.' => 'UPS Next Day Air A.M.',
									  'UPS Next Day Air' => 'UPS Next Day Air',

									   ),

								'international_types' =>
								  array(
									  'UPS Worldwide Expedited' => 'UPS Worldwide Expedited',
									  'UPS Saver' => 'UPS Saver',

									   ),
									),
							  );

$this->mc_shipping_methods_names = array(
									 'upsxml' => 'United Parcel Service',
									);
?>

 

 

After you pasted the generated code into the shipping_methods.php did you uninstall the module then reinstall it? You need to uninstall the module after you paste the code then reinstall the module. If that doesn't work trying refreshing the page on the shopping_cart.php If that doesn't work then follow the directions on Post #44 and tell me what it shows on the shopping cart page.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
After you pasted the generated code into the shipping_methods.php did you uninstall the module then reinstall it? You need to uninstall the module after you paste the code then reinstall the module. If that doesn't work trying refreshing the page on the shopping_cart.php If that doesn't work then follow the directions on Post #44 and tell me what it shows on the shopping cart page.

 

Greetings

Thank you for the reply. Yes - the module was uninstalled / re-installed after modifying shipping methods, still producing the same error.

 

Later....In addition to pasting the code in shipping methods.php - I placed it directly in googlecheckout.php, uninstalled / reinstalled the module.......and the error appeared to disappear.

 

However google checkout sandbox still did not populate ups shipping information, but instead defaulted to the hard-coded shipping values. Testing on responsehandler_test.php returns and error of

Fatal error: Cannot redeclare class xmlparser in public_html/includes/classes/xmldocument.php on line 209

 

Here is the below response after peforming your instructions in post #44 (after pasting shipping methods directly in googlecheckout.php)

 

Array ( [0] => fedex1.php [1] => flat.php [2] => freeamount.php [3] => item.php [4] => spu.php [5] => table.php [6] => upsxml.php [7] => usps.php [8] => zones.php ) Array ( [fedex1] => Array (

 => fedex1 [title] => Federal Express [description] => Federal Express

 

You will need to have registered an account with FEDEX to use this module. Please see the README.TXT file for other requirements. [status] => 1 ) [freeamount] => Array ( [code] => freeamount [title] => Free Shipping [description] => Free Shipping w/ Minimum Order Amount [status] => 1 ) [spu] => Array ( [code] => spu [title] => Store Pickup [description] => In-store pickup during regular business hours. [status] => 1 ) [upsxml] => Array ( [code] => upsxml [title] => United Parcel Service [description] => United Parcel Service [status] => 1 ) [usps] => Array ( [code] => usps [title] => United States Postal Service [description] => United States Postal Service

 

You will need to have registered an account with USPS.

 

USPS expects you to use pounds as weight measure for your products.

 

Click HERE for registration details and instructions for proper usage. [status] => 1 ) ) [/i]

 

Thank you in advance.

Edited by supernoc

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

×