Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Offical Google Checkout module for osCommerce Support Thread


Silverado05

Recommended Posts

Here's a tip for advanced programmers that need to transfer something from the site to the order created by google checkout such as a tracking # in google checkout. It took us quite awhile to figure this out but it's fairly simple once you know how. You just have to use google checkout's merchant-private-data field

 

In googlecheckout\gcheckout.php

ADD:
$private_text = 'WHATEVER YOU WANT TO TRANSFER';
$Gcart->SetMerchantPrivateData(new MerchantPrivateData(array("YOUR-NAME-OF-DATA" => $private_text)));

 

In googlecheckout/responsehandler.php

FIND:
  $order->delivery['format_id'] = 2;
ADD BELOW:
$order->delivery['YOUR-FIELD-NAME'] = $gc_data[$root]['shopping-cart']['merchant-private-data']['YOUR-NAME-OF-DATA']['VALUE'];

FIND:
						  'date_purchased' => 'now()',
ADD BELOW:
						  'NAME-OF-YOUR-FIELD-IN-OSCOMMERCE-ORDER-DATABASE' => $order->delivery['YOUR-FIELD-NAME'],

 

You will need to modify the above for your situation, and I AM NOT PROVIDING SUPPORT FOR THE ABOVE, which is why I say it is for Advanced Programmers only. However maybe it will help and save some time if you need to transfer data behind the scenes...

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

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

I've got google checkout running properly but when the customer goes back to the gc_return.php I am getting the following error at the top of the page

 

"Unknown column 'Array' in 'where clause'"

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

 

Any idea on what is causing this?

I'm using the stock gc_return.php page from google checkout 1.4.5 if that helps?

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

I kind of feel like I'm talking to myself here... is anyone else on this forum that can answer questions? :P

 

Anyway I've been looking at the Logs Google Checkout generates and there is some sensitive data here, not to mention the files will get HUGE over time. It does not store any credit card numbers or anything, but I'm still not comfortable with the addresses and customer info it is storing in the logs. Is there anyway to turn off the log file or does anyone have an idea on how we can overwrite it say every day or two so this info is not just left piling up in the log directory indefinately?

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

i'm having some issues with google checkout.

i installled it on my server with no problems...everything seems to be working fine in http: (without secure server mode)

but when its in https (secure server) the checkout_payment.php page goes blank...meaning the page is all white with nothing displayed.

 

so when someone adds something to their shopping cart, they click on the checkout button (not the google checkout) and it takes them to the checkout_shipping page. from there you click on continue to get to the payment information page(checkout_payment.php) it just goes blank.

 

i tried uploading a clean osc file of checkout_payment.php with no help

 

any ideas?

 

thanks in advance

sung

Link to comment
Share on other sites

Hi people, hope someone can help, i'm turning grey and going bald with this problem and can't semm to fin a concrete solution through the forums, though it seems peopl do have similiat troubles... I have Google checkout installed, i'm receiving no errors throughout the whole sale process. When an order is processed by google checkout, customer is returned to the store but with the cart still full and the OSC admin isn't receiving anything about the order.

 

I've tried rolling back and re-installing double checking absolutely everything about the instructions but to no avail. >_<

 

searching i found this little test tool http://demo.globant.com/~brovagnati/tools/...andler_test.php that gave me this report as below, hope this sheds some light on the matter:

 

XML We Sent: Authorization: Basic XXXXXX:XXXXXX
Content-Type: application/xml;charset=UTF-8
Accept: application/xml;charset=UTF-8
X-Origin-IP: [i]xx.xxx.xx.xxx[/i]

XML We Received: HTTP/1.0 500 Internal Server Error
Date: Sat, 15 Mar 2008 23:39:23 GMT
Server: Apache 3 - HOSTMerit
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from proxy.globant.com
Proxy-Connection: close

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
webmaster@[i]oscinstallation[/i].com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<P>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.
<HR>
<ADDRESS>Apache/1.3.39 Server at [i]oscinstallation[/i].com Port 80</ADDRESS>
</BODY></HTML>

 

Incidentally i have the two google checkout tables in my database too.

 

