Jump to content
Silverado05

Offical Google Checkout module for osCommerce Support Thread

Recommended Posts

Hello, i have just installed google check out and done as much as i can, it seems that the it works goolge gets all the details and deals with the tranaction but there is no information being sent back to oscommerce i just ran the test document and got the below:

 

XML We Sent: Authorization: Basic XXXXXX:XXXXXX

Content-Type: application/xml;charset=UTF-8

Accept: application/xml;charset=UTF-8

X-Origin-IP: 212.32.115.23

 

 

 

XML We Received: SSL certificate problem, verify that the CA cert is OK. Details:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

 

i have a working ssl installed on my server that i have to problems with.

 

Also anouther question, google is going to be my only payment method but then i click on checkout with out clikcing google button there are no payment methods listed so someone can get throught the checkout with out buying. what i would like to to turn the oscommerce standard checkout button in the the google button to bypass the whole procedure.

 

i look forward to your reply

 

regards,

 

mark

www.swws.biz/swws1

Share this post


Link to post
Share on other sites

How to set .htaccess file for PHP over CGI?

 

I'm trying to configure Google checkout, but I don't know how to do Read Me step #4.

 

 

4. .htaccess Basic Authentication Mode with PHP over CGI? If your site is

installed on a PHP CGI you must disable Basic Authentication over PHP.

To avoid spoofed messages (only if this feature is enabled) reaching

responsehandler.php, set the .htaccess file with the script linked

(http://your-site/admin/htaccess.php).

 

I think that's why my sandbox order returns error 400 messages from catalog/googlecheckout/responsehandler.php.

I'm assuming my GoDaddy Linux server is PHP over CGI (I don't know how to tell except for mental telepathy). My OsCommerce site has been running for a year, so I must have done .htaccess before (the memory is gone), but I don't know what 'set' in "set the .htaccess file" means.

 

What script? Am I creating a new .htaccess in http://your-site/admin/htaccess.php? Not http://your-site/catalog/admin/htaccess.php? Does this file have to have my merchant ID & key or something?

 

I've searched for days trying to find out how to do this (this forum & Google's). If you could explain it to me or direct me to more detailed instructions, I would be grateful to the point of smiling.

 

Please fill my empty head.

 

Thank you.

Share this post


Link to post
Share on other sites
why is the google checkout button only showing on the viewcart page and not the payment page?

 

It's not supposed to show up ANYWHERE other than the shopping cart and the login page.

 

Google Checkout does not want to be perceived as a payment 'method'....therefore, it is designed to show up ONLY in the shopping cart and login pages.

 

Look at it this way...it's a checkout method. Rather than click thru screen after screen to go thru normal checkout...one places items in their carts and clicks on Google Checkout...enters their info...and they're done. It's a beautiful thing, really.

 

just added Google Checkout v1.4 ropu 17 Jul 2007 to our store and i'm wondering if you add a tracking number and change the status from processing to shipped in the osC admin, will this automatically update in the Google Checkout admin?

 

Yes. That's exactly what should happen. Login to your actual Google Checkout merchant account and view Orders to verify that is what's happening. The status of their order should change in both your website AND in your Merchant account.

 

 

is there a way then to make the google checkout button the last thing they see, forcing them to click it instead of goign thru the checkout process?

Share this post


Link to post
Share on other sites

Hi Guys,

 

I need this Google Checkout mod installed on our UK OSC store as I cannot do it myself

 

If you can help, please PM me and we can reach an arrangement.

 

Thanks

Share this post


Link to post
Share on other sites

Got it. Thanks to dangermouse (google forum) and wizzy and that thing about googlecheckout.php tables being commented out, I got rid of the 400 errors. It just took me a few days and a few billion new dendrites.

 

How to set .htaccess file for PHP over CGI?

 

I'm trying to configure Google checkout, but I don't know how to do Read Me step #4.

4. .htaccess Basic Authentication Mode with PHP over CGI? If your site is

installed on a PHP CGI you must disable Basic Authentication over PHP.

To avoid spoofed messages (only if this feature is enabled) reaching

responsehandler.php, set the .htaccess file with the script linked

