Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Offical Google Checkout module for osCommerce Support Thread


1188 replies to this topic

#1181 GoTTi

  • Community Member
  • 438 posts
  • Real Name:GoTTi

Posted 07 April 2012, 04:57

i got the google checkout ipn working...but using the sandbox it doesnt seem to return back to the store to actually approve or activate the order. once i goto the sandbox the order is placed as successful and is pending.

i remember years ago it worked fine, but i had to do some sort of modification to make it do what it was suppose to...but i dont remember ;(

#1182 GoTTi

  • Community Member
  • 438 posts
  • Real Name:GoTTi

Posted 12 April 2012, 05:58

i just got the google checkout mod to work on 2.3...i dont know why no1 will support this mod and work on it being better. such a great addon.

#1183 ndamico

  • Community Member
  • 39 posts
  • Real Name:nick d

Posted 16 April 2012, 04:04

what did you have to do to get the mod to work on 2.3? i would love to have it.

#1184 GoTTi

  • Community Member
  • 438 posts
  • Real Name:GoTTi

Posted 16 April 2012, 23:37

ndamico i installed this one http://addons.oscommerce.com/info/5157 did you try and install it and get it to work? i dont think i had any issues on the install part. the config was tricky because on the live production end or whatever, to actually process a payment, i figured out that i can use my shared ssl settings on my site to actually have google call back and activate the orders, record the google order number...works perfect now. but thats the mod i used. should just install fine for you same as for me.

#1185 ndamico

  • Community Member
  • 39 posts
  • Real Name:nick d

Posted 17 April 2012, 20:13

i got it working but it doesn't pull the correct discount from discount coupons. this is a killer for me. anyone know a solution to this?

#1186 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 30 April 2012, 21:00

I just switched for Fedex Real Time Quotes (fedex1) to the FedEx Webservices (fedexwebservices) module. The module is working fine with normal store checkout and paypal express...

I am no longer getting merchant calculated ship quotes into google checkout. So I assume I need to update shipping_methods.php with the new module details.
So when I run shipping_generator I get an error:
Warning: Division by zero in /var/www/pti/includes/modules/shipping/fedexwebservices.php on line 240
Line 240: $shipping_weight = round($new_shipping_weight / $shipping_num_boxes, 2);
So I try setting temporarily setting $shipping_num_boxes = 1 as the default
The error goes away but I am not getting an output for the fedexwebservices

Does anyone have the fedexwebservices appropriate code to place into shipping_methods.php manually?

I tried a guees like this but its not working for me
					    'fedexwebservices' => array(						  /////// TESTING THIS ////////////
								    'domestic_types' =>
									  array(
										    'GROUND_HOME_DELIVERY' => 'Ground Home Delivery',
										    'FEDEX_GROUND' => 'FedEx Ground'
										   ),
								    'international_types' =>
									  array(
										    'INTERNATIONAL_ECONOMY' => 'International Economy',
										    'INTERNATIONAL_GROUND' => 'International Ground'
										   ),
									    ),

-Dave

#1187 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 01 May 2012, 15:30

I am pretty sure this is accurate for the services I offer
					    'fedexwebservices' => array(						  /////// TESTING THIS ////////////
								    'domestic_types' =>
									  array(
										    'GROUND_HOME_DELIVERY' => 'Ground Home Delivery',
										    'FEDEX_GROUND' => 'FedEx Ground'
										   ),
								    'international_types' =>
									  array(
										    'INTERNATIONAL_ECONOMY' => 'International Economy',
										    'INTERNATIONAL_GROUND' => 'International Ground'
										   ),
									    ),

But I cannot seem to get the modules rates to send. What other steps am I missing for the new ship module to get recognized and tender rates? I've tried the removing and reinstalling of the module in admin. everything seems recognized and detected in admin. Any help appreciated.

Is there an especially good troubleshooting guide anywhere?
-Dave

#1188 WallaceNetworks.co.uk

  • Community Member
  • 8 posts
  • Real Name:Allan Wallace
  • Gender:Male

Posted 15 May 2012, 19:38

Unfortunately I don't have any solutions for anyone yet, but i do have a problem with installation of Google Checkout v1.5 rc1 ( v1.5_rc1.zip ) into an osCommerce 2.3.1 shop, which is driving me round the twist.

I don't often need to ask for help here, but i'm hoping with the information I am providing below, that some more people may be able to get Google Checkout v1.5 rc1 working with osCommerce 2.3.1 once I have a solution for this.

I have configured it with a fresh sandbox account i set up today, and have read all the notes on the Google Group for installing it, and i have got so far:

I have reached the point where I have the Google Checkout icon appearing on the following pages:

shopping_cart.php - when you mouse over the icon it points to http://example/shopping_cart.php?action=update_product
(If i click on the link, it goes straight back to shopping_cart.php)

and

login.php - whether i have anything in my shopping cart or not, and the link

It does NOT appear on checkout_shipping.php (i guess this is correct)

It does NOT appear on checkout_payment.php (again, i guess this is correct)

But at this point, with products in my shopping cart, clicking on the continue button results in:

checkout_payment.php?error_message=Please+select+a+payment+method+for+your+order.
(with a corresponding red banner)

I have added, removed, re added it from admin - modules - payment (where it shows up with the expected detail) but I have not so far been able to work out where I am going wrong.

I have the following files in the following places:
( NOTE, these are original 2.3.1 files modified with the code from v1.5_rc1.zip )

catalog/shopping_cart.php

Original 2.3.1 ( starting around line 133 when viewed in notepad++ ) was:

<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span>
</div>
<?php
$initialize_checkout_methods = $payment_modules->checkout_initialization_method();
if (!empty($initialize_checkout_methods)) {
?>


Modified 2.3.1 is:

<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span>
</div>
<?php
// *** BEGIN GOOGLE CHECKOUT ***
if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') {
include_once('googlecheckout/gcheckout.php');
}
// *** END GOOGLE CHECKOUT ***
?>
<?php
$initialize_checkout_methods = $payment_modules->checkout_initialization_method();
if (!empty($initialize_checkout_methods)) {
?>



catalog/login.php

starting around line 130 of the original oscommerce 2.3.1 file, where it was:

</form>
</div>
</div>
<?php
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

I now have modified it to:

</form>
<?php
// *** BEGIN GOOGLE CHECKOUT ***
if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') {
include_once('googlecheckout/gcheckout.php');
}
// *** END GOOGLE CHECKOUT ***
?>
</div>
</div>
<?php
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>



catalog/admin/modules.php

starting at line 13 of the original osCommerce 2.3.1 code, what was:

require('includes/application_top.php');
$set = (isset($HTTP_GET_VARS['set']) ? $HTTP_GET_VARS['set'] : '');
$modules = $cfgModules->getAll();
if (empty($set) || !$cfgModules->exists($set)) {
$set = $modules[0]['code'];
}


has now been replaced with:

require('includes/application_top.php');
// *** BEGIN GOOGLE CHECKOUT ***
require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules1.php');
// *** END GOOGLE CHECKOUT ***
$set = (isset($HTTP_GET_VARS['set']) ? $HTTP_GET_VARS['set'] : '');
$modules = $cfgModules->getAll();
if (empty($set) || !$cfgModules->exists($set)) {
$set = $modules[0]['code'];
}



catalog/admin/orders.php

Starting at line 13 of the original osCommerce 2.3.1 code:

require('includes/application_top.php');
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();

has now become:

require('includes/application_top.php');
// *** BEGIN GOOGLE CHECKOUT ***
require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/orders1.php');
// *** END GOOGLE CHECKOUT ***
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();


starting at line 40, the osCommerce 2.3.1 code which was:

if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");
$customer_notified = '0';
if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) {
$notify_comments = '';
if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) {
$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
}
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$customer_notified = '1';
}
tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");
$order_updated = true;