As the symptoms i'm experiencing seem quite common how about an faq on the matter, or a decent trouble-shooting guide for this matter please mr developer and contributors???

 

thanks for listening!

Edited by squeakstar
Link to comment
Share on other sites

I've found other users with the same problem as me both here and on the internet, but the problem has either gone unnoticed or a solution cannot be found....

 

This is concerning the contribution: GOOGLE CHECKOUT MODULE FOR OSC (v1.4.5_CCS)

 

I have installed this module on both a fresh install of OSC and a completed, functional site also running OSC (both the latest versions of OCS) and get the same problem. The problem is:

 

When I go to purchase an item I get this error at the checkout screen

 

* DIR_FS_CATALOG and DIR_WS_MODULES may be wrong configured in

includes/configure.php file. This dir doens't exists: /trunk/****/

****/catalogincludes/modules/shipping/

 

(please note the **** above are my site directory folders)

 

When going through the installation steps I do not recall changing the

configure.php file. Also I noticed the path it says is missing a back

slash after catalog. If this is the problem where would I be able to

edit this?

 

This looks like a fairly easy fix, but for the life of me I and many others can't quite figure it out....PLEASE HELP!!!

 

Thank You!!

 

-MT

Link to comment
Share on other sites

I've found other users with the same problem as me both here and on the internet, but the problem has either gone unnoticed or a solution cannot be found....

 

This is concerning the contribution: GOOGLE CHECKOUT MODULE FOR OSC (v1.4.5_CCS)

 

I have installed this module on both a fresh install of OSC and a completed, functional site also running OSC (both the latest versions of OCS) and get the same problem. The problem is:

 

When I go to purchase an item I get this error at the checkout screen

 

* DIR_FS_CATALOG and DIR_WS_MODULES may be wrong configured in

includes/configure.php file. This dir doens't exists: /trunk/****/

****/catalogincludes/modules/shipping/

 

(please note the **** above are my site directory folders)

 

When going through the installation steps I do not recall changing the

configure.php file. Also I noticed the path it says is missing a back

slash after catalog. If this is the problem where would I be able to

edit this?

 

This looks like a fairly easy fix, but for the life of me I and many others can't quite figure it out....PLEASE HELP!!!

 

Thank You!!

 

-MT

 

 

Answered my own question....here's the fix:

 

 

Wow, I actually figured it out....OK, here's the simple fix:

 

 

 

Manually Edit:

 

OSC_DIR/catalog/includes/configure.php

 

Find:

 

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

 

Replace with:

 

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

Link to comment
Share on other sites

Hi

 

I'm having issues with this module so I tried to remove it :( It's becoming a bit of a nightmare

 

I remove the module by pressing the 'Remove button' in modules then proceeded to remove the files that were installed

 

I also remove the all of the database entries in configuration & the other tables

 

I've used INFORAPID to check the rest of the files to ensure that I have removed every trace of the mod

 

I've spent the last 3 hours trying to remove every trace of it but I keep getting the following error in checkout_shipping.php (I have FEC installed)

 

Warning: payment::include(includes/languages/english/modules/payment/googlecheckout.php) [function.payment-include]: failed to open stream: No such file or directory in C:\xampp\htdocs\store\includes\classes\payment.php on line 38

Warning: payment::include() [function.include]: Failed opening 'includes/languages/english/modules/payment/googlecheckout.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\store\includes\classes\payment.php on line 38

Warning: payment::include(includes/modules/payment/googlecheckout.php) [function.payment-include]: failed to open stream: No such file or directory in C:\xampp\htdocs\store\includes\classes\payment.php on line 39

Warning: payment::include() [function.include]: Failed opening 'includes/modules/payment/googlecheckout.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\store\includes\classes\payment.php on line 39

Fatal error: Class 'googlecheckout' not found in C:\xampp\htdocs\store\includes\classes\payment.php on line 41

 

I checked, checked & double checked every trace of GC but can't find anything :(

 

Can anyone help, before I pull out my hair :o

 

Thanks in advance

 

Dave

Link to comment
Share on other sites

I got Google Checkout working, however, the shipping rates aren't right. Its half less than the rate i got from FedEx website. Is there any way to fix it? Also, there is a limit of 150 lbs for each order, is there any way i can cancel that?