(http://your-site/admin/htaccess.php).

 

I think that's why my sandbox order returns error 400 messages from catalog/googlecheckout/responsehandler.php.

Share this post


Link to post
Share on other sites
is there a way then to make the google checkout button the last thing they see, forcing them to click it instead of goign thru the checkout process?

what i did for a quick fix was to replace the checkout button with a tranparent pixcel so the button wasnt there any more forcing you to checkout wiht google have a look at www.swws.biz/swws1

Share this post


Link to post
Share on other sites

I didnt want to double my code with the ipn contrib so I played with this a little today.

 

I found that if you insert this code:

 

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

 

into your checkout_payment.php it will work for checkout. I created separate tables, moved the continue button into the table which houses my money order checkout so those who want to send a check will continue through my regular checkout, and I created another table (infobox) and added text for google checkout (ie: Would you like to pay with a credit or debit card? and Continue credit card payment via google checkout) before the button. This way buyers still have a choice during checkout (I only offer google and the money order checkout) if they didnt use the button in the cart, now they are certainly aware that if they want to pay with a credit card, they'll have to use google checkout without being that obvious. Just be careful about that </form> code, you'll need to move it above your google checkout button.

 

I have the button in both the cart and the checkout_payment page now and they work perfectly fine and I am not violating any of googles rules since buyers dont have to create an account to use it, but if they ignore the button in the cart and login pages, they'll have yet another chance to use it in my onsite checkout.

 

I also discovered that you can make the google checkout button smaller by replacing "large" with "small" or "medium" in googlecheckout/library/googlecart.php. there were several places I replaced it, I didnt take the time to see which one actually worked, just changed them all (except, did not change any of the "case "large":" ones). Just wanted to share a tip in case anyone was looking to do the same. Feel free to expand on that if you do figure out which one actually changed it in the cart for those here who dont want to change them all. :)

 

I would have wrote it up with instructions and a contrib, but I just dont have the time, sorry.

Share this post


Link to post
Share on other sites

Hi All,

Website running on Oscommerce 2.2

 

Until now I am using

Google Checkout v1.3RC2 rev2 (By Ropu)

Now Most of time when customer reach to Google wesite for payment Google doesnot show right or sometime no price at all for Shipping.

 

 

I just saw new version v1.4.5a with Carrier Calculated Shipping By Ropy Released on 02nd October 2007.

 

Please advise me Upgrade Procedure, or if I have to remove it please advise whare are Steps to remove and upgrade to new one.

 

Regards

 

Zee

Share this post


Link to post
Share on other sites

What is the easiest way to set a flat-rate shipping costs (e.g. $1) per item?

 

Problem is, the module--payment-gco- shows

 

-------

 

"

Default Values for Real Time Shipping Rates

 

Default values for real time rates in case the webservice call fails.

Set Default Value to 0 to disable the method

Shipping Generator

 

No merchant calculation shipping selected"

 

-----

 

There is no option to enable/disable or set any value.

 

I used the shipping_generator, generated a code, copied to shipping_generator.php

and there is no change on the above display.

 

I don't want to use any of those "domestic" "international" "fedex" "UPS" whatever.

I want the simplest shipping cost per item (e.g. $1) passed to google for

tallying to the subtotal. Right now it shows "--" in google sandbox and doesn't move

past that screen.

 

Thank you for all pointers.

Share this post


Link to post
Share on other sites
Hi All,

Website running on Oscommerce 2.2

 

Until now I am using

Google Checkout v1.3RC2 rev2 (By Ropu)

Now Most of time when customer reach to Google wesite for payment Google doesnot show right or sometime no price at all for Shipping.

I just saw new version v1.4.5a with Carrier Calculated Shipping By Ropy Released on 02nd October 2007.

 

Please advise me Upgrade Procedure, or if I have to remove it please advise whare are Steps to remove and upgrade to new one.

 

Regards

 

Zee

 

 

I used to have that one too, I just went through the instructions backwards and removed all the previous code so I could start fresh with the most recent update.

Share this post


Link to post
Share on other sites

I'm looking into Google checkout, I currently use Paypal. I've installed OSC and customized myself and done most contributions as well. I'm not really good with php, just follow instructions and post here with problems. My question is how difficult is the Google checkout contribution? Can I do this myself? Thanks for any input!

 

Faithfully,

 

Dawn

Share this post


Link to post
Share on other sites
I'm looking into Google checkout, I currently use Paypal. I've installed OSC and customized myself and done most contributions as well. I'm not really good with php, just follow instructions and post here with problems. My question is how difficult is the Google checkout contribution? Can I do this myself? Thanks for any input!

 

