Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Offical Google Checkout module for osCommerce Support Thread


Silverado05

Recommended Posts

Thanks so much for the login response.

 

I've run the shipping generator and entered the new code. When I go to test it out, I am getting the messagea at checkout that says "seller does not ship to Canada". Is there some step I am missing?

 

(Sorry if this is a basic question)

 

Thanks.

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Also wanted to add:

 

When I go back and see if something is wrong with what I have entered in payments>googlecheckout, it is showing "Zone Rates zones not configured", however I do have that all set up and functioning (it worked with paypal).

Link to comment
Share on other sites

Thanks so much for the login response.

 

I've run the shipping generator and entered the new code. When I go to test it out, I am getting the messagea at checkout that says "seller does not ship to Canada". Is there some step I am missing?

 

(Sorry if this is a basic question)

 

Thanks.

Are you using the flat rate table? If you are, try to remove the Canada code in the international part of shipping_methods.php

Link to comment
Share on other sites

Are you using the flat rate table? If you are, try to remove the Canada code in the international part of shipping_methods.php

 

This is my shipping_methods.php:

 

<?php

/**

* File: googlecheckout/shipping_methods.php file

*/

$mc_shipping_methods = array(

'table' => array(

'domestic_types' =>

array(

'table' => 'First Class Mail',

 

),

 

'international_types' =>

array(

'zones' => 'Zone Rates',

 

),

),

'flat' => array(

'domestic_types' =>

array(

'flat' => 'USPS Priority Mail with package tracking.',

 

),

 

'international_types' =>

array(

 

),

),

'ups' => array(

'domestic_types' =>

array(

'1DA' => 'Next Day Air',

'2DA' => '2nd Day Air',

'3DS' => '3 Day Select',

'GND' => 'Ground',

 

),

 

'international_types' =>

array(

 

),

),

);

 

$mc_shipping_methods_names = array(

'table' => 'First Class Mail',

'flat' => 'USPS Priority Mail',

'ups' => 'United Parcel Service (1)',

);

?>

Link to comment
Share on other sites

Remove CA from the 'Zone 1 Countries' in your Zone Rates module and add:

 

'zones' => 'Zone Rates',

 

like this:

 

$mc_shipping_methods_names = array(

'table' => 'First Class Mail',

'flat' => 'USPS Priority Mail',

'ups' => 'United Parcel Service (1)',

'zones' => 'Zone Rates',

 

);

 

Then test it, if it runs good then add CA back in and retest it.

Edited by speed777
Link to comment
Share on other sites

Remove CA from the 'Zone 1 Countries' in your Zone Rates module and add:

 

'zones' => 'Zone Rates',

 

like this:

 

$mc_shipping_methods_names = array(

'table' => 'First Class Mail',

'flat' => 'USPS Priority Mail',

'ups' => 'United Parcel Service (1)',

'zones' => 'Zone Rates',

 

);

 

Then test it, if it runs good then add CA back in and retest it.

 

Did the trick! Thanks!

Link to comment
Share on other sites

I just installed this and am trying to edit the settings under the payment module. However every time I click the edit button the page reloads but it does not take me to the edit screen. Just the screen I previously was on.

 

I know this is probably a dumb question but I've looked around and cannot find any answer. So any help you guys can provide would be greatly appreciated.

Link to comment
Share on other sites

No edit button? Anyway...

 

I installed a template while I was waiting for a response and now there's error code that goes along with the above.

 

When I click edit on the google checkout payment module I get this error:

 

Fatal error: Call to undefined function gc_cfg_select_shipping() in /hermes/bosweb/web185/b1853/d5.bryceadmin/public_html/admin/modules.php(238) : eval()'d code on line 1

Link to comment
Share on other sites

No edit button? Anyway...

 

I installed a template while I was waiting for a response and now there's error code that goes along with the above.

 

When I click edit on the google checkout payment module I get this error:

 

Fatal error: Call to undefined function gc_cfg_select_shipping() in /hermes/bosweb/web185/b1853/d5.bryceadmin/public_html/admin/modules.php(238) : eval()'d code on line 1