Sorry for another question, how do i exclude Alaska and Hawaii from ordering online? Thanks a lot.

The version is Google Checkout Module v1.4.5_CCS and using Carrier Calculator Shipping Configuration for the shipping rate.

Link to comment
Share on other sites

I got Google Checkout working, however, the shipping rates aren't right. Its half less than the rate i got from FedEx website. Is there any way to fix it? Also, there is a limit of 150 lbs for each order, is there any way i can cancel that?

Sorry for another question, how do i exclude Alaska and Hawaii from ordering online? Thanks a lot.

The version is Google Checkout Module v1.4.5_CCS and using Carrier Calculator Shipping Configuration for the shipping rate.

 

I don't think you can exlude alaska and hawaii, but I'm not 100% try googling google checkout API and reading the google docs they may shed some light on it.

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

Here is how we are setting up our osCommerce store to handle sales tax by zip code using GoogleCheckout v1.4.5_CCS.

 

We have a brick & mortar store in San Mateo county, California and want to start selling online. Our osCommerce store will feature GoogleCheckout only. In other words, online customers will not create a customer account at our site and they will have only one checkout option: GoogleCheckout. Our problem was how to charge sales tax.

 

1) First, what's the law about sales tax in California for online sellers?

 

There is a state-wide charge of 7.25% you have to collect for all online sales shipped within the state, if you have a physical presence in the state. There are also many 'districts' in California, each with different sales taxes added on to the state-wide rate; you have to collect these additional district sales taxes only for the district where you have a physical presence. Read more about this at the California State Board of Equalization website (www.boe.ca.gov), especially publications 71, 44 and 105.

 

In our case, because we have a physical presence in the district of San Mateo county, we are required to collect:

 

0% sales tax on shipments outside of California

7.25% sales tax on all shipments to California locations

8.25% sales tax on all shipments within San Mateo county

 

To make things more interesting, you cannot reliably identify shipments to a California sales tax district by zip code. Some zip codes extend across sales tax district lines. But you have to start somewhere. You can get a list of all zip codes for a given county at melissadata.com. We found there are 38 zip codes that lie within San Mateo county, and one zip code (94303) that stretches across San Mateo and Santa Clara counties.

 

What to do with this one zip code that encompasses residents in both San Mateo and Santa Clara counties? It turns out that Santa Clara county has a sales tax rate of 8.75%. We're not legally required to collect Santa Clara county tax, but we're allowed to do so. In theory, Santa Clara county residents shouldn't complain if we collect 8.25% sales tax from them, because they are required to pay the full 8.75% sales tax as a 'use tax' and they can get credit for the 8.25% we will have collected from them. Bottom line: we decided to collect 8.25% for all 39 zip codes in San Mateo county, even the one that extends into Santa Clara county. Melissadata.com tells us that 51% of the addresses in zip code 94303 are in Santa Clara county, and we intend to pay Santa Clara county 51% of 1% of all online sales shipped to zip code 94303.

 

2) It is easy to configure osCommerce to charge the 7.25% sales tax on all shipments to California.

 

Start in admin. In the menu on the left, click on 'Localizations / Taxes'.

 

2.1) Click on 'Tax Zones' to display the Tax Zone page. Click 'Insert' to create a new Tax Zone. Name: California. Description: California Sales Tax.

 

2.2) Then (still on the Tax Zone Page), click on your newly-created Tax Zone for California. Notice on your browser's address box that you are running catalog/admin/geo_zones.php. This is the place to insert geo_zones that will be assigned to your newly-created tax zone of California. Click 'Insert'. First select 'United States' from the country drop-down box. Then select 'California' from the zone drop-down box. Click 'Insert' then 'Back'. (While you're here, you might want to remove the Florida Tax Zone that is pre-configured of osCommerce, out of the box).

 

2.3) Click on 'Tax Rates' in the menu at left to display the Tax Rates page. Click 'New Tax Rate'. Tax Class Title: taxable goods. Zone: California. Tax Rate: 7.25%. Description: California Sales Tax. Priority: 1. Click 'Insert' to save the record.

 