Faithfully,

 

Dawn

 

Since you already have customized OSC files, you need to manually

edit several files for google checkout implementation. While those

are not hard to do, other related support for google checkout

implementation appear severely lacking in details and even tiny

misteps owing to poorly designed instruction set cause agony for

lengthy durations. The error messages are poorly documented with

solutions.

 

However, my impression is, after setting it up it may be easier

than PayPal for customers.

 

If your shop is already open for business, the pain level might be

even greater than just setting it up.

Share this post


Link to post
Share on other sites

Need some help with this if at all possible? I'm going out of my mind trying to understand why it won't work for the nth time!

 

I installed the newest version as found on Google's site; v1.4.5

 

It works, after a fashion, via the Sandbox, but I have several problems:

 

1) It doesn't add postage costs

2) When I try and generate postage costs I get a load of code warnings:

 

Warning: shipping::include(includes/languages/english/modules/shipping/gCheckout_flat.php) [function.shipping-include]: failed to open stream: No such file or directory in /home/blackdra/public_html/includes/classes/shipping.php on line 36

Warning: shipping::include(includes/languages/english/modules/shipping/gCheckout_flat.php) [function.shipping-include]: failed to open stream: No such file or directory in /home/blackdra/public_html/includes/classes/shipping.php on line 36

Warning: shipping::include() [function.include]: Failed opening 'includes/languages/english/modules/shipping/gCheckout_flat.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackdra/public_html/includes/classes/shipping.php on line 36

Warning: shipping::include(includes/languages/english/modules/shipping/gCheckout_item.php) [function.shipping-include]: failed to open stream: No such file or directory in /home/blackdra/public_html/includes/classes/shipping.php on line 36

Warning: shipping::include(includes/languages/english/modules/shipping/gCheckout_item.php) [function.shipping-include]: failed to open stream: No such file or directory in /home/blackdra/public_html/includes/classes/shipping.php on line 36

Warning: shipping::include() [function.include]: Failed opening 'includes/languages/english/modules/shipping/gCheckout_item.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackdra/public_html/includes/classes/shipping.php on line 36

 

And, although it shows the shipping options (Royal Mail First Class etc) all the values are set at 0. Is this supposed to happen?

 

3) In my admin panel I get more code in "Payment Modules":

 

Warning: include(/home/blackdra/public_html/includes/languages/english/modules/payment/gCheckout.php) [function.include]: failed to open stream: No such file or directory in /home/blackdra/public_html/admin/modules.php on line 152

Warning: include() [function.include]: Failed opening '/home/blackdra/public_html/includes/languages/english/modules/payment/gCheckout.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackdra/public_html/admin/modules.php on line 152

 

And under "Shipping":

 

Warning: include(/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_flat.php) [function.include]: failed to open stream: No such file or directory in /home/blackdra/public_html/admin/modules.php on line 152

Warning: include() [function.include]: Failed opening '/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_flat.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackdra/public_html/admin/modules.php on line 152

Warning: include(/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_item.php) [function.include]: failed to open stream: No such file or directory in /home/blackdra/public_html/admin/modules.php on line 152

Warning: include() [function.include]: Failed opening '/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_item.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackdra/public_html/admin/modules.php on line 152

 

4) And finally on the "What's In My Cart?" section of my store:

 

Warning: include_once(/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_flat.php) [function.include-once]: failed to open stream: No such file or directory in /home/blackdra/public_html/googlecheckout/gcheckout.php on line 344

Warning: include_once() [function.include]: Failed opening '/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_flat.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackdra/public_html/googlecheckout/gcheckout.php on line 344

Warning: include_once(/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_item.php) [function.include-once]: failed to open stream: No such file or directory in /home/blackdra/public_html/googlecheckout/gcheckout.php on line 344

Warning: include_once() [function.include]: Failed opening '/home/blackdra/public_html/includes/languages/english/modules/shipping/gCheckout_item.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackdra/public_html/googlecheckout/gcheckout.php on line 344

 

I've tried searching for a solution, but I can't seem to find any! Any advice would be grately appreciated!

 

Cheers,

Loups


If at first you don't succeed, try, try, try again...

 

...Then ask for help!

Share this post


Link to post
Share on other sites

