OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Offical Google Checkout module for osCommerce Support Thread
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Payment Modules > Other
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Silverado05
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
i960
Continuing from the previous thread.

I found a new potential issue. In looking at the osCommerce documentation, I found this note:

QUOTE
Sessions

Customers on AOL cannot use your store with these all set to "True". The only two that
can be set to "True" for aol users are "Force Cookie Use" and "Prevent Spider Sessions".


Does this mean having "Check SSL Session ID" set to true is going to cause problems for my aol customers? We have quite a few of them.
i960
I also found this page that better explains what each setting does:

http://www.oscommerce.info/kb/osCommerce/D...plementations/4

Seems to me that ideal settings would be "Force Cookie Use" to True (I don't want anyone to have session id's in the URL for privacy/security reasons) and "Check SSL Session ID" to False (So there are no issues with AOL or weird browsers that don't support it). But obviously that isn't going to work with Google Checkout. I also ran across this old thread:

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

Doesn't seem like anyone found a solution to AOL being blocked. Also, seeing as it's from 2003, it's possible that AOL is now using a browser that will work just fine. I just have no way of testing that.
i960
Well, after more testing, I realized that even if my browser accepts cookies, as soon as I hit any of the secure pages, the session ID is appended to the URL. That is something I do not want. Setting "Force Cookie Use" to True solves that problem, but then Google Checkout stops working. There has got to be another way to do this.
Navidjun
Hi ,

I have Google checkout installed and it works great, but ...
It does not get the shipping rates from the usps method 2.8 .... it just shows all zeros fo all the shipping options at the google checkout site, even though on OSC itself it shows the correct prices. so my costumers get zero shipping cost.
can you please help

for now I've stopped usps and I'm using the table rate ythat does work with GCO.

tahnks :rolleyes:
Silverado05
QUOTE (i960 @ Aug 11 2007, 01:47 PM) *
Well, after more testing, I realized that even if my browser accepts cookies, as soon as I hit any of the secure pages, the session ID is appended to the URL. That is something I do not want. Setting "Force Cookie Use" to True solves that problem, but then Google Checkout stops working. There has got to be another way to do this.


That is a development issue that will need to be addressed with the author of the mod. I told him I would help him with support issues here, but development issues of that magnitude will need to be addressed with him at his board.


http://groups.google.com/group/google-chec...-support/topics


I wish I could help you more with that but that is out of my power.
Silverado05
QUOTE (Navidjun @ Aug 11 2007, 05:20 PM) *
Hi ,

I have Google checkout installed and it works great, but ...
It does not get the shipping rates from the usps method 2.8 .... it just shows all zeros fo all the shipping options at the google checkout site, even though on OSC itself it shows the correct prices. so my costumers get zero shipping cost.
can you please help

for now I've stopped usps and I'm using the table rate ythat does work with GCO.

tahnks rolleyes.gif



What is the error you are getting from Google in your settings integration? It is probably a time out issue, do you have long descriptions be passed to google? Also what version are you using?
i960
QUOTE (Silverado05 @ Aug 11 2007, 06:36 PM) *
That is a development issue that will need to be addressed with the author of the mod. I told him I would help him with support issues here, but development issues of that magnitude will need to be addressed with him at his board.
http://groups.google.com/group/google-chec...-support/topics
I wish I could help you more with that but that is out of my power.


That's what I figured. I guess the logic would be to force cookie use for customers and search spiders, but not force it for Google Checkout. I noticed in posts on the google groups board that he's been recommending people set Force Cookie Use to false in order to get GC working. I'm going to dig into how the force cookie use option actually works and see if I can come up with something. I guess the first step is to figure out what Google Checkout is identifying itself as. I'm guessing it's 'jakarta', as that is what the documentation says to make sure is not in spiders.txt.
i960
Interesting info on what 'jakarta' actually is: http://en.wikipedia.org/wiki/Jakarta_Project

I'm guessing Google is using that to implement Google Checkout on their side.
i960
Here is the code in application_top.php that starts the session, based on the session settings in Admin:

CODE
// start the session
$session_started = false;
if (SESSION_FORCE_COOKIE_USE == 'True') {
tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);

if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
tep_session_start();
$session_started = true;
}
} elseif (SESSION_BLOCK_SPIDERS == 'True') {
$user_agent = strtolower(getenv('HTTP_USER_AGENT'));
$spider_flag = false;

if (tep_not_null($user_agent)) {
$spiders = file(DIR_WS_INCLUDES . 'spiders.txt');

for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
if (tep_not_null($spiders[$i])) {
if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
$spider_flag = true;
break;
}
}
}
}