GoogleCheckout will use this state-wide sales tax rate of 7.25%.

 

3) Our problem was how to make GoogleCheckout charge sales tax based on zip codes.

 

It should charge 8.25% on shipments to the 39 zip codes in San Mateo county. There are a number of osCommerce addins that apply sales tax to zip codes, but most appear to require the creation of a customer account at your osCommerce site, and our intention is to create a site without customer accounts. In other words, the customer at our online site would be able to use GoogleCheckout to pay for a purchase without having to create an account at our site. Our solution is a cludge, and rather ugly because we're hard-coding the 39 zip codes into our php code, but it does work and we'll use it until we develop something better.

 

In file catalog/googlecheckout/gcheckout.php, near line 673, find the following lines:

 

$num_rows = tep_db_num_rows($tax_rates_result); 

$tax_rule = array (); 

$GAtaxTable = new GoogleAlternateTaxTable((!empty($tax_name_array[$i])?$tax_name_array[$i]:'none'), 'false');

 

Directly below this, insert the following code:

 

//** Start of Zip Code Based Tax Rules ************* 

// 

$zipRate = ".0825"; // Sales tax rate for San Mateo county 

$newGAtaxRule = new GoogleAlternateTaxRule($zipRate); 

$zipsArray = array(); 

$zipsArray[] = "94002"; // Belmont 

$zipsArray[] = "94005"; // Brisbane 

$zipsArray[] = "94010"; // Burlingame 

// ...etc. Add all 39 zip codes for San Mateo county to $zipsArray 

$newGAtaxRule->SetZipPatterns($zipsArray); 

$GAtaxTable->AddAlternateTaxRules($newGAtaxRule); 

// 

//** End of Zip Code Based Tax Rules *************

 

4) Testing the Code.

 

You should already have GoogleCheckout installed and configured to use your sandbox account. The GoogleCheckout button should display on your shopping cart page. All the code specifying sales tax is executed whenever the user displays this page. Add something to your cart and then view the source for the shopping cart page. Find the code that reads:

 

<input type="hidden" name="cart" value="

 

The value is a long, long string of alphanumerics enclosed within double quotes. It is the XML sent by your site to the GoogleCheckout site, encoded to base64. Copy everything within the double quotes to your clipboard and then paste it into a base64 decoder. I've been using http://demo.globant.com/~brovagnati/tools/base64decode.php. (Thanks to the people who developed and posted that!) Press 'Decode' to see the XML. It should display your sales tax rules, something like what you see below:

 

		...
	<alternate-tax-tables>
	  <alternate-tax-table standalone="false" name="Taxable Goods">
		<alternate-tax-rules>
		  <alternate-tax-rule>
			<rate>.0825</rate>
			<tax-area>
			  <us-zip-area>
				<zip-pattern>94002</zip-pattern>
			  </us-zip-area>
			</tax-area>
		  </alternate-tax-rule>
		  <alternate-tax-rule>
			<rate>.0825</rate>
			<tax-area>
			  <us-zip-area>
				<zip-pattern>94005</zip-pattern>
			  </us-zip-area>
			</tax-area>
...
		  <alternate-tax-rule>
			<rate>0.0725</rate>
			<tax-area>
			  <us-state-area>
				<state>CA</state>
			  </us-state-area>
			</tax-area>
		  </alternate-tax-rule>
		  ...

 

Notice that the zip-code rules are specified BEFORE the CA state rules. GoogleCheckout API requires the most specific rules first. Read more about the GoogleCheckout API for tax rules here: http://code.google.com/apis/checkout/devel..._API_Taxes.html

 

5) Testing the Code in the Sandbox.

 

After you create your Googlecheckout sandbox buyer account, you can test the code in the sandbox. The trick here is that on the first GoogleCheckout page, called up after you enter your GoogleCheckout buyer account login and password, you can specify alternative 'Ship to' locations and even add new 'Ship to' locations on the fly. Test your zip-code based sales tax rules by creating new 'Ship to' locations and watch the tax charged on that page change as you change locations.

 

Hope this helps. I'd like to hear about it if anyone has any comments or suggestions.

 