google is not very compatable with the shipping moduals what shipping have you got installed, try remvoing them all and just use basic tabel just to see if it works

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for the reply. I've got UK Shipping Methods installed. I did have the Estimated Shipping contrib as well, but I removed it. At least, I removed all the bits I could find! :rolleyes:


If at first you don't succeed, try, try, try again...

 

...Then ask for help!

Share this post


Link to post
Share on other sites

Guys i am so stuck, and ready to just give up on GC!!!!

 

I have found a few dicussions on this, but no confirmed answers.

 

Basically; I am using table rate shipping - and it works perfect on the OSC side, but when the transaction passes to G the shipping drop down box states: "Table: Table (£0.00)"

 

It does not cross over my table rates for shipping. I have read this is due to the fact we use table rate to determine costs according to the weight of the items - and GC not processing weight?

 

I could be wrong - this was something i found doing a google search.

 

Has anyone managed to get GC to work with table rate, based on weight, and can anyone assist me with this?

 

Thanks in advance, it is really appreciated

 

Cas

:thumbsup:

Share this post


Link to post
Share on other sites

Hi,

 

I just upgraded to new version of Google checkout..

 

after Sucessfull installation I am getting problem in displaying Shipping prices, I am using, Royal mail, and city link shipping method not usp.

 

Getting this error in Shopping-cart.php

Error: Shipping Methods not configured

citylink (ignored)

parcelforce48 (ignored)

rmfirstrec (ignored)

rmspecial (ignored)

rmstandardparcel (ignored)

 

Google checkout order page only showing Table rate.

 

Please help.

 

Regards

 

zee

Share this post


Link to post
Share on other sites

Hi ,

I recently updated,

After Sucessfull installation I got problem in displaying Shipping

prices, I am using, Royal mail, and city link shipping method not ups.

Had error in Shopping-cart.php

Error: Shipping Methods not configured

citylink (ignored)

parcelforce48 (ignored)

rmfirstrec (ignored)

rmspecial (ignored)