Check in admin/includes/functions/general.php for this line:

// perhaps this function must be moved to googlecheckout class, is not too general

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

 

It should be line 880 or so.

Edited by speed777
Link to comment
Share on other sites

When I installed the Offical Google Checkout module for osCommerce, it accepted orders fine, but the order details only existed in Google and didn't seem to get entered into osCommerce. Is this normal? If not, is it a common problem with a known solution? Or if it is, is there another module for Google Checkout I can try?

 

Thanks.

In your Configuration>Sessions panel, try setting all to False. It was the only way that I could get the Google checkout orders into my OSC Admin panel. You can experiment from there by adding them in one by one and observing the differences.

Link to comment
Share on other sites

im having a problem i have a fresh install of osC and just added the google checkout module and that is all.

 

i hae put in the ID and KEY i have tried it on both sandbox and normal mode, in sandbox mode the button shows but you cant click it because it is inactive, when i use the normal mode the button doesnt even show.

 

any ideas how to solve this problem?

Link to comment
Share on other sites

Hi, I have installed the Google Checkout module for osCommerce v2.2RC1 (I have v2.2RC2a, but I was able to make changes as necessary). In sandbox mode, the checkout buttons worked at first, but since then I have made some modifications and now when I click the Google Checkout button from the shopping cart, the only response is for the page to be reloaded.

 

The code for the button, generated by GoogleCart->CheckoutButtonCode(), looks correct. I even tried reinstalling the entire module on a backup copy of the site (using the existing database), and the result is the same, which leads me to believe that I have an error with my settings.

 

Can you help me solve this? Here is as much relevant information as I can think to give:

 

From the GoogleCheckout module configuration:

  • Enable GoogleCheckout Module: true
  • Select Mode of Operation: https://sandbox.google.com/checkout/
  • Production/Sandbox Merchant ID/Key: (checked and are correct)
  • .htaccess Basic Authentication Mode: true (fixed "Failed to Get Basic Authentication Headers;" I ran a provided script to facilitate this, and it seemed to work afterwards)
  • Select Merchant Calculation mode of Operation: http
  • GoogleCheckout Carrier Calculated Shipping: true
  • Carrier Calculater(sp!) Shipping Configuration: (take for granted it is correct)
  • Continue shopping URL: http://(store addr)/gc_return.php

 

From the Google Checkout Sandbox Settings->Integration page:

  • My company will only post digitally signed carts: true
  • API callback URL: http://(store addr)/googlecheckout/responsehandler.php
  • Callback method: XML
  • Advanced settings: all default false values

 

The other changes I made shouldn't affect how that button actually functions. I have checked the error/message logs on my server side as well as the Tools->Integration Console on the Sandbox side, and none of them have any details whatsoever.

 

I appreciate any help you can give! Thanks!!

Link to comment
Share on other sites

Hi, I have installed the Google Checkout module for osCommerce v2.2RC1 (I have v2.2RC2a, but I was able to make changes as necessary). In sandbox mode, the checkout buttons worked at first, but since then I have made some modifications and now when I click the Google Checkout button from the shopping cart, the only response is for the page to be reloaded.

 

...

 

Problem solved. The issue was that, in my integration, I had put this code within another form. Specifically, I had moved it to replace the original Checkout button when Google Checkout was enabled, but that button was within the Update button's form. Since the generated code is itself a form, the new form action was ignored and instead I was just updating the shopping cart. The fix was to move the initial </form> tag directly after the Update button.

Link to comment
Share on other sites

Ive installed gc as instructed and now get this error when i try to edit gc in the admin area.

 

Fatal error: Call to undefined function: gc_cfg_select_shipping() in /home/content/c/n/i/cnilles/html/admin/modules.php(212) : eval()'d code on line 1

 

I found this fix http://www.oscommerce.com/forums/index.php?showtopic=250627 but my tables were already updated. Please help.

 

EDIT: nevermind seems I edited the wrong general.php

 

Please delete this:)

Edited by cniller
Link to comment
Share on other sites

