Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Offical Google Checkout module for osCommerce Support Thread


Silverado05

Recommended Posts

I realize we are all fixing our own issues here but I hoped someone could point me in the right direction...

 

I have been having buyers checkout through google without a shipping charge, I assume its during peak times and I am seeing this error occasionally:

 

We encountered an error trying to access your server at xxxxxxxx/googlecheckout/responsehandler.php -- the error we got is: java.net.SocketTimeoutException: Read timed out

 

I am using a table rate and I dont see anywhere that I can put a default amount for shipping in. I would rather have $1000 for back up shipping and lose a sale than lose the $$ on the shipping costs when a buyer lucks out and gets a $0.00 returned in google checkout.

 

Is there any way to set up default shipping rates with a table rate? Or at least tell google the buyer cant check out if google cannot retrieve my shipping rates?

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

I installed the gc 1.4.5 module and the gc image shows up in the shopping cart page, however, it does not show up as one of the payment options in the checkout_payment page. Can someone tell me what am I doing wrong please??? Bear with me I am kinna new to this.

 

 

Google checkout wont show on your payment page. I had a post (here:http://www.oscommerce.com/forums/index.php?s=&showtopic=272825&view=findpost&p=1160641 ) about how I put it there.

Link to comment
Share on other sites

Just installed Google Checkout v1.4.5_CCS.

 

But when I tried editing the Google Checkout details in the admin panel i got this error message:

 

"Fatal error: Call to undefined function: gc_cfg_select_shipping() in /var/www/vhosts/XXXX.XXX/catalog/admin/modules.php(238) : eval()'d code on line 1"

 

any clues????

 

Ta

Edited by muhammad_barki
Link to comment
Share on other sites

Arrgh! Another shopper received free shipping!

 

I have the new shipping module set up, google is timing out and not getting my responshandler in time. Where can i set up a default shipping amount for a table rate? There arent any options in the admin panel for any shipping other than usps, ups etc.

Link to comment
Share on other sites

ok, I think I see what the problem is, however, I am not sure where to fix it. I have two table rates, one domestic and one international.

 

 

When I use the shipping generator it works flawlessly. I have my rates setup fine. It works 90% of the time. However, in my admin I only see one item Default Values for Real Time Shipping Rates and it is my international rate. I need to get my domestic rate to show up in there. Where do I go to add this?????

Link to comment
Share on other sites

Well, it figures I would figure it out on my own. It appears that google checkout does not like the file name to be table...dont ask me why.

 

I changed the file name to domtable.php. I just added a dom(for domestic) to the word table in the table.php file then saved it as domtable.php. I uninstalled the table rate, installed the domtable rate, uninstalled gc, ran the shipping generator again, then reinstalled gc and poof, theres the field to set a default rate for my domestic shipping.

 

If any of you who are having issues with the table rate would like to try it (wouldnt hurt, if nothing else has worked) here's what I've done.

 

includes/modules/shipping/ add a page named domtable.php with the following code:

 

 

<?php
/*
 $Id: domtable.php,v 1.27 2003/02/05 22:41:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 class domtable {
var $code, $title, $description, $icon, $enabled;

// class constructor
function domtable() {
  global $order;

  $this->code = 'domtable';
  $this->title = MODULE_SHIPPING_DOMTABLE_TEXT_TITLE;
  $this->description = MODULE_SHIPPING_DOMTABLE_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_SHIPPING_DOMTABLE_SORT_ORDER;
  $this->icon = '';
  $this->tax_class = MODULE_SHIPPING_DOMTABLE_TAX_CLASS;
  $this->enabled = ((MODULE_SHIPPING_DOMTABLE_STATUS == 'True') ? true : false);

  if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_DOMTABLE_ZONE > 0) ) {
	$check_flag = false;
	$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_DOMTABLE_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
	while ($check = tep_db_fetch_array($check_query)) {
	  if ($check['zone_id'] < 1) {
		$check_flag = true;
		break;
	  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
		$check_flag = true;
		break;
	  }
	}

	if ($check_flag == false) {
	  $this->enabled = false;
	}
  }
}

// class methods
function quote($method = '') {
  global $order, $cart, $shipping_weight, $shipping_num_boxes;

  if (MODULE_SHIPPING_DOMTABLE_MODE == 'price') {
	$order_total = $cart->show_total();
  } else {
	$order_total = $shipping_weight;
  }

  $table_cost = split("[:,]" , MODULE_SHIPPING_DOMTABLE_COST);
  $size = sizeof($table_cost);
  for ($i=0, $n=$size; $i<$n; $i+=2) {
	if ($order_total <= $table_cost[$i]) {
	  $shipping = $table_cost[$i+1];
	  break;
	}
  }

  if (MODULE_SHIPPING_DOMTABLE_MODE == 'weight') {
	$shipping = $shipping * $shipping_num_boxes;
  }

  $this->quotes = array('id' => $this->code,
						'module' => MODULE_SHIPPING_DOMTABLE_TEXT_TITLE,
						'methods' => array(array('id' => $this->code,
												 'title' => MODULE_SHIPPING_DOMTABLE_TEXT_WAY,
												 'cost' => $shipping + MODULE_SHIPPING_DOMTABLE_HANDLING)));

  if ($this->tax_class > 0) {
	$this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
  }

  if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);

  return $this->quotes;
}

function check() {
  if (!isset($this->_check)) {
	$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_DOMTABLE_STATUS'");
	$this->_check = tep_db_num_rows($check_query);
  }
  return $this->_check;
}

function install() {
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable International Table Method', 'MODULE_SHIPPING_DOMTABLE_STATUS', 'True', 'Do you want to offer international table rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('International Shipping Table', 'MODULE_SHIPPING_DOMTABLE_COST', '25:8.50,50:5.50,10000:0.00', 'The shipping cost is based on the total cost or weight of items. Example: 25:8.50,50:5.50,etc.. Up to 25 charge 8.50, from there to 50 charge 5.50, etc', '6', '0', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('International Table Method', 'MODULE_SHIPPING_DOMTABLE_MODE', 'weight', 'The shipping cost is based on the order total or the total weight of the items ordered.', '6', '0', 'tep_cfg_select_option(array(\'weight\', \'price\'), ', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_DOMTABLE_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_DOMTABLE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_DOMTABLE_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_DOMTABLE_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
}

function remove() {
  tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}

function keys() {
  return array('MODULE_SHIPPING_DOMTABLE_STATUS', 'MODULE_SHIPPING_DOMTABLE_COST', 'MODULE_SHIPPING_DOMTABLE_MODE', 'MODULE_SHIPPING_DOMTABLE_HANDLING', 'MODULE_SHIPPING_DOMTABLE_TAX_CLASS', 'MODULE_SHIPPING_DOMTABLE_ZONE', 'MODULE_SHIPPING_DOMTABLE_SORT_ORDER');
}
 }
?>

 

Then in includes/languages/your language folder (english, etc.)/modules/shipping create a new page named domtable.php with the following code (edit to suit your store):

 

<?php
/*
 $Id: domtable.php,v 1.5 2002/11/19 01:48:08 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('MODULE_SHIPPING_DOMTABLE_TEXT_TITLE', 'U.S. Territories');
define('MODULE_SHIPPING_DOMTABLE_TEXT_DESCRIPTION', 'Shipping to U.S.');
define('MODULE_SHIPPING_DOMTABLE_TEXT_WAY', 'Standard Delivery');
define('MODULE_SHIPPING_DOMTABLE_TEXT_WEIGHT', 'Weight');
define('MODULE_SHIPPING_DOMTABLE_TEXT_AMOUNT', 'Amount');
?>

 

Next, uninstall google checkout through your admin panel (copy and paste the info you've added somewhere so you can quickly repopulate the new install).

 

Uninstall your former table rate (copy your info again before you uninstall to paste into your new install)

 

Install your new domtable rate (you name it when you edited the domtable.php language file) and put the info from your previous table in.

 

Run the http://*****.com/catalog/googlecheckout/shipping_generator/shipping_method_generator.php in your browser. Generate the code.

 

Copy and paste that code into catalog/googlecheckout/shipping_methods.php (make sure there isnt a space after that last ?>, mine was adding a space there)

 

Now, reinstall google checkout through your admin and put all your info in you've copied from before.

 

This fixed the issue I was having with the regular table rate (based on weight) and I finally see the default rate box in google checkout in my admin panel. This should solve my issues with buyers checking out with free shipping.

Link to comment
Share on other sites

I realize we are all supporting this ourselves...however, I was just wondering if anyone else has the following issue and if you have been able to correct it.

 

When I ship an order and input the tracking number and shipper, then update to google shipped, nothing is sent to google if the customer already has an account (I still have to manually do it again in google checkout itself). If a customer did not already have an account with the site (new customer) the process works as it should and all information is sent to google and it archives correctly.

Link to comment
Share on other sites

Ok you can ignore most of my previous post. I have configured all the shipping options. The only problem remaining is the free shipping option. Has anyone managed to get this working?

 

Thanks

 

 

I just uploaded to the contributions section a new free amount package that adds the tax class and works with google checkout.

 

here is the link: http://addons.oscommerce.com/info/146

 

-Ryan

rkoechel2004

Link to comment
Share on other sites

what i did for a quick fix was to replace the checkout button with a tranparent pixcel so the button wasnt there any more forcing you to checkout wiht google have a look at www.swws.biz/swws1

 

Nice trick. I tried doing this and the Google Checkout button takes me right back to the shopping cart page. The button from the code in login.php does work, however. Anyone run into this problem?

Link to comment
Share on other sites

Hello,

 

I've a problem with Google Checkout impelemtation.

I've successfully installed gc module and "gc button" appears on shopping_card.php and post all information to gc if i press then i can make payment... but problem starts here, it does not notify osc about gc succesfull order... and order never appears on admin page.

 

 

how can i fix this?

Link to comment
Share on other sites

OK, so here's a fun one.

 

I have installed RC1 with GC 1.4.5a

 

I have also installed Simple Template System (STS) ver. 4.5.8

 

In a sandbox environment GC works as expected when STS is not in use.

 

When STS is enabled, upon completion of checkout and returning to the site, I get the following error from gc_return.php

 

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 ') and pd.products_id = p.products_id and pd.language_id = '1'' a

 

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from products p, products_description pd where p.products_status = '1' and p.products_id in () and pd.products_id = p.products_id and pd.language_id = '1'

 

[TEP STOP]

 

There are no errors in GC sandbox tools->integration console.

 

There are no errors in the logs.

 

User gets created and order gets back to OSC.

 

Do I have to use gc_return.php to finalize the emptying of the cart? If I use checkout_success.php the cart does not empty.

 

If I disable STS the error goes away.

 

I found a reply from Ropu a while back that talked about $data being changed to $gc_data to eliminate some conflicts.

 

Does anyone else know of what may be causing this issue?

 

Any help would be greatly appreciated.

 

Thanks in advance,

 

-Jim

 

If I find an answer I will post it here......

Link to comment
Share on other sites

I have installed the gogle checkout. But since I have done it so late in the day I will have to wait until Monday to find out what my banks number is to install on googles site. But I don't think this is what is causing my problem.

 

When I go to look at the response_error.log I get the following message:

 

Warning: googlecheckout(/www.mysite.com/catalog/googlecheckout//googlecheckout/shipping_methods.php): failed to open stream: No such file or directory in /www.mysite.com/catalog/includes/modules/payment/googlecheckout.php on line 44

 

Warning: googlecheckout(/www.mysite.com/catalog/googlecheckout//googlecheckout/shipping_methods.php): failed to open stream: No such file or directory in /www.mysite.com/catalog/includes/modules/payment/googlecheckout.php on line 44

 

Fatal error: googlecheckout(): Failed opening required '/www.mysite.com/catalog/googlecheckout//googlecheckout/shipping_methods.php' (include_path='.:/usr/local/lib/php:.:.') in /www.mysite.com/catalog/includes/modules/payment/googlecheckout.php on line 44

 

 

 

How do I track this down to reslove the problem?

Edited by ATise

Site is underconstruction I am always looking for good advice on how to improve my site fill free to comment.

Thanks! ATise

Link to comment
Share on other sites

help please! i've been developing a new site for a while and it was using google checkout 1.3 - everything was fine but tonight i decided to update to 1.4.5. i got as far as 1.4 and i "removed" the module in admin, but now when i try to put it back I get an error. I even went back to my backup of the site using 1.3 and it still says the same :-

 

1044 - Access denied for user 'user'@'localhost' to database 'database'

 

ALTER TABLE configuration CHANGE `configuration_value` `configuration_value` TEXT NOT NULL

 

[TEP STOP]

 

any advice please! how can I at least get back to a working installation!

 

trying to remove or install other modules works fine.

 

thanks

john

Edited by johnr3
Link to comment
Share on other sites

help please! i've been developing a new site for a while and it was using google checkout 1.3 - everything was fine but tonight i decided to update to 1.4.5. i got as far as 1.4 and i "removed" the module in admin, but now when i try to put it back I get an error. I even went back to my backup of the site using 1.3 and it still says the same :-

 

1044 - Access denied for user 'user'@'localhost' to database 'database'

 

ALTER TABLE configuration CHANGE `configuration_value` `configuration_value` TEXT NOT NULL

 

[TEP STOP]

 

any advice please! how can I at least get back to a working installation!

 

trying to remove or install other modules works fine.

 

thanks

john

 

Answering my own question here but removing the following line from the install function of /admin/modules.php made it work (line 230)

 

//tep_db_query("ALTER TABLE ". TABLE_CONFIGURATION ." CHANGE `configuration_value` `configuration_value` TEXT NOT NULL");

 

No idea why this line is causing the problem or whether it is bad to remove it?

 

thanks

John

Link to comment
Share on other sites

OK, so here's a fun one.

 

I have installed RC1 with GC 1.4.5a

 

I have also installed Simple Template System (STS) ver. 4.5.8

 

In a sandbox environment GC works as expected when STS is not in use.

 

When STS is enabled, upon completion of checkout and returning to the site, I get the following error from gc_return.php

 

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 ') and pd.products_id = p.products_id and pd.language_id = '1'' a

 

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from products p, products_description pd where p.products_status = '1' and p.products_id in () and pd.products_id = p.products_id and pd.language_id = '1'

 

[TEP STOP]

 

There are no errors in GC sandbox tools->integration console.

 

There are no errors in the logs.

 

User gets created and order gets back to OSC.

 

Do I have to use gc_return.php to finalize the emptying of the cart? If I use checkout_success.php the cart does not empty.

 

If I disable STS the error goes away.

 

I found a reply from Ropu a while back that talked about $data being changed to $gc_data to eliminate some conflicts.

 

Does anyone else know of what may be causing this issue?

 

Any help would be greatly appreciated.

 

Thanks in advance,

 

-Jim

 

If I find an answer I will post it here......

 

 

After many hours of research I have discovered that with the template system (STS 4.5.8) turned on, you cannot use the gc_return.php file that Google Checkout provides. Although calling that file works great in a standard osCommerce install, you have to use the checkout_success.php file to return to the site. While in a stock install, this file (checkout_success.php) does not empty the shopping cart after a successful checkout with google checkout - so you have to us gc_return.php - checkout_success.php works just fine with STS 4.5.8 enabled.

 

Best Regards,

 

-Jim

Link to comment
Share on other sites

I have just installed a fresh copy of osCommerce and installed the Google Checkout module v1.4.5_CCS. It appears fine in the backend and I have entered all the relevent settings. However Google Checkout does not appear as a payment option in the store frontend. Am I doing something wrong? I am completely new to osCommerce, so I may have omitted to do something to enable it. Any help or guidance would be much appreciated. Thanks.

Link to comment
Share on other sites

Hi

 

Can anyone tell me if they have this working correctly on a UK store?

 

For some reason when the order comes back to OSC it is put correctly in the database, but the item line doesnt include tax, so the price says price inc, price exc, total inc and total exc all at the same value, with the tax set to 0.00% (this is on the orders.php page in OSC admin) . However tax is added to the order with the subtotals and totals.

 

I can get around this by putting "All countries" into the european tax zone and taking it out of the rest of the world zone, but this is obviously incorrect as every country then gets charged VAT.

 

Any help anyone can give would be really appreciated.

 

Tony

Edited by goody974
Link to comment
Share on other sites

In order to contain all the support to one thread so I can accurately help those needing help with this module please post your support questions here and I will be more then happy to help you with this to best of my ability.

 

Contribution can be found below.

 

Google Checkout module for osCommerce

 

Current release is version 1.4 Dated 17 Jul 2007

 

Hi,

 

I have installed the latest version of the google checkout contribution: http://www.oscommerce.com/community/contri...Google+Checkout in my site. But when clicking to the google checkout button from the front end it is taking me to the https://checkout.google.com with the following error:

 

"Oops!

Shop559 has sent Google a shopping cart with errors in it. We'll contact them to ask that they fix this problem. As this could be a temporary issue, you can go back in your browser to try checking out again."

 

Can anybody help me out how this error can be resolved or what is causing the error.

 

Thanks!

Link to comment
Share on other sites

Seems that everything is mostly fine here....

 

However in the Admin panel, I cannot get my changes to google Checkout to save after I update the fields with my Google merchant ID, etc. When I hit update, it just goes back to the default values, as if I hadn't changed anything...

 

any ideas?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...