Anono

Link to comment
Share on other sites

I don't think you can exlude alaska and hawaii, but I'm not 100% try googling google checkout API and reading the google docs they may shed some light on it.

Thanks, but I'm not familiar with codes and things, so we just wont send campaign to those two states. Now the main problem is why is the rate of FedEx on Google Checkout is a lot lower than FedEx website? Is it because Google doesnt take how many boxes it may be packed in or something else?

Also, how to cancel the limitation of 150 lbs per order, our product per carton is already 50 lbs, so it would be troubling if they want to order more cartons, they have to split it into a few orders.

Appreciate the help :)

Link to comment
Share on other sites

Thanks, but I'm not familiar with codes and things, so we just wont send campaign to those two states. Now the main problem is why is the rate of FedEx on Google Checkout is a lot lower than FedEx website? Is it because Google doesnt take how many boxes it may be packed in or something else?

Also, how to cancel the limitation of 150 lbs per order, our product per carton is already 50 lbs, so it would be troubling if they want to order more cartons, they have to split it into a few orders.

Appreciate the help :)

 

I honestly don't know about the lower rates they are quoting, perhaps they are quoting for the items only not the items + packaging? Regardless you can compensate by adding a % on top of the ground rate if need be, we actually thought it was too high so we are subtracting a percentage. Checkout the docs included in the google checkout contribution for more details. We have not encountered the 150 limit but we have not had an order that heavy yet either....

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

Force Carrier Calculated Shipping for Zero Weight Items

 

We're going to be selling a lot of low-weight items online, and intend to use GoogleCheckout with carrier caluculated shipping. In our case, shipping charges vary little by the quantity we package into a given shipment, and so we'd rather not take the trouble to enter a weight value for each product we offer when we add the product to our online store.

 

However, we found that carrier caluclated shipping doesn't work for a zero-weight package (no big surprise). What the system does is use the 'Default Values' you specify for 'Carrier Calculater Shipping Configuration' - the same values it would use if it had been unable to communicate with the carrier's site. The problem here of course is that it is the same value, regardless of destination.

 

Our solution was to force a mimum weight of 0.01 LBS for all shipment items. The carrier caluclated shipping charges provided by all three carriers (FedEx, UPS and USPS) now work; they round the total shipment weight up to a minimum of 1 LB.

 

in catalog\googlecheckout\library\googleitem.php, near line 76.

 

Change this:

 

			$this->item_weight = 'LB';
	}
	$this->numeric_weight = (double)$numeric_weight;
  } 
}

To this:

 

			$this->item_weight = 'LB';
	}
	$this->numeric_weight = (double)$numeric_weight;
  } 
  // Change to force minimum weight for each item
  if ($this->numeric_weight==0)  {$this->numeric_weight = 0.01;}
  // End of change to force minimum weight for each item
}

Link to comment
Share on other sites

I have done a clean install of osCommerce and then installed this module. I go into the admin, install the module. then i go to the catalog area and add an item to the card and loginl. going to checkout there is nothing showing google as the checkout module

any ideas?

Link to comment
Share on other sites

I have done a clean install of osCommerce and then installed this module. I go into the admin, install the module. then i go to the catalog area and add an item to the card and loginl. going to checkout there is nothing showing google as the checkout module

any ideas?

 

It is shown as a button before you login on the shopping cart page right below the checkout button. If you don't have it there you missd something in the install specifcally on the shopping_Cart and login pages so go check over that install again.

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

Please Help. I am new to the google checkout. I have installed the contribution, signed up for a google account and have put all the details in OSC. however when i click on the google checkout button i get take to a google page that says

 

"Oops!

Alchemy Engineering Design Ltd 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"

Edited by johndenton
Link to comment
Share on other sites

I think I have this fixed for use with google checkout now, here is my fix:

 

INTEGRATING GOOGLE CHECKOUT with PRODUCT ATTRIBUTES OPTION TYPE FEATURE

 

catalog/googlecheckout/gcheckout.php

 

FIND (line 142):

$attr_value = $attributes_values['products_options_values_name'];

 

CHANGE TO:

// Product Option Type