rmstandardparcel (ignored

I fixed this problem after I made changes in /googlecheckout/

shipping_methods.php (dont know if this was right way or not) I manage

to get every thing right in Shopping Cart and also in Google checkout

page.

==================================================================

googlecheckout/shipping_methods.php

===================================================================

<?php

/*

**GOOGLE CHECKOUT ** v1.4

* @version $Id: shipping_methods.php 5342 2007-06-04 14:58:57Z ropu $

*

*/

// this are all the available methods for each shipping provider,

// see that you must set flat methods too!

// CONSTRAINT: Method's names MUST be UNIQUE

// Script to create new shipping methods

// http://demo.globant.com/~brovagnati/tools -> Shipping Method

Generator

 

$mc_shipping_methods = array(

'rmfirstrec' => array(

'domestic_types' =>

array(

'rmfirstrec' => '1 to 4

days',

 

),

 

'international_types' =>

array(

),

),

'rmspecial' => array(

'domestic_types' =>

array(

'rmspecial' => 'Next Day

Delivery',

 

),

 

'international_types' =>

array(

'rmspecial' => '2 to 4

days',

),

),

'rmstandardparcel' => array(

'domestic_types' =>

array(

'rmstandardparcel' => '1 to

3 days',

),

 

'international_types' =>

array(

),

),

 

'citylink' => array(

'domestic_types' =>

array(

'citylink' => 'Next Day',

),

 

'international_types' =>

array(

),

),

 

'parcelforce48' => array(

'domestic_types' =>

array(

'parcelforce48' => 'Ships

within 48 Hours',

),

 

'international_types' =>

array(

),

),

 

'table' => array(

'domestic_types' =>

array(

'table' => 'Table Rate'

),

 

'international_types' =>

array(

'table' => 'Table intl'

),

),

);

 

$mc_shipping_methods_names = array(

'rmfirstrec' => 'Royal Mail

Rec',

'rmspecial' => 'RM Special',

'rmstandardparcel' => 'RM

Parcel',

'citylink' => 'City

Link',

'parcelforce48' =>

'ParcelForce48',

'table' => 'Table',

);

 

?>

===============================================================

 

But Now problem I have is Sometime Google checkout Shows exactly Right

price calculated on weight and price, but some time(may be mostly)

Google checkout shows "£1.00" on all available shipping options.

 

I cant figure out why this is happening is it because of Delay in

server response.

Please help me to fix this issue. Will be very gratefull for all

responses.

 

Regards

 

Zee

Share this post


Link to post
Share on other sites

does this work the same way as paypal wpp? ie: there's a google checkout button on the login page, if they choose google checkout it goes to google, they login via google checkout and then pay through there, then it comes back to the shipping/address information, then it checks out?

 

also does this work with upsxml & usps?

Edited by jasyn

Share this post


Link to post
Share on other sites
Security under unix?

 

This is probably a really basic issue, but I have set a unix oscommerce store up and sucessfully (well it works!) integrated googlecheckout. However, I am uneasy about setting the /googlecheckout/response_message.log file to have permissions of 777 - it strikes me anyone can then read it and access names, addresses etc of customers. I am sure I am just ignorant of unix set up, so please can someone help me...

 

Thanks

 

This answer is probably a little late but if you installed the contribution, it should have had an .htaccess file with it that goes in the logs directory that looks like this:

 

***********************************************************

BOF

 

# $Id: .htaccess 2856 2007-06-08 00:42:19Z Ropu $

#

# This is used with Apache WebServers

# The following blocks direct HTTP requests in this directory recursively

#

# This will prevent access to logs from the web

 

<Files *.log>

Order Deny,Allow

Deny from all

Allow from localhost

</Files>

 

EOF

*******************************************************

(And would be basically the same as unix/linix) servers

This file only allows local host (serverside)access to these files........

You can type in : http://www.yoursite.com/public_html/google...nse_message.log

(or url to your files to see if it will call it up!!)

Hope this helps

Share this post


Link to post
Share on other sites

So, I'm guessing by the lack of response to my question and the question at the top of page 13, that no-one knows how to fix this table rate postage problem? <_<

 

I mean, I've been trying for about three months, on and off, to get this thing to work properly! But nothing works. Is there a contrib that can be used with Google Checkout, using table rates, that actually works? Because I tell you, I'm sick and tired of this one.

 

Don't get me wrong, I do appreciate the time and effort the people who makes these things put in, but it's been a monumental waste of my time trying to get it to work! :blink:

 

Blessings,

Loups


If at first you don't succeed, try, try, try again...

 

...Then ask for help!

Share this post


Link to post
Share on other sites

Ok so ive installed the Google checkout module and everything with the installation seems fine.

The only problem I come across is the shipping, when I go to the shopping_cart.php page it shows the following message:

* There are multiple shipping options selected and they use different shipping tax tables or some dont use tax tablesError: Shipping Methods not configured 
freeamount (ignored)
nextday (ignored)

 

I think I know why the tax table error comes up, this is because the free shipping (freeamount.php) does not let you choose a tax class. Does anyone know how I can add the tax option to the free shipping module?

 

I managed to configure the standard flat rate shipping and it shows the correct price when I go to the google checkout page however, I also have a module called priority.php and I configured this in the shipping_methods.php file however, this only shows £1 for delivery and does not seem to be linked to the module price.

 

Also on our site the tax is added on the goods and the delivery, is this also the case with google checkout?

 

freeamount.php (free shipping with minimum amount module) < Need to add tax class on this so that googlecheckout does not give the tax error.

<?php
/*
 $Id$ freeamount.php 2

 The Exchange Project - Community Made Shopping!
 http://www.theexchangeproject.org

 Copyright (c) 2003

 Released under the GNU General Public License

 ----------------------------------------------
 ane - 06/02/02 - modified freecount.php to
 allow for freeshipping on minimum order amount
 originally written by dwatkins 1/24/02
 Modified BearHappy 09/04/04
 ----------------------------------------------
*/

 class freeamount {
var $code, $title, $description, $icon, $enabled;

// class constructor
function freeamount() {
  global $order, $customer;

  $this->code = 'freeamount';
  $this->title = MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE;
  $this->description = MODULE_SHIPPING_FREEAMOUNT_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER;
  $this->icon ='';
  $this->enabled = ((MODULE_SHIPPING_FREEAMOUNT_STATUS == 'True') ? true : false);

  if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEAMOUNT_ZONE > 0) ) {

	$check_flag = false;
	$check_query = tep_db_query("select zone_id, zone_country_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FREEAMOUNT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
	$order_shipping_country = $order->delivery['country']['id'];

	while ($check = tep_db_fetch_array($check_query)) {

	  if ($check['zone_id'] < 1) {
		$check_flag = true;
		break;
	  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
//		  } elseif ($check['zone_country_id'] == $order->delivery['country']['id']) {
		$check_flag = true;
		break;
	  }
	}
	if ($check_flag == false) {
	  $this->enabled = false;
	}
 }
}

// class methods
function quote($method = '') {
  global $order, $cart, $shipping_weight, $shipping_num_boxes;

  $dest_country = $order->delivery['country']['id'];
  $currency = $order->info['currency'];
  $get_total = false;
  $get_weight = false;
  $cart_total = $cart->show_total();

	if (MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS == 'True') {
	  // 28-9-2005 Check for articles on special which should not get free shipment
	  // Adjust the cart total price for this
	  $total_specials = 0;
	  if ($cart->count_contents() > 0) {
		 $products = $cart->get_products();
		 for ($i=0, $n=sizeof($products); $i<$n; $i++) {
			if ($special_price = tep_get_products_special_price($products[$i]['id'])) {
			   $products_price = $special_price;
			   $total_specials += $products_price;
			}
		 }
	  }

	  $cart_total = $cart_total - $total_specials;
	}

  if ($cart_total < MODULE_SHIPPING_FREEAMOUNT_AMOUNT)
  {
	if (MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'True')
	   {
		$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;
	   }
	$get_total = false;
   } else {
	$get_total = true;
   }
  $total_weight = $shipping_num_boxes * $shipping_weight;
  if ($total_weight > MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX)
	  {
		if (MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'True')
		   {
			  $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_TO_HEIGHT;
		   }
		$get_weight = false;
  } else {
   $get_weight = true;
  }

if (($get_total == true && $get_weight == true))
{
	$this->quotes = array('id' => $this->code,
							'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE,
							'methods' => array(array('id' => $this->code,
							'title' => MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY,
							'cost' => MODULE_SHIPPING_FREEAMOUNT_COST)));
}


  if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);

  return $this->quotes;

}

