Ropu
unread,Nov 12, 2007, 6:33:12 AM11/12/07Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Checkout Mod for Zen Cart Community Support Forum
Hi,, i was reported of a bug that prevents correct customer creation
The issue affected customers that have bought with GC in a ecommerce were that already had a created account. This can lead in an error when changing the state of an order from that affected merchants.
to solve this issue you must apply this patch:
googlecheckout/responsehandler.php line 197
replace:
$db->Execute("insert into " . TABLE_CUSTOMERS_INFO . "
(customers_info_id, customers_info_number_of_logons,
customers_info_date_account_created)
values ('" . (int) $_SESSION['customer_id'] . "', '0', now())");
$db->Execute("insert into " . $googlepayment->table_name . " " .
" values ( " . $_SESSION['customer_id'] . ", " .
$data[$root]['buyer-id']['VALUE'] . ")");
$new_user = true;
}
// The user exists and is logged in
// Check database to see if the address exist.
with:
$db->Execute("insert into " . TABLE_CUSTOMERS_INFO . "
(customers_info_id, customers_info_number_of_logons,
customers_info_date_account_created)
values ('" . (int) $_SESSION['customer_id'] . "', '0', now())");
/* $db->Execute("insert into " . $googlepayment->table_name . " " .
" values ( " . $_SESSION['customer_id'] . ", " .
$data[$root]['buyer-id']['VALUE'] . ")");*/
$new_user = true;
}
// thx ZachAnderson ;)
$customer_in_gc = $db->Execute("select gct.customers_id from " .
$googlepayment->table_name . " gct " .
" where gct.buyer_id = " . makeSqlString($data[$root]['buyer-id']['VALUE']));
if($customer_in_gc->RecordCount() == 0) {
$db->Execute("insert into " . $googlepayment->table_name . " " .
" values ( " . $_SESSION['customer_id'] . ", " .
$data[$root]['buyer-id']['VALUE'] . ")");
}
// The user exists and is logged in
// Check database to see if the address exist.
Unfortunately this bug cannot be reverted for old orders until those customers that had the issue do a new purchase.
This will be applied in next release
hope this helps
ropu
--
.-. --- .--. ..-
R o p u