if ($value == PRODUCTS_OPTIONS_VALUE_TEXT_ID) {

 

$attr_value = $products[$i]['attributes_values'][$option] .

tep_draw_hidden_field('id[' . $products[$i]['id'] . '+++' .

$i . '][' . TEXT_PREFIX . $option . ']',

$products[$i]['attributes_values'][$option]);

 

} else {

$attr_value = $attributes_values['products_options_values_name'] .

tep_draw_hidden_field('id[' . $products[$i]['id'] . '+++' .

$i. '][' . $option . ']', $value);

}

// End Product Option Type

catalog/googlecheckout/responsehandler.php

 

FIND (line 631):

'products_options_values' => $attributes_values['products_options_values_name'],

 

CHANGE TO:

'products_options_values' => $order->products[$i]['attributes'][$j]['value'], // Product Options Changed

FIND (line 644)

$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];

 

CHANGE TO:

// Product Option Type contribution

$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . tep_decode_specialchars($order->products[$i]['attributes'][$j]['value']);

// $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];

 

This seems to work in pushing the product options (not all because someone chops off and gives us elipses (...)), but what's worse is that on the callback into the responsehandler of the GC it only seems to push the 1st option into the osCommerce order area for that customer. Any thoughts on why those two things are happening? 1. Elipses if more than a couple options (think 10 options as a test) 2. Only getting 1 option back in the callback from google.

 

Thanks!

Edited by kevcap
Link to comment
Share on other sites

This seems to work in pushing the product options (not all because someone chops off and gives us elipses (...)), but what's worse is that on the callback into the responsehandler of the GC it only seems to push the 1st option into the osCommerce order area for that customer. Any thoughts on why those two things are happening? 1. Elipses if more than a couple options (think 10 options as a test) 2. Only getting 1 option back in the callback from google.

 

Thanks!

 

Actually, I'm wrong, the data is coming back, but just have to figure out why it's not getting parsed properly. It's definitely in the <merchant-item-private-data/> so that's a good sign. I'm looking at the code further.

 

Thanks, Kevin

Link to comment
Share on other sites

Actually, I'm wrong, the data is coming back, but just have to figure out why it's not getting parsed properly. It's definitely in the <merchant-item-private-data/> so that's a good sign. I'm looking at the code further.

 