function check() {
  if (!isset($this->_check)) {
	$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FREEAMOUNT_STATUS'");
	$this->_check = tep_db_num_rows($check_query);
  }
  return $this->_check;
}

function install() {
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Free Shipping with Minimum Purchase', 'MODULE_SHIPPING_FREEAMOUNT_STATUS', 'True', 'Do you want to offer minimum order free shipping?', '6', '7', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id,  sort_order, date_added) values ('Maximum Weight', 'MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX', '10', 'What is the maximum weight you will ship?', '6', '8', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Display', 'MODULE_SHIPPING_FREEAMOUNT_DISPLAY', 'True', 'Do you want to display text way if the minimum amount is not reached?', '6', '7', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id,  sort_order, date_added) values ('Minimum Cost', 'MODULE_SHIPPING_FREEAMOUNT_AMOUNT', '50.00', 'Minimum order amount purchased before shipping is free?', '6', '8', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id,  sort_order, set_function, date_added) values ('Disable for Specials', 'MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS', 'True', 'Do you want to disable free shipping for products on special?', '6', '7', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_FREEAMOUNT_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
  }

function remove() {
  tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}

  function keys() {
 $keys = array(
	   'MODULE_SHIPPING_FREEAMOUNT_STATUS',
	   'MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX',
	   'MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER',
	   'MODULE_SHIPPING_FREEAMOUNT_DISPLAY',
	   'MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS',
	   'MODULE_SHIPPING_FREEAMOUNT_AMOUNT',
	   'MODULE_SHIPPING_FREEAMOUNT_ZONE'
	   );
 return $keys;
  }
}
?>

 

 

shipping_methods.php