has become:

if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

// *** BEGIN GOOGLE CHECKOUT ***
require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/orders2.php');
// *** END GOOGLE CHECKOUT ***

tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");
$order_updated = true;

(the code above is one part i suspect may be incorrect)

Also, starting around line 295, the original osCommerce 2.3.1 code that was:

<td class="smallText" valign="top"><?php echo tep_draw_button(IMAGE_UPDATE, 'disk', null, 'primary'); ?></td>
</tr>
</table></td>
</form></tr>

is now:

<td class="smallText" valign="top"><?php echo tep_draw_button(IMAGE_UPDATE, 'disk', null, 'primary'); ?></td>
<!-- *** BEGIN GOOGLE CHECKOUT *** -->
<?php
require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/orders3.php');
?>
<!-- *** END GOOGLE CHECKOUT *** -->
</tr>
</table></td>
</form></tr>


catalog/admin/includes/functions/general.php

Starting with the osCommerce 2.3.1 code around line 1010:

tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'");
}

has become:

tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'");
// *** BEGIN GOOGLE CHECKOUT ***
require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/includes/functions/general.php');
// *** END GOOGLE CHECKOUT ***
}



I also have the following original folders and / or files from the v1.5_rc1.zip

catalog/gc_return.php

catalog/includes/languages/response_error.log

catalog/includes/languages/english/modules/payment/googlecheckout.php

catalog/includes/modules/payment/googlecheckout.php

catalog/googlecheckout/
(entire folder)

Anyone got any advice they could offer? I figure i can't be that far away from cracking it, but i'm stumped!

Thanks in advance!

#1189 Roaddoctor

  • Community Member
  • 643 posts
  • Real Name:David Jennings
  • Gender:Not Telling
  • Location:Texas

Posted 22 May 2012, 12:07

I'm using GCO 1.50 for osCommerce.

I have recently swithced from the older Fedex Real time Quotes (fedex1) to the newer FedEx Webservices API (fedexwebservices) and have not been able to determine the correct code to place in merchant_calculated_methods.php. For whatever reason my ship generator will not generate.

fedex1 array was like this:

'fedex1' => array(
'domestic_types' => array(
'01' => 'Priority (by 10:30AM, later for rural)',
'03' => '2 Day Air',
'05' => 'Standard Overnight (by 3PM, later for rural)',
'06' => 'First Overnight',
'20' => 'Express Saver (3 Day)',
'90' => 'Home Delivery',
'92' => 'Ground Service'
),
'international_types' => array(
'01' => 'International Priority (1-3 Days)',
'03' => 'International Economy (4-5 Days)',
'06' => 'International First',
'90' => 'International Home Delivery',
'92' => 'International Ground Service'
),
),

What would be the proper array for the FedEx Webservices API?

Here is the fedex webservices module if it is helpful
http://addons.oscommerce.com/info/7977

Any input appreciated
-Dave