Thanks, Kevin

   
	//------insert customer choosen option to order--------

	$attributes_exist = '0';
	$products_ordered_attributes = '';
	if (isset($order->products[$i]['attributes'])) {		  $attributes_exist = '1';
	  for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

 

I feel as if the above code in the responsehandler.php is not looping properly or even being called since it only seems to be grabbing 1 product option.

Link to comment
Share on other sites

Hi people, hope someone can help, i'm turning grey and going bald with this problem and can't semm to fin a concrete solution through the forums, though it seems peopl do have similiat troubles... I have Google checkout installed, i'm receiving no errors throughout the whole sale process. When an order is processed by google checkout, customer is returned to the store but with the cart still full and the OSC admin isn't receiving anything about the order.

 

I've tried rolling back and re-installing double checking absolutely everything about the instructions but to no avail. >_<

 

searching i found this little test tool http://demo.globant.com/~brovagnati/tools/...andler_test.php that gave me this report as below, hope this sheds some light on the matter:

 

XML We Sent: Authorization: Basic XXXXXX:XXXXXX
Content-Type: application/xml;charset=UTF-8
Accept: application/xml;charset=UTF-8
X-Origin-IP: [i]xx.xxx.xx.xxx[/i]

XML We Received: HTTP/1.0 500 Internal Server Error
Date: Sat, 15 Mar 2008 23:39:23 GMT
Server: Apache 3 - HOSTMerit
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from proxy.globant.com
Proxy-Connection: close

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
webmaster@[i]oscinstallation[/i].com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<P>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.
<HR>
<ADDRESS>Apache/1.3.39 Server at [i]oscinstallation[/i].com Port 80</ADDRESS>
</BODY></HTML>

 

Incidentally i have the two google checkout tables in my database too.

 

As the symptoms i'm experiencing seem quite common how about an faq on the matter, or a decent trouble-shooting guide for this matter please mr developer and contributors???

 

thanks for listening!

 

is there a solution to this? i'm having the same problem.

Link to comment
Share on other sites

   
	//------insert customer choosen option to order--------

	$attributes_exist = '0';
	$products_ordered_attributes = '';
	if (isset($order->products[$i]['attributes'])) {		  $attributes_exist = '1';
	  for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

 

I feel as if the above code in the responsehandler.php is not looping properly or even being called since it only seems to be grabbing 1 product option.

 

Found the problem, find the fix on the contrib page for the google check out:

http://www.oscommerce.com/community/contributions,4556/

Link to comment
Share on other sites

I've been working to fully integrate this with the INDIVIDUAL SHIP CONTRIBUTION , basically a hack but it works great, here is my fix:

 

INTEGRATING GOOGLE CHECKOUT with INDIVIDUAL SHIP CONTRIBUTION

 

googlecheckout/gcheckout.php

FIND:
if (isset ($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
	reset($products[$i]['attributes']);
	while (list($option, $value) = each($products[$i]['attributes'])) {
		$products_name .= "\n- ". $products[$i][$option]['products_options_name'] .' '
						. $products[$i][$option]['products_options_values_name'];
	}
}

ADD AFTER:
//*** Products Individual Ship
$products_indiv_ship = tep_db_fetch_array(tep_db_query("select products_ship_price, products_ship_price_two from " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . $products[$i]['id'] ."' "));
if (($products[$i]['quantity'] >= 2) && ($products_indiv_ship['products_ship_price_two'] > 0)){
$add_ship_charges = $add_ship_charges + $products_indiv_ship['products_ship_price'] + (($products[$i]['quantity'] - 1) * $products_indiv_ship['products_ship_price_two']);
} else {
$add_ship_charges = $add_ship_charges + ($products[$i]['quantity'] * $products_indiv_ship['products_ship_price']);
}
//*** End Products Individual Ship


FIND:
	  $values = explode('|', gc_compare($CCSCode . $method. $type , $carriers_config, "_CCS:", '0|0|0'));
	  if($values[0] != '0') {

ADD AFTER:
//*** Individual Ship Charges
		  $values[1] = $values[1] + $add_ship_charges;
//*** End Individual Ship Charges

 

 

I hope whoever releases the next version will include this in the instructions along with my product attributes fix for all to use.

In the mean time I hope this is able to help someone else, enjoy! ;)

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

I got Google Checkout working, however, the shipping rates aren't right. Its half less than the rate i got from FedEx website. Is there any way to fix it? Also, there is a limit of 150 lbs for each order, is there any way i can cancel that?

Sorry for another question, how do i exclude Alaska and Hawaii from ordering online? Thanks a lot.

The version is Google Checkout Module v1.4.5_CCS and using Carrier Calculator Shipping Configuration for the shipping rate.

 

I think there is actually a weight limit of 175, at least if you are using FedEx, at which point Google Checkout just sends you to a screen saying:

"Oops! We were unable to process your request."

 

I wonder if it has something to do with the max weight FedEx will accept for a box, and google checkout is querying them as if it will all go in one box?

 

Anyway I don't have a clue how to fix it, the only thing I can think is to possibly disable Google Checkout on orders over 175, can anyone else suggest a fix?

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

When I went to disable shipping over 175 pounds in googlecheckout/gcheckout.php it seems that it is not taking into account the packaging materials fixed # or % set in admin like all other shipping contributions do.

 

For instance if I want to disable packages over 175 I really use 150 pounds since the packaging is not figured in like so:

 

googlecheckout/gcheckout.php

FIND:
if (($googlepayment->merchantid == '') || ($googlepayment->merchantkey == '')) {
 $Gcart->SetButtonVariant(false);
 $Gwarnings[] = GOOGLECHECKOUT_STRING_WARN_NO_MERCHANT_ID_KEY;
}

ADD AFTER:
//*** Disable if over 175 pounds 
if ($total_weight > 150) {
 $Gcart->SetButtonVariant(false);
}

 

Has anyone else noticed this and is there a fix or did I just overlook something?

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

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