if ($spider_flag == false) {
tep_session_start();
$session_started = true;
}
} else {
tep_session_start();
$session_started = true;
}


If my thinking is correct, it should be possible to test the user_agent string for whatever Google Checkout is calling itself (jakarta or otherwise) and allow the session to be started if it is Google Checkout accessing the site. I will see what I can come up with and post my findings. The only way I can see this not working is if Google Checkout changes it's user_agent string every once in awhile. If that's the case, then maybe setting up a file similar to spiders.txt and keeping a list of all know user_agent strings for Google Checkout would help with that.
i960
It works!!! Through testing I was able to find out that Google Checkout is reporting itself as 'google checkout notification agent 1.0'. I'll post again in a few minutes showing what I did to make it work.
i960
Alright, here's how to make this work.

STEP 1:
Create a file called 'gc_user_agent.txt' and place it in your /catalog/includes/ directory. It should be in the same place as spiders.txt. Add the following to this file and save it:

QUOTE
google checkout notification agent 1.0


STEP 2:
Open 'application_top.php'

Search for the following:

CODE
if (SESSION_FORCE_COOKIE_USE == 'True') {
tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);

if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
tep_session_start();
$session_started = true;
}



And replace it with this:

CODE
if (SESSION_FORCE_COOKIE_USE == 'True') {
$user_agent = strtolower(getenv('HTTP_USER_AGENT'));
$gc_flag = false;

if (tep_not_null($user_agent)) {
$gc_user_agent = file(DIR_WS_INCLUDES . 'gc_user_agent.txt');

for ($i=0, $n=sizeof($gc_user_agent); $i<$n; $i++) {
if (tep_not_null($gc_user_agent[$i])) {
if (is_integer(strpos($user_agent, trim($gc_user_agent[$i])))) {
$gc_flag = true;
break;
}
}
}
}

if ($gc_flag == true) {
tep_session_start();
$session_started = true;
} else {
tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);
if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
tep_session_start();
$session_started = true;
}
}


Make sure you check to see that your original code in 'application_top.php' is the same as mine. The code I listed is from a stock install of 2.2 RC1, but it should be the same in MS2. If yours was modified for whatever reason, you'll need to figure out what to do with the new code to make it work.

STEP 3:
Set 'Force Cookie Use' and 'Prevent Spider Sessions' in Admin to TRUE. Everything else should be FALSE.

That's it! Now you can force the usage of cookies for regular visitors, prevent search spiders from creating sessions, and allow Google Checkout to recreate the session it needs in order to update admin and empty the shopping cart. One thing to keep in mind is that I have no idea if Google will change the user agent string or how often. That is why I placed it in 'gc_user_agent.txt' to allow for easy updates if/when necessary. If I find that Google does change the user agent, then maybe it would be good to write some sort of script that captures the user agent string when Google connects to responsehandler.php and updates the 'gc_user_agent.txt' file automatically.
Navidjun
QUOTE (Silverado05 @ Aug 11 2007, 09:39 PM) *
What is the error you are getting from Google in your settings integration? It is probably a time out issue, do you have long descriptions be passed to google? Also what version are you using?


I don't get any errors , I just see zeros for the all the shipping options, it seems GCO retrives the shipping options , but not the pricing for them.
i960
Looks like there is another potential solution to the problem I was having. I found it in the Google Groups, but the thread title was highly misleading. It was suggested over there that you could redefine the Prevent Spider Sessions setting for responsehandler.php only. Here's a quote of what was said over there:

QUOTE
Instead open up googlecheckout/responsehandler.php and find this line:

define('MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET', 'False');

Immediately below it add this:

define('SESSION_BLOCK_SPIDERS','False');

This will disable "Prevent Spider Sessions" for responsehandler.php
while leaving the setting as is for the rest of your store.


Ropu responded by saying that would throw up a warning, and suggested adding this to prevent the warning from appearing:

error_reporting(0);

I haven't tested this yet, but I do have an observation. From looking at the code, it's quite obvious that the "Prevent Spider Sessions" option has no effect whatsoever on Google Checkout, as long as 'google checkout notification agent 1.0' is not in your spiders.txt file. In fact, if you have "Force Cookie Use" set to TRUE, then the code behind "Prevent Spider Sessions" doesn't even run. Up to this point the real solution to getting GC to work is to set "Force Cookie Use" to FALSE, but that is a terrible solution for many reasons. That option should always be set to TRUE if possible. So the solution is to set it to FALSE only in responsehandler.php. That can be done just the same as was suggested for "Prevent Spider Sessions", like this:

1.) Open up resonsehandler.php

2.) Search for error_reporting(E_ALL); and change it to error_reporting(0);

3.) Search for define('MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET', 'False');

4.) Immediately below it add this: define('SESSION_FORCE_COOKIE_USE', 'False');


I have not tested this at all, but it appears to be a better solution than what I came up with, because it does not rely on knowing what the user agent is for Google Checkout. The only thing that should ever be connecting to responsehandler.php is Google Checkout, so there are no worries about starting a session for a search spider or anything like that. In fact, if you have it properly password protected via .htaccess, nothing else can get to it. I will test this out to see if it works. If so, then I will recommend using this solution instead of my previous one.
i960
Ok, testing complete! The solution in my post immediately above works perfectly. As such, I no longer recommend using the solution I posted previously. While the previous solution does indeed work, this new solution works just as well, is easier to implement, and doesn't rely on knowing the user agent for Google Checkout.
i960
Preliminary testing shows that this fix also works for Google Checkout v1.3RC2. In other words, it's now working on my production site. biggrin.gif
theantiquestore
I have a very dumb question, and I apologize for it in advance.

It seems I've been working to the point that I can no longer think rationally.

I've installed the v1.4 beta and somehow I've done something wrong and cant seem to figure out where my issue lies.

While I do see the googlecheckout payment module in the admin, when I click install nothing happens.

I've uploaded the googlecheckout.php file to includes/modules/payment. Looked over my code in admin/modules.php and so on, but I cant find the bugger thats causing this.

I have the catalog installed in the root, so there is no catalog/ in my site (if that makes any difference at all)

I am sure there is one simple place where I can find the problem, I am sure I am just overlooking the obvious, but I need a hint on where I should be looking for this from anyone who would be so kind as to assist me.

Thank you in advance for your help, I'll keep plugging away on it in the meantime.
theantiquestore
forget it, I knew I would find my mistake as soon as that edit button was no longer available! I edited the wrong functions/general file...duh! wink.gif
theantiquestore
ok, install is still not working, I'm dumbfounded! Any suggestions?
Silverado05
QUOTE (Navidjun @ Aug 12 2007, 02:27 AM) *
I don't get any errors , I just see zeros for the all the shipping options, it seems GCO retrives the shipping options , but not the pricing for them.



What shipping modules are you using and what is the version of Google Checkout are you using?
Silverado05
QUOTE (theantiquestore @ Aug 12 2007, 03:46 PM) *
ok, install is still not working, I'm dumbfounded! Any suggestions?


Go into your Databases Configuration_Table and look for all Google Checkout references and delete them.
theantiquestore
QUOTE (Silverado05 @ Aug 12 2007, 11:25 PM) *
Go into your Databases Configuration_Table and look for all Google Checkout references and delete them.



There are no references to google in my database. I must have missed something. I'll look at it with fresh eyes today.
doni
Hi Nick

My problem was :

QUOTE(doni @ Aug 9 2007, 04:45 AM)

I have installed the latest contribution, and have the following errors :

Warning: getxml(xml-processing/xmlbuilder.php): failed to open stream: No such file or directory in /mysite/googlecheckout/library/googlecart.php on line 232

Fatal error: getxml(): Failed opening required 'xml-processing/xmlbuilder.php' (include_path='') in /mysite/googlecheckout/library/googlecart.php on line 232

... at the point where I enter the Checkout Page (with items in my cart), and below the "- or Use -" text.

I used to see this code sometimes in the past, and if I refreshed the page, the GC button would usually appear. I have actually processed an order using GC. But now, this text always appears, and NO GC buttone ever appears even when I refresh the page.

Anyone any guidance on what I should do, or generally what this error means?


___________

AND YOU ASKED FOR MY SHOPPING CART, WHICH IS :
___________


<?php
/*
$Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $

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

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

require("includes/application_top.php");

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_cart.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
if ($cart->count_contents() > 0) {
?>
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_REMOVE);

$info_box_contents[0][] = array('params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_PRODUCTS);

$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_QUANTITY);

$info_box_contents[0][] = array('align' => 'right',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_TOTAL);

$any_out_of_stock = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// Push all attributes information in an array
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
while (list($option, $value) = each($products[$i]['attributes'])) {
echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . $products[$i]['id'] . "'
and pa.options_id = '" . $option . "'
and pa.options_id = popt.products_options_id
and pa.options_values_id = '" . $value . "'
and pa.options_values_id = poval.products_options_values_id
and popt.language_id = '" . $languages_id . "'
and poval.language_id = '" . $languages_id . "'");
$attributes_values = tep_db_fetch_array($attributes);

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
$products[$i][$option]['options_values_id'] = $value;
$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
}
}
}

for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (($i/2) == floor($i/2)) {
$info_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$info_box_contents[] = array('params' => 'class="productListing-odd"');
}

$cur_row = sizeof($info_box_contents) - 1;

$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

if (STOCK_CHECK == 'true') {
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
if (tep_not_null($stock_check)) {
$any_out_of_stock = 1;

$products_name .= $stock_check;
}
}

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
}
}

$products_name .= ' </td>' .
' </tr>' .
'</table>';

$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
'text' => $products_name);

$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}

new productListingBox($info_box_contents);
?>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
</tr>
<?php
if ($any_out_of_stock == 1) {
if (STOCK_ALLOW_CHECKOUT == 'true') {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>
</tr>
<?php
} else {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
$back = sizeof($navigation->path)-2;
if (isset($navigation->path[$back])) {
?>
<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>
<?php
}
?>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></form></td>
</tr>
<tr>
<td>
<?php
// ** GOOGLE CHECKOUT **
// Checks if the Google Checkout payment module has been enabled and if so
// includes gcheckout.php to add the Checkout button to the page
if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') {
include_once('googlecheckout/gcheckout.php');
}
// ** END GOOGLE CHECKOUT **
?>
</td>
</tr>
<?php
} else {
?>

<tr>
<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
}
?>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
_______

and any help would be fabulous.
otsmith1
Hello there, I'd appreciate an answer on this if someone out there can help me.

I've just installed v1.4beta1 but I'm in the UK and can't seem to get it to add VAT (17.5%) on my taxable products.

Can anybody point me to the file to edit?

Cheers thumbsup.gif
theantiquestore
Ok, the issue seemed to be with my edits to admin/modules.php. I went line by line and saw that I didnt actually have any other code changes from the original osc modules.php so I just used the file from the contrib. It's installed now.

Thanks for tolerating me on that one!
theantiquestore
Thank you so much to everyone who has participated in the creation of this module! I really appreciate all your hard work! I have it installed and it appears to be working well, even with USPS calculated rates.

That being said, is there a way to have the shipping order sorted by highest to lowest in the google checkout? I was looking for a sort order or a < or > and didnt see it. Perhaps I'm not looking in the right place.

I have a free pickup module in my shipping and I dont want to have every customer just going through checkout without selecting the correct shipping method and having to invoice them for the difference because they didnt read. I would prefer to have the highest shipping charge shown first, it will give them some incentive to select the correct option.

Thanks again!
tiernanc
This is largely unrelated to the above posts, but I also suffered from $0 shipping rate quotes in Google Checkout using merchant calculated rates. I had the UPS XML module installed and the Google Checkout 1.4beta contribution. The error I found was that UPS XML redeclared a class XMLParser which threw a fatal error and sent no response to Google.
For anyone using UPS XML rates this is an easy fix. Simply open /includes/classes/xmldocument.php and rename XMLParser to upsXMLParser, and rename the appropriate calls to it in /includes/modules/shipping/upsxml.php. There are only two calling for a new XMLParser, change them to upsXMLParser. I am not sure whether other contributions have dependencies on the xmldocument class file. If they do this might require a more severe modification but this is the solution that worked for me.

The usual cause for $0 shipping rates are a) Request Timeout [We timed out...], b) Force Cookies is True [HTTP 500: Shopping cart not obtained from session] (without the above workaround), c) PHP errors are being sent back to Google [Error parsing XML...], d) nothing is being sent back to Google due to a fatal error without display errors being turned on [Your server returned no data in response..].
While debugging I recommend adding ini_set('display_errors', 1); near the top of /googlecheckout/responsehandler.php if you are using a secure server that does not display errors normally. This will allow you to view any errors created in the Google Checkout (Sandbox hopefully) Integration Center under settings.

I hope this helps someone
theantiquestore
For some reason, since this install my cart link now shows (1) $0.00 all the time, when its empty and adds 1 to the number of items in the cart when it does have something in it. Is there something I need to change in that code to fix this?

CODE
<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'); ?>" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?>&nbsp;(<?=$cart->count_contents()?>)&nbsp;<?= $currencies->format($cart->show_total())?>


Also, I was wondering if I have worldwide shipping available (USPS module) will all countries (who can use google checkout) be able to checkout through google or do I need to edit the code to allow this. I looked over the code and it appeared to be allowing "all" to checkout, but I wanted to be sure.
Silverado05
QUOTE (otsmith1 @ Aug 13 2007, 10:02 AM) *
Hello there, I'd appreciate an answer on this if someone out there can help me.

I've just installed v1.4beta1 but I'm in the UK and can't seem to get it to add VAT (17.5%) on my taxable products.

Can anybody point me to the file to edit?

Cheers thumbsup.gif


Not being from the UK I am not sure how your tax works. Do you have your Zones set up correctly in your OSC Admin?
Silverado05
QUOTE (theantiquestore @ Aug 13 2007, 11:11 AM) *
For some reason, since this install my cart link now shows (1) $0.00 all the time, when its empty and adds 1 to the number of items in the cart when it does have something in it. Is there something I need to change in that code to fix this?

CODE
<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'); ?>" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?>&nbsp;(<?=$cart->count_contents()?>)&nbsp;<?= $currencies->format($cart->show_total())?>


Also, I was wondering if I have worldwide shipping available (USPS module) will all countries (who can use google checkout) be able to checkout through google or do I need to edit the code to allow this. I looked over the code and it appeared to be allowing "all" to checkout, but I wanted to be sure.


About your cart showing 1 item but $0.00 that is probably due to you doing a lot of testing under the same using during one session. Just run a test order on with your normal OSC checkout process. Don't add anything else to the cart and do try to remove it. This is one reason I have the contribution "Fax or Phone your Order" because you can easily use it for test orders and then delete it from the admin and if you don't want to offer that payment method then you can disable it and just use it for testing.

If you have your USPS module set up for worldwide shipping and you have it set in your shipping_methods.php then you should be good to go. Only way to test this though is to make a couple of sandbox buyer accounts from different places around the world and make sure it is working correctly.
Silverado05
QUOTE (doni @ Aug 13 2007, 09:39 AM) *
Hi Nick

My problem was :

QUOTE(doni @ Aug 9 2007, 04:45 AM)

I have installed the latest contribution, and have the following errors :

Warning: getxml(xml-processing/xmlbuilder.php): failed to open stream: No such file or directory in /mysite/googlecheckout/library/googlecart.php on line 232

Fatal error: getxml(): Failed opening required 'xml-processing/xmlbuilder.php' (include_path='') in /mysite/googlecheckout/library/googlecart.php on line 232

... at the point where I enter the Checkout Page (with items in my cart), and below the "- or Use -" text.

I used to see this code sometimes in the past, and if I refreshed the page, the GC button would usually appear. I have actually processed an order using GC. But now, this text always appears, and NO GC buttone ever appears even when I refresh the page.

Anyone any guidance on what I should do, or generally what this error means?
___________

AND YOU ASKED FOR MY SHOPPING CART, WHICH IS :
___________



I don't know why I asked you for your shopping_cart.php must have been late and I was tired because if you are getting that error then the button code is in place.

What version are you using and have you installed anything else after GC? I have seen this error before and sometimes it is because of Google because these buttons are generate from the Google server. In your case though I don't think this is because of Google, I think you have changed a setting someone that is throwing this error. So double checkout your installation and make sure you have all the correct files uploaded.
doni
QUOTE (Silverado05 @ Aug 13 2007, 08:43 PM) *
I don't know why I asked you for your shopping_cart.php must have been late and I was tired because if you are getting that error then the button code is in place.

What version are you using and have you installed anything else after GC? I have seen this error before and sometimes it is because of Google because these buttons are generate from the Google server. In your case though I don't think this is because of Google, I think you have changed a setting someone that is throwing this error. So double checkout your installation and make sure you have all the correct files uploaded.



Nick - I am dumbfounded by this.

Here is what I tried this morning.

1. added an item to my basket.
2. At the shopping cart page I actually saw the button.
3. I pressed F5, and the error occurred, showing the text I had previously previously quoted
4. I pressed the F5 button six more times, and the error was still there, but on the 7th occassion, the button appeared!
5. I kept pressing the F5 button, and the button appears randmonly, but on average after about 8-9 re-fresh, and on every other occasion, there errior is apparent.

It therefore appears to me, that I have installed this correctly, but something is unstable, but I have no idea what this might be?
otsmith1
QUOTE (Silverado05 @ Aug 13 2007, 03:30 PM) *
Not being from the UK I am not sure how your tax works. Do you have your Zones set up correctly in your OSC Admin?


Spot on, that worked. Thanks for your help.
Silverado05
QUOTE (doni @ Aug 14 2007, 03:08 AM) *
Nick - I am dumbfounded by this.

Here is what I tried this morning.

1. added an item to my basket.
2. At the shopping cart page I actually saw the button.
3. I pressed F5, and the error occurred, showing the text I had previously previously quoted
4. I pressed the F5 button six more times, and the error was still there, but on the 7th occassion, the button appeared!
5. I kept pressing the F5 button, and the button appears randmonly, but on average after about 8-9 re-fresh, and on every other occasion, there errior is apparent.

It therefore appears to me, that I have installed this correctly, but something is unstable, but I have no idea what this might be?


Yea that is weird. You do have it installed correctly or you wouldn't be getting any errors or button at all.

What version are you using?

Also have you looked to see if any errors are showing up in your error log and on the settings page under integration on the Google Checkout side?
doni
QUOTE (Silverado05 @ Aug 14 2007, 10:54 PM) *
Yea that is weird. You do have it installed correctly or you wouldn't be getting any errors or button at all.

What version are you using?

Also have you looked to see if any errors are showing up in your error log and on the settings page under integration on the Google Checkout side?


1. Using 1.4 beta

2. Guess what - my "F5 refresh hit rate" (when I observe the Google Checkout buttone, compared to seeing the error), has improved to about 5 in 8 (from 1 in 8 yesterday).

3. I cannot locate any error files on the Google side.

4. The only error files I have on my side is "Failed to Get Basic Authentication Headers" when I ran https://mysite/googlecheckout/responsehandler.php. I had investigated this in the past, in a post rpou was having with someone else, and he suggested invoking the htaccess.php file to create the .htaccess and .htpasswd files in Googlecheckout/, but this has no effect on whether the button show or not, so I removed the .htaccess and .htpasswd files and re-set back to using without this.

5. This next point is very interesting : When I run the Shipping_Generator file, sometimes I get :

Warning: main(multishipping_generator.php): failed to open stream: No such file or directory in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

Warning: main(): Failed opening 'multishipping_generator.php' for inclusion (include_path='') in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

... and sometimes, when I refresh F5, I get the correct table showing.

6. On the face of it, it seems to me that I am having some kind of resource issues here, where the files cannot complete a task, but I have ample server space, and the traffic is very low at this time of year, so I don't think the resource issue is coming from my side. (i.e. Without GC, we can process order through HSBC fine).

I think I am very stuck.
Silverado05
I am not sure what to tell you honestly. If it works sometimes but not others it is probably a Google error. I would try contact them through their support and tell them the issue. or reach Ropu on his support forum since he is the Author of the module he might be able to help you further.
doni
Yes - it is a tricky one isn't it.

Thanks for all your time on these boards supporting people.
doni
As an aside - is there a way that I can hide this Warning while I figure out why this isn't working.

i.e. - if the Google button only show 40% of the time, when the "Failed to Open" error text occurs on the other 60% of the time, can I NOT show this text somehow? The problem is, when the button doesn't show, and the error appears, it looks like the whole website is faulty ...

Even better, if the error occurs, instead of displaying the "Failed to Open" error text, is there a way I can replace this with (e.g.) "Please refresh screen for Google Checkout options" instead - this would at least inform the buyer that they have a Google Checkout option, and they need to refresh the screen in order to use that method ...
kryptoni
PROBLEM: UPS XML Rates not being sent to Google Checkout!

The module works fine in OSC checkout. I get the rate quotes, etc. However, when I use Google Checkout it lists the UPS shipping options properly but list a $0 charge for all of them! I already searched the forums and can't find anything on this issue. I already ran the Google Shipping Generator and modified the code as needed in the Google Checkout contribution. Any ideas ???

Thanks!

To see issue - Visit My Website
DriWashSolutions
I've just had my site moved to a new server, and GC is giving me issues. No visible errors to the user, but all shipping is $0.00. I am using FedEx shipping.

Looking at the GC Integration control panel, here is the error:

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.

What's the fix? I'm running a rather old version of GC - is the fix an upgrade or does something on the server need to be started/installed?
kryptoni
QUOTE (DriWashSolutions @ Aug 15 2007, 05:26 PM) *
I've just had my site moved to a new server, and GC is giving me issues. No visible errors to the user, but all shipping is $0.00. I am using FedEx shipping.

Looking at the GC Integration control panel, here is the error:

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.

What's the fix? I'm running a rather old version of GC - is the fix an upgrade or does something on the server need to be started/installed?


interesting... I'm running the newest version available and still get the $0 price feeds from UPS XML
WINGMAN
I have two problems.

First, no shipping will be applied to use google checkout. It is always zero. Even I set per item price. It is still zero.

Second, about the usps shipping the webpage http://www.uspsprioritymail.com/et_regcert.html doesn't exist any more. Anyone has an ideal how to register for the production account.

Thank you very much.

BTW, if I use paypal checkout, the shipping is alright.
Silverado05
QUOTE (doni @ Aug 15 2007, 07:11 AM) *
Even better, if the error occurs, instead of displaying the "Failed to Open" error text, is there a way I can replace this with (e.g.) "Please refresh screen for Google Checkout options" instead - this would at least inform the buyer that they have a Google Checkout option, and they need to refresh the screen in order to use that method ...


Their might be but I don't know about it. That is a very good idea for it to have a customized default error message instead of the generic. I will get back to you on that and let me look at the files and see if their is a debug option in the code that can be comment out. Seeing that these buttons are generate from Google most of these errors come from Google.
Silverado05
Ok for everyone have shipping problems do this for me.

try adding
print_r($directory_array);

to gcheckout.php line 311

and
print_r($module_info);

in line 356

send me the results u should see in any page where the GC button appears.


QUOTE
Second, about the usps shipping the webpage http://www.uspsprioritymail.com/et_regcert.html doesn't exist any more. Anyone has an ideal how to register for the production account.


As far as the link goes it still works, I just tried it and took me straight to the page.
kryptoni
QUOTE (Silverado05 @ Aug 15 2007, 04:00 PM) *
Ok for everyone have shipping problems do this for me.

try adding
print_r($directory_array);

to gcheckout.php line 311

and
print_r($module_info);

in line 356

send me the results u should see in any page where the GC button appears.
As far as the link goes it still works, I just tried it and took me straight to the page.


Array ( [0] => fedex1.php [1] => flat.php [2] => item.php [3] => table.php [4] => upsxml.php [5] => usps.php ) Array ( [fedex1] => Array ( [code] => 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 ) [flat] => Array ( [code] => flat [title] => Flat Rate [description] => Flat Rate [status] => 1 ) [table] => Array ( [code] => table [title] => Table Rate [description] => Table Rate [status] => 1 ) [upsxml] => Array ( [code] => upsxml [title] => United Parcel Service (XML) [description] => United Parcel Service (XML) [status] => 1 ) )
WINGMAN
QUOTE (Silverado05 @ Aug 15 2007, 04:00 PM) *
Ok for everyone have shipping problems do this for me.

try adding
print_r($directory_array);

to gcheckout.php line 311

and
print_r($module_info);

in line 356

send me the results u should see in any page where the GC button appears.
As far as the link goes it still works, I just tried it and took me straight to the page.


WOW, thank you Silverado05,

I did not expect this lighting fast reply.

While, I did exactly what you said. I add those two lines into the bland lines in the gcheckout.php. (311, 356), it still doesn't solve the problem
In stead, when I click the cart button, it shows "Array ( ) Array ( ) " at the left side of the google checkout button.

It is a completely new web. I just replaced some icons. Nothing else had been changed.

Thank you
WINGMAN
QUOTE (doni @ Aug 15 2007, 04:50 AM) *
1. Using 1.4 beta

2. Guess what - my "F5 refresh hit rate" (when I observe the Google Checkout buttone, compared to seeing the error), has improved to about 5 in 8 (from 1 in 8 yesterday).

3. I cannot locate any error files on the Google side.

4. The only error files I have on my side is "Failed to Get Basic Authentication Headers" when I ran https://mysite/googlecheckout/responsehandler.php. I had investigated this in the past, in a post rpou was having with someone else, and he suggested invoking the htaccess.php file to create the .htaccess and .htpasswd files in Googlecheckout/, but this has no effect on whether the button show or not, so I removed the .htaccess and .htpasswd files and re-set back to using without this.

5. This next point is very interesting : When I run the Shipping_Generator file, sometimes I get :

Warning: main(multishipping_generator.php): failed to open stream: No such file or directory in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

Warning: main(): Failed opening 'multishipping_generator.php' for inclusion (include_path='') in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

... and sometimes, when I refresh F5, I get the correct table showing.

6. On the face of it, it seems to me that I am having some kind of resource issues here, where the files cannot complete a task, but I have ample server space, and the traffic is very low at this time of year, so I don't think the resource issue is coming from my side. (i.e. Without GC, we can process order through HSBC fine).

I think I am very stuck.



I just saw this post. I followed it and run the responsehandler.php

I got a smilar error

Warning:

googlecheckout(/mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/googlecheckout/includes/languages/english/modules/payment/googlecheckout.php) [
function.googlecheckout]: failed to open stream: No such file or directory in /mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/includes/modules/payment/googlecheckout.php on line 38

Fatal error:

googlecheckout() [function.require]: Failed opening required '/mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/googlecheckout/includes/languages/english/modules/payment/googlecheckout.php' (include_path='.:/usr/local/nf/lib/php:.:.') in /mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/includes/modules/payment/googlecheckout.php on line 38

Anyone can help me figure out the reason?

Thank you in advance.
DriWashSolutions
QUOTE (Silverado05 @ Aug 15 2007, 08:00 PM) *
Ok for everyone have shipping problems do this for me.

try adding
print_r($directory_array);

to gcheckout.php line 311

and
print_r($module_info);

in line 356

send me the results u should see in any page where the GC button appears.
As far as the link goes it still works, I just tried it and took me straight to the page.


here's mine:

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

The print statement at line 356 is in the middle of a block of code - not sure it's the right spot for that. BTW, I'm using 1.3RC2
DriWashSolutions
Just up-degraded from 1.3RC2 to 1.4 and am getting the following errors when viewing the shopping cart:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

- Or use -

What is Google Checkout?
* The Version of the installed module in the Admin UI is MODULE_PAYMENT_GOOGLECHECKOUT_VERSION and the one of the package is GOOGLECHECKOUT_FILES_VERSION, Remove/Reinstall the module
DriWashSolutions
QUOTE (DriWashSolutions @ Aug 15 2007, 10:32 PM) *
Just up-degraded from 1.3RC2 to 1.4 and am getting the following errors when viewing the shopping cart:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

- Or use -

What is Google Checkout?
* The Version of the installed module in the Admin UI is MODULE_PAYMENT_GOOGLECHECKOUT_VERSION and the one of the package is GOOGLECHECKOUT_FILES_VERSION, Remove/Reinstall the module


Disregard this one - got it figured out and am now running v1.4

however, shipping is now (--) in the GCO page.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.