<?php
/*
**GOOGLE CHECKOUT ** v1.4
* @version $Id: shipping_methods.php 5342 2007-06-04 14:58:57Z ropu $
* 
*/
 // this are all the available methods for each shipping provider, 
 // see that you must set flat methods too!
 // CONSTRAINT: Method's names MUST be UNIQUE
 // Script to create new shipping methods
 // http://demo.globant.com/~brovagnati/tools -> Shipping Method Generator

 $mc_shipping_methods = array(
					'usps' => array(
								'domestic_types' =>
								  array(
									  'Express' => 'Express Mail',
									  'First Class' => 'First-Class Mail',
									  'Priority' => 'Priority Mail',
									  'Parcel' => 'Parcel Post'
									   ),

								'international_types' =>
								  array(
									  'GXG Document' => 'Global Express Guaranteed Document Service',
									  'GXG Non-Document' => 'Global Express Guaranteed Non-Document Service',
									  'Express' => 'Global Express Mail (EMS)',
									  'Priority Lg' => 'Global Priority Mail - Flat-rate Envelope (large)',
									  'Priority Sm' => 'Global Priority Mail - Flat-rate Envelope (small)',
									  'Priority Var' => 'Global Priority Mail - Variable Weight Envelope (single)',
									  'Airmail Letter' => 'Airmail Letter Post',
									  'Airmail Parcel' => 'Airmail Parcel Post',
									  'Surface Letter' => 'Economy (Surface) Letter Post',
									  'Surface Post' => 'Economy (Surface) Parcel Post'
									   ),
									),
					'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'
									   ),
									),
					'upsxml' => array(
								'domestic_types' =>
								  array(
									  'UPS Ground' => 'UPS Ground',
									  'UPS 3 Day Select' => 'UPS 3 Day Select',
									  'UPS 2nd Day Air A.M.' => 'UPS 2nd Day Air A.M.',
									  'UPS 2nd Day Air' => 'UPS 2nd Day Air',
									  'UPS Next Day Air Saver' => 'UPS Next Day Air Saver',
									  'UPS Next Day Air Early A.M.' => 'UPS Next Day Air Early A.M.',
									  'UPS Next Day Air' => 'UPS Next Day Air'
									   ),

								'international_types' =>
								  array(
									  'UPS Worldwide Expedited' => 'UPS Worldwide Expedited',
									  'UPS Saver' => 'UPS Saver'
									   ),
									),
					'zones' => array(
								'domestic_types' =>
								  array(
									  'zones' => 'Zones Rates'
									   ),

								'international_types' =>
								  array(
									  'zones' => 'Zones Rates intl'
									   ),
									),
					'flat' => array(
								'domestic_types' =>
								  array(
									  'flat' => 'Flat Rate Per Order'
									   ),

								'international_types' =>
								  array(
									  'flat' => 'Flat Rate Per Order intl'
									   ),
									),
					'item' => array(
								'domestic_types' =>
								  array(
									  'item' => 'Flat Rate Per Item'
									   ),

								'international_types' =>
								  array(
									   ),
									),
					'itemint' => array(
								'domestic_types' =>
								  array(
									   ),

								'international_types' =>
								  array(
									  'itemint' => 'Flat Rate Per Item intl'
									   ),
									),
					'table' => array(
								'domestic_types' =>
								  array(
									  'table' => 'Table'
									   ),

								'international_types' =>
								  array(
									  'table' => 'Table intl'
									   ),
									),
					 'priority' => array(
								'domestic_types' =>
								  array(
									  'priority' => 'Flat Rate Per Order'
									   ),
									   ),
							  );

 $mc_shipping_methods_names = array(
									 'usps' => 'USPS',
									 'fedex1' => 'FedEx',
									 'upsxml' => 'Ups',
									 'zones' => 'Zones',
									 'flat' => 'Flat Rate',
									 'item' => 'Item',
									 'priority' => 'Next Day',
									 'itemint' => 'Item Inter',
									 'table' => 'Table',
									);

?>

 

Any help is greatly appreciated.

 

Kind regards

 

p4rma

Edited by parma

Share this post


Link to post
Share on other sites

Ok you can ignore most of my previous post. I have configured all the shipping options. The only problem remaining is the free shipping option. Has anyone managed to get this working?

 

Thanks

Share this post


Link to post
Share on other sites

I installed the gc 1.4.5 module and the gc image shows up in the shopping cart page, however, it does not show up as one of the payment options in the checkout_payment page. Can someone tell me what am I doing wrong please??? Bear with me I am kinna new to this.

Share this post


Link to post
Share on other sites

Hello,

 

I would like to offer a google checkout specific shipping rate of £5 to the uk only.

 

The rest of my site uses zone/county based shipping in the uk which will not work with the current google checkout module e.g. mainland uk, highlands etc

 

As a work around I want to offer a flat rate for the uk of 5.00 just for google checkout customers but keep my current (and complicated) shipping for normal checkout. The problem is, if I enbale a flat rate for the shop so that google checkout can pickup the details, the standard checkout will also show this option which is not what I we want.

 

Any ideas appreciated?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×