Installed GC and now on http://suncoastfashion.com/googlecheckout/...onsehandler.php

 

I get this error:

Parse error: parse error, unexpected T_CASE in /home/content/c/n/i/cnilles/html/googlecheckout/responsehandler.php on line 710

 

Does this have anything to do with the fact I haven't got an SSL yet?

 

 

ALSO: When I go to the cart, there's no google checkout button at ALL despite having added it in login.php

Edited by cniller
Link to comment
Share on other sites

On the login page, make sure the code is outside of the -/form- (I didn't use the html brackets on purpose).

 

As far as the T-Case error, there is a contribution that is famous for giving that error. Make sure that the version you install is Ropu's.

 

BTW - I never got this contribution to work for me. I sincerely hope you have better luck. :)

Link to comment
Share on other sites

Here's the code as it is in my page

 

<?php

/*

$Id: login.php,v 1.80 2003/06/05 23:28:24 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');

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)

if ($session_started == false) {

tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

}

 

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

 

$error = false;

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

 

// Check if email exists

$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

if (!tep_db_num_rows($check_customer_query)) {

$error = true;

} else {

$check_customer = tep_db_fetch_array($check_customer_query);

// Check that password is good

if (!tep_validate_password($password, $check_customer['customers_password'])) {

$error = true;

} else {

if (SESSION_RECREATE == 'True') {

tep_session_recreate();

}

 

$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");

$check_country = tep_db_fetch_array($check_country_query);

 

$customer_id = $check_customer['customers_id'];

$customer_default_address_id = $check_customer['customers_default_address_id'];

$customer_first_name = $check_customer['customers_firstname'];

$customer_country_id = $check_country['entry_country_id'];

$customer_zone_id = $check_country['entry_zone_id'];

tep_session_register('customer_id');

tep_session_register('customer_default_address_id');

tep_session_register('customer_first_name');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

 

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

 

// restore cart contents

$cart->restore_contents();

 

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

tep_redirect($origin_href);

} else {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

}

}

}

 

if ($error == true) {

$messageStack->add('login', TEXT_LOGIN_ERROR);

}

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL'));

?>

<!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">

<script language="javascript"><!--

function session_win() {

window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=520,width=390,toolbar=no,statusbar=no,scrollbars=yes").focus();

}

//--></script>

</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 //-->

 

<!-- Start code -->

<tr><td valign="top">

<table border="0" cellspacing="0" cellpadding="0">

<tr><td width="11"><?php echo tep_draw_separator('spacer.gif', '11', '1'); ?></td>

<td width="226" valign="top"><?php require(DIR_WS_INCLUDES . 'column_left.php'); ?></td>

<td width="3"><?php echo tep_draw_separator('spacer.gif', '3', '1'); ?></td>

<td width="477" valign="top"><?php require(DIR_WS_INCLUDES . 'box1.php'); ?>

<table border="0" cellspacing="0" cellpadding="0" width="477">

<tr><td height="3" colspan="3"></td></tr>

<tr><td><?=tep_image(DIR_WS_IMAGES.'m23.gif')?></td><td width="404" height="41" class="bg1">    <span class="tx1"><?=HEADING_TITLE?></span></td><td><?=tep_image(DIR_WS_IMAGES.'m25.gif')?></td></tr>

<tr><td class="bd" width="477" colspan="3" bgcolor="#F0F0F0" style="padding:5px 3px 0px 3px;">

 

<table cellpadding="0" cellspacing="0" border="0" width="100%">

<?php

if ($messageStack->size('login') > 0) {

?>

<tr>

<td><?php echo $messageStack->output('login'); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

if ($cart->count_contents() > 0) {

?>

<tr>

<td class="smallText_1"><?php echo TEXT_VISITORS_CART; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

</table>

 

<?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>

 

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_CUSTOMER; ?></b></td>

<td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_CUSTOMER; ?></b></td>

</tr>

<tr>

<td width="50%" height="100%" valign="top">

<table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" style="border:1px solid #B6B7CB; background:#F8F8F9;">

<tr>

<td>

<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main" valign="top"><?php echo TEXT_NEW_CUSTOMER . '<br><br>' . TEXT_NEW_CUSTOMER_INTRODUCTION; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<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"><?php echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_continue1.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>

</table></td>

<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" style="border:1px solid #B6B7CB;background:#F8F8F9;">

<tr>

<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main" colspan="2"><?php echo TEXT_RETURNING_CUSTOMER; ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></td>

<td class="main"><?php echo tep_draw_input_field('email_address'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td>

<td class="main"><?php echo tep_draw_password_field('password'); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="smallText_1" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td colspan="2"><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"><?php echo tep_image_submit('button_sign_in.gif', IMAGE_BUTTON_LOGIN); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td></form>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table>

<?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 **

?>

 

<!-- body_eof //-->

 

<!-- End code -->

</td></tr>

<tr><td><?=tep_image(DIR_WS_IMAGES.'m45.gif')?></td><td width="404" height="7" class="bg6"></td><td><?=tep_image(DIR_WS_IMAGES.'m47.gif')?></td></tr>

</table>

</td></tr>

</table>

</td></tr>

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

 

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Hello!

 

I have installed osCommerce and the Google Checkout payment module and I would like all the orders to be procesed only through Google Checkout. I can make Google Checkout process all the shopping carts and calculate the shipping cost through Carrier Calculated Shipping, but i also need Google to calculate the taxes for each order. I only need to charge a 15.50$ tax to purchases made from the state of California. I thought i could do that just by entering the "Settings" option in my Google Checkout Merchant Account, but it doesnt work. I created a Google Checkout Buyers Account with a California Address to test this and, after buying, Google Checkout would only show the total price of the shopping cart contents plus the shipping cost, but 0 taxes. I read the help center article dedicated to taxes configuration through the "Settings" option and in the bottow of the article i found this:

 

"Note: If you submit a shopping cart which includes the tag <tax-tables>, we'll ignore any tax values set in the Merchant Center."

 

My guess is that if i delete the "Tax Tables" from my shopping cart then i could manage the tax configuration through the "Settings" of my Google Checkout Merchant Account.

 

Does anyone knows how to delete the "Tax Tables"?

or

Does anyone have found out another way to make Google Checkout add an specific tax rate to a state?

 

Thanks a lot!!!!!!!!!!

Link to comment
Share on other sites

Hello Again!

 

I have osCommerce installed with the Google Checkout Payment Module. I was using a Google Checkout Buyers Sandbox Account to test the catalog and i found out that if after adding products to my cart i clicked in the Google Checkout Button and proceed with the order, the osCommerce catalog wouldnt update the product quantity, i mean, after an order has been procesed through Google Checkout, the quantity of the products bought wont be substracted from the osCommerce catalog.

 

Is this happening because im using a sandbox account or because i didnt logged to osCommerce before Checking Out? How have you guys solved this?

 

PS: I have the "Substract Stock" option set to"TRUE" in oscommerce.

Edited by Dreckent
Link to comment
Share on other sites

Been working on this for hours, canada does not calculate properly on our google checkout and has been giving free shipping to Canada (and to APOs and FPOs also) which is quite frustrating to say the least!

 

I finally figured out how to disable canada shipments, in googlecheckout/gcheckout.php

 

ADD:

$Gfilter->AddExcludedPostalArea('CA');

 

AFTER:

if(MODULE_PAYMENT_GOOGLECHECKOUT_USPOBOX == 'False') {

$Gfilter->SetAllowUsPoBox('false');

}

 

 

Hope this helps someone, enjoy! :lol:

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Greetings Everyone....

 

I have installed this contrib and as far as I can tell everything appears to be working just fine....

 

I am a little lost on the shipping side of this... I add an item and I see that all the possible shipping methods are there... which to be honest I don't really like. I just want to use UPS Ground.

 

But ok so that's one thing.... I am also dumb to setting up variables for the Carried Calculator....

 

all prices on shipping are just 1 dollar lol...

 

I don't know how to change this or make the amount go up with weight... can someone give me a brief how to?

Yeah Yeah I am learning as I go... lol

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...