Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google Checkout Template Layout Problem!


mystifier_uk

Recommended Posts

Firstly, I'd like to know how you have configured your UPS shipping module. Go into Admin and select to edit the module. Where it says shipping zone at the bottom...does it read 'none' or what?

 

If it reads as none, then you essentially are shipping worldwide. If you wish to ship to the US only, you will need to visit Admin > Configuration > Locations/Taxes > Tax Zones.

 

This really has nothing to do with taxes, per se....you are simply setting up which zone you need in the UPS module so that shipping is only offered to that zone. When you open tax zones, there may already be the default (I think) folder of US sitting there. If not, you need to create it. Click Insert....for Zone Name, put USA...for Zone Description...put United States. And click Insert.

 

Now, click on the little yellow folder next to USA on your screen...select Insert...select United States from the dropdown list of countries...leave Zones set as All Zones (this means you ship to all 50 states in the US) and click Insert. You now have set up US as a zone which includes shipping to all 50 states in the USA.

 

Now, REMOVE your UPS shipping module and install it again. This time, your shipping dropdown box at the bottom will contain the choices of 'none' and USA. Select USA and save the module.

 

Next...you need to use the Google Checkout shipping generator and edit your googlecheckout.php file. Based on the errors you gave me (Free Shipping freeamount not configured!) I'm assuming you never edited this file to reflect your website's shipping options. Go to this link, and select and download the OSCommerce Automatic Shipping Method Generator. It's a tiny file, about 8kb.

 

http://demo.globant.com/~brovagnati/tools/

 

Unzip and upload the folder and its contents underneath your Googlecheckout folder. So the path would be Catalog > Googlecheckout > Shipping_Generator It's not IN the Googlecheckout folder....it's a new folder called Shipping_Generator which sits beneath the Googlecheckout Folder.

 

Point your web browser to http://www.yoursite.com/googlecheckout/shipping_generator and hit enter.

 

You'll be prompted to login. Login with your GC Account Merchant ID and Key as password.

 

Since you don't ship internationally, Nick...delete all of the entries in the fields for International Shipping Address, leaving them blank. Leave the Domestic Address and Cart Description as is and click on Get Shipping Methods. This will retrieve the exact code you need to insert in your googlecheckout.php file. You haven't done this yet so...that's why there's no shipping appearing when I go thru your website using GC as a test customer.

 

Copy the code it gives you and then, in Cpanel, go to catalog > includes > modules > payment > googlecheckout.php and select to edit that file.

 

If you've never edited the file, it should look exactly like this:

 

<?php
/*
 Copyright (C) 2007 Google Inc.

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/


/* GOOGLE CHECKOUT
* Class provided in modules dir to add googlecheckout as a payment option
* Member variables refer to currently set parameter values from the database
*/

class googlecheckout {
 var $code, $title, $description, $merchantid, $merchantkey, $mode, $enabled, $shipping_support, $variant;
 var $schema_url, $base_url, $checkout_url, $checkout_diagnose_url, $request_url, $request_diagnose_url;
 var $table_name = "google_checkout", $table_order = "google_orders";
 var $ship_flat_ui, $hash;

 // Class constructor
 function googlecheckout() {
global $order;
global $language;

require_once(DIR_FS_CATALOG .'/includes/languages/'. $language .'/modules/payment/googlecheckout.php');

$this->code = 'googlecheckout';
$this->title = MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_TITLE;
$this->description = MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_GOOGLECHECKOUT_SORT_ORDER;
$this->mode = MODULE_PAYMENT_GOOGLECHECKOUT_STATUS;
$this->merchantid = trim(MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTID);
$this->merchantkey = trim(MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTKEY);
$this->mode = MODULE_PAYMENT_GOOGLECHECKOUT_MODE;
$this->enabled = (MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') ? true : false;
$this->continue_url = MODULE_PAYMENT_GOOGLECHECKOUT_CONTINUE_URL;

// These are the flat shipping methods, add any other that is not merchant calculated 
$this->shipping_support = array("flat", "item", "table");

	  // These 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
 $this->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(
									  'item' => 'Flat Rate Per Item intl'
									   ),
									),
					'table' => array(
								'domestic_types' =>
								  array(
									  'table' => 'Table'
									   ),

								'international_types' =>
								  array(
									  'table' => 'Table intl'
									   ),
									),
							  );

 $this->mc_shipping_methods_names = array(
									 'usps' => 'USPS',
									 'fedex1' => 'FedEx',
									 'upsxml' => 'Ups',
									 'zones' => 'Zones',
									 'flat' => 'Flat Rate',
									 'item' => 'Item',
									 'table' => 'Table',
									);

$this->hash = NULL;
$this->ship_flat_ui = 'Standard flat-rate shipping';
$this->schema_url = 'http://checkout.google.com/schema/2';
$this->base_url = $this->mode .'cws/v2/Merchant/'. $this->merchantid;
$this->checkout_url = $this->base_url .'/checkout';
$this->checkout_diagnose_url = $this->base_url .'/checkout/diagnose';
$this->request_url = $this->base_url .'/request';
$this->request_diagnose_url = $this->base_url .'/request/diagnose';
$this->variant = 'text';

if ((int)MODULE_PAYMENT_GOOGLECHECKOUT_ORDER_STATUS_ID > 0) {
  $this->order_status = MODULE_PAYMENT_GOOGLECHECKOUT_ORDER_STATUS_ID;
}
 }

 function getMethods() {
  if($this->hash == NULL) {
  $rta = array();
	  $this->_gethash($this->mc_shipping_methods, $rta);
	  $this->hash = $rta;
  }
return $this->hash;
 }

 function _gethash($arr, &$rta, $path =array()) {
if (is_array($arr)) {
  foreach ($arr as $key => $val) {
	$this->_gethash($arr[$key], $rta, array_merge(array($key), $path));
  }
}
else {
  $rta[$arr] = $path;
}
 }

 // Function used from Google sample code to sign the cart contents with the merchant key.
 function CalcHmacSha1($data) {
$key = $this->merchantkey;
$blocksize = 64;
$hashfunc = 'sha1';
if (strlen($key) > $blocksize) {
  $key = pack('H*', $hashfunc($key));
}
$key = str_pad($key, $blocksize, chr(0x00));
$ipad = str_repeat(chr(0x36), $blocksize);
$opad = str_repeat(chr(0x5c), $blocksize);
$hmac = pack(
				'H*', $hashfunc(
						($key^$opad).pack(
								'H*', $hashfunc(
										($key^$ipad).$data
								)
						)
				)
			);
return $hmac; 
 }

 // Decides the shipping name to be used.
 // May not call this if the same name is to be used.
 // Useful if some one wants to map to Google checkout shopping types (flat, pickup or merchant calculate).
 function getShippingType($shipping_option) {
switch($shipping_option) {
  case GOOGLECHECKOUT_FLAT_RATE_SHIPPING:
	return $this->ship_flat_ui .'- Flat Rate'; 
  case GOOGLECHECKOUT_ITEM_RATE_SHIPPING:
	return $this->ship_flat_ui .'- Item Rate';
  case GOOGLECHECKOUT_TABLE_RATE_SHIPPING:
	return $this->ship_flat_ui .'- Table Rate';
  default:
	return '';
}	
 }

 // Function used to compute the actual price for shipping depending upon the shipping type selected.
 function getShippingPrice($ship_option, $cart, $actual_price, $handling = 0, $table_mode = '') {
  // Flat, item, table
switch($ship_option) {
  case 'flat':
	return $actual_price;	
  case 'item':
	return ($actual_price * $cart->count_contents()) + $handling;
  case 'table':
	// Check the mode to be used for pricing the shipping.
	if($table_mode == 'price') {
	  $table_size = $cart->show_total();
	}
	elseif ($table_mode == 'weight') {
	  $table_size = $cart->show_weight();
	}

	// Parse the price (value1:price1, value2:price2)						
	$tok = strtok($actual_price, ',');
	$tab_data = array();
	while($tok != FALSE) {
	  $tab_data[] = $tok;
	  $tok = strtok(',');
	}  
	$initial_val = 0;	  
	foreach($tab_data as $curr) {
	  $final_val = strtok($curr, ':');
	  $pricing = strtok(':'); 
	  if($table_size >= $initial_val && $table_size <= $final_val) {
		$price = $pricing + $handling;
		break;
	  }
	  $initial_val = $final_val;
	}
	return $price;
  default:
	return 0;
}		
 }

 // Class methods...
 function update_status() {
 }

 function javascript_validation() {
return false;
 }

 function selection() {
return array('id' => $this->code, 'module' => $this->title);
 }

 function pre_confirmation_check() {
return false;
 }

 function confirmation() {
return false;
 }

 function process_button() {
 }

 function before_process() {
return false;
 }

 function after_process() {
return false;
 }

 function output_error() {
return false;
 }

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

 function install() {
global $language;
require_once(DIR_FS_CATALOG .'includes/languages/'. $language .'/modules/payment/googlecheckout.php');
$shipping_list = 'array(\'not\')';
tep_db_query("ALTER TABLE ". TABLE_CONFIGURATION ." CHANGE `configuration_value` `configuration_value` TEXT NOT NULL");
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 GoogleCheckout Module', 'MODULE_PAYMENT_GOOGLECHECKOUT_STATUS', 'True', 'Accepts payments through Google Checkout on your site', '6', '0', '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, set_function, date_added) values ('.htaccess Basic Authentication Mode with PHP over CGI?', 'MODULE_PAYMENT_GOOGLECHECKOUT_CGI', 'False', 'This configuration will <b>disable</b> PHP Basic Authentication in the responsehandler.php to validate Google Checkout messages.<br />If setted True you MUST configure your .htaccess files <a href=\"htaccess.php\" target=\"_OUT\">here</a>.', '6', '4', 'tep_cfg_select_option(array(\'False\', \'True\'),',now())");	
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTID', '', 'Your merchant ID is listed on the \"Integration\" page under the \"Settings\" tab', '6', '1', now())");
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant Key', 'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTKEY', '', 'Your merchant key is also listed on the \"Integration\" page under the \"Settings\" tab', '6', '2', 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 ('Select Mode of Operation', 'MODULE_PAYMENT_GOOGLECHECKOUT_MODE', 'https://sandbox.google.com/checkout/', 'Select either the Developer\'s Sandbox or live Production environment', '6', '3', 'tep_cfg_select_option(array(\'https://sandbox.google.com/checkout/\', \'https://checkout.google.com/\'),',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 ('Select Merchant Calculation Mode of Operation', 'MODULE_PAYMENT_GOOGLECHECKOUT_MC_MODE', 'https', 'Merchant calculation URL for Sandbox environment. (Checkout production environment always requires HTTPS.)', '6', '4', 'tep_cfg_select_option(array(\'http\', \'https\'),',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 Google Checkout for Virtual Goods?', 'MODULE_PAYMENT_GOOGLECHECKOUT_VIRTUAL_GOODS', 'False', 'If this configuration is enabled and there is any virtual good in the cart the Google Checkout button will be shown disabled.', '6', '4', '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, set_function, date_added) values ('MultiSocket Shipping Quotes Retrieval', 'MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET', 'False', 'This configuration will enable a multisocket feature to parallelize Shipping Providers quotes. This should reduce the time this call take and avoid GC Merchant Calculation TimeOut. <a href=\"multisock.html\" target=\"_OUT\">More Info</a>.(Alfa)', '6', '4', '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, set_function, date_added) values ('Allow US PO BOX shipping?', 'MODULE_PAYMENT_GOOGLECHECKOUT_USPOBOX', 'True', 'Allow sending items to US PO Boxes?', '6', '4', '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, set_function, date_added) values ('Default Values for Real Time Shipping Rates', 'MODULE_PAYMENT_GOOGLECHECKOUT_SHIPPING', '', 'Default values for real time rates in case the webservice call fails.', '6', '5',\"gc_cfg_select_shipping($shipping_list, \",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 ('Rounding Policy Mode', 'MODULE_PAYMENT_GOOGLECHECKOUT_TAXMODE', 'HALF_EVEN', 'This configuration specifies the methodology that will be used to round values to two decimal places. <a href=\"http://code.google.com/apis/checkout/developer/Google_Checkout_Rounding_Policy.html\">More info</a>', '6', '4', 'tep_cfg_select_option(array(\'UP\',\'DOWN\',\'CEILING\',\'HALF_UP\',\'HALF_DOWN\', \'HALF_EVEN\'),',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 ('Rounding Policy Rule', 'MODULE_PAYMENT_GOOGLECHECKOUT_TAXRULE', 'PER_LINE', 'This configuration specifies when rounding rules should be applied to monetary values while Google Checkout is computing an order total.', '6', '4', 'tep_cfg_select_option(array(\'PER_LINE\',\'TOTAL\'),',now())");
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Google Analytics Id', 'MODULE_PAYMENT_GOOGLECHECKOUT_ANALYTICS', 'NONE', 'Do you want to integrate the module with Google Analytics? Add your GA Id (UA-XXXXXX-X), NONE to disable. <br/> More info <a href=\'http://code.google.com/apis/checkout/developer/checkout_analytics_integration.html\'>here</a>', '6', '1', now())");
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Continue shopping URL.', 'MODULE_PAYMENT_GOOGLECHECKOUT_CONTINUE_URL', 'index.php', 'Specify the page customers will be directed to if they choose to continue shopping after checkout.', '6', '8', 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 of display.', 'MODULE_PAYMENT_GOOGLECHECKOUT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
tep_db_query("create table if not exists ". $this->table_name ." (customers_id int(11), buyer_id bigint(20))");
tep_db_query("create table if not exists ". $this->table_order ." (orders_id int(11), google_order_number bigint(20), order_amount decimal(15,4))");
 }

 function remove() {
tep_db_query("delete from ". TABLE_CONFIGURATION ." where configuration_key in ('". implode("', '", $this->keys()) ."')");
// If it is required to delete GC tables on removing the module, the two lines below could be uncommented.
// tep_db_query("drop table " . $this->table_name);
// tep_db_query("drop table " . $this->table_order);
 }

 function keys() {
return array('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_CGI', 
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTID',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTKEY',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MODE',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MC_MODE',
			 'MODULE_PAYMENT_GOOGLECHECKOUT_VIRTUAL_GOODS',
//						   'MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_USPOBOX',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_SHIPPING',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_TAXMODE',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_TAXRULE',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_ANALYTICS',
			 'MODULE_PAYMENT_GOOGLECHECKOUT_CONTINUE_URL',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_SORT_ORDER');
 }
}
// ** END GOOGLE CHECKOUT **
?>

 

The part you need to edit and replace with the code the shipping generator gave you is here:

 

$this->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(
									  'item' => 'Flat Rate Per Item intl'
									   ),
									),
					'table' => array(
								'domestic_types' =>
								  array(
									  'table' => 'Table'
									   ),

								'international_types' =>
								  array(
									  'table' => 'Table intl'
									   ),
									),
							  );

 $this->mc_shipping_methods_names = array(
									 'usps' => 'USPS',
									 'fedex1' => 'FedEx',
									 'upsxml' => 'Ups',
									 'zones' => 'Zones',
									 'flat' => 'Flat Rate',
									 'item' => 'Item',
									 'table' => 'Table',
									);

 

Replace that entire chunk of code with what was generated by your shipping generator and save the file.

 

Now, go back into the Admin side of your website and select the Google Checkout Module and REMOVE it. Install it anew with your sandbox merchant ID and Key....remember Basic Authentication is set to True now...and you'll notice, there should be some empty fields to enter default values for UPS shipping now. This is in the event that Google cannot connect to UPS to retrieve the real-time shipping rate...maybe their server goes down...and instead, the customer will see the default rates you inserted, so...be careful about the prices you select as you will be stuck with them in the event of a purchase if UPS was unavailable for a rate quote. Save the module.

 

Let me know when you've done all of this and I'll go back into your site as a test customer and give it a go. I'll provide you with a screenshot of what I see.

 

Off for just a bit to go blow up the back yard. :)

Link to comment
Share on other sites

  • Replies 100
  • Created
  • Last Reply

Still doesn't work, I did all the shipping stuff no problem and nothing is showing up on the GC side. Thing about it is when I click install on the module it just refreshes the page it doesn't install it. But if I actually click on googlecheckout the actually text it will open it up for me to edit the fields and I hit update and it updates it but doesn't install it. It just updates it and goes back to install. I have tried removing it and when I do and re-upload it all the fields from before are there again. I don't know what is up with it. I am about to just trash it again because this just simply doesn't work. It has to many bugs and not enough answers.

 

Now what?

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Nick: If I can remove and reinstall my Google Checkout module anew...you should be able to do the same.

 

If you were able to do that with the UPS module, then the GC module should behave no differently.

 

I don't know what to say about this. My gut tells me that you have not installed this contrib correctly. No offense.

 

You should be able to select the module....click Remove...and it disappears. It's no longer active in Admin > Modules > Payment Modules. It's off.

 

Then you select it again...click Install...and all of your old settings....your merchant ID and key and whatnot....those fields should be totally empty. And you should be able to install it again from scratch. I don't know what to say now.

Link to comment
Share on other sites

I don't get a remove button just install and when I hit install it just refreshes and never installs it. It worked up until I had to remove it to and reinstall it when I added the .htaccess and .htpaswrd files then select true on that one option. Whats weird is it updates all the info but never gives me an option to remove it and when I go to delete it for the server and reload it it keeps all my info. Strange I don't know what is up with it. The installation should have nothing to do for why the module won't install. It is something within the code of the googlecheckout.php file.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Oh the GC side what should the API callback method be, XML or HTML?

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Nick: There's nothing wrong with Google or this contrib, for that matter.

 

I feel this is something on your end, at this point. I never see red x's in place of Google Checkout buttons. Google's servers are not going up and down, as you suggested in an earlier post. It's not happening.

 

In retrospect, I believe the reason I had trouble installing GC was that I was not removing the GC module itself and installing anew every time I made a file change or something. I would select and EDIT the module...which was no good. Changes had no effect. At some point, I remember thinking....REMOVE this damn thing and start again. And, magically...it seemed...everything started to fall into place for me.

 

I don't care what it is. Pick a module. Pick a module in Admin that has to do with shipping or payment. If you REMOVE that module...you should be back to square one when you select it and get the Install button. It should be like you never installed it all...whether you've had your website for one day or 10 years. Literally, it should display like you never touched it in your life. Like you never, ever installed that module ever before.

 

Go into Admin. Click on Configuration > Modules > Payment. If you have REMOVED the Google Checkout module, it should be sitting there amongst the other lonely modules that are turned off. Like, Authorize.net and Cash on Delivery. They're THERE....but, they're not active. Just a whole lot of nothing in the Sort Delivery fields. Nothing. Blank.

 

Then you select the Google Checkout method. If you did remove it last...all you SHOULD get is an install button. Click on it. It should be the default install of the contrib. No merchant key and ID entered...Basic Authentication is set to False (which you need to set to True if you did what I asked you to hours ago). It should look like it's the first time you EVER turned it on. Know what I mean?

 

As far as what you need to enter in your actual Google Merchant account regarding XML versus HTML?

 

It should be XML.

 

Install the Google Checkout module again and tell me what you see regarding shipping...in the module itself. If you did as I instructed regarding the shipping generator...you should not be seeing any funky errors about things being unable to be configured. You should simply see fields to enter default shipping prices in the event Google can't connect to UPS.

 

If you DO see error messages, please post your googlecheckout.php file so I can take a look.

Link to comment
Share on other sites

What are you calling me a liar? Here is the page it was sending me to when it went down. Google Error page If you go to the development page it even states that the buttons are generated dynamically which you can read about here. The servers go up and down and if they go down your button won't show. Think about this and look at your installation, do you ever remember installing any buttons? No, because their wasn't any, where do you think they come from. The Google servers, that's right, and if they go down the buttons won't display so people won't get redirected to GC while it's down for what ever reason. It's what I have been trying to explain to you and everybody else. The work on this ALL the time and it is always going down.

 

 

I don't know what to tell you about the button. I did all the shipping stuff and it worked. I had to click on the text that said googlecheckout for it to open because when i hit install it just kept refreshing the page. Look at the picture below, notice their is no remove or edit button. That has NOTHING to do with me. That is within the code of the module. all I have is a update and cancel button at the bottom. I have removed and installed this 3 times and it keeps doing the same thing. Everything is working but it just wont install properly but it is saving all the information like it's being cached. No matter what I do it doesn't install and it isn't me, this doesn't work and the topic for this with 85 pages in just a year should be proof enough this has nothing but problems. It isn't stable yet which is why I deleted it. I gave it a year and tried about 5-6 different versions with no luck.

 

paymentmei3.png

 

 

<?php
/*
 Copyright (C) 2007 Google Inc.

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/


/* GOOGLE CHECKOUT
* Class provided in modules dir to add googlecheckout as a payment option
* Member variables refer to currently set parameter values from the database
*/

class googlecheckout {
 var $code, $title, $description, $merchantid, $merchantkey, $mode, $enabled, $shipping_support, $variant;
 var $schema_url, $base_url, $checkout_url, $checkout_diagnose_url, $request_url, $request_diagnose_url;
 var $table_name = "google_checkout", $table_order = "google_orders";
 var $ship_flat_ui, $hash;

 // Class constructor
 function googlecheckout() {
global $order;
global $language;

require_once(DIR_FS_CATALOG .'/includes/languages/'. $language .'/modules/payment/googlecheckout.php');

$this->code = 'googlecheckout';
$this->title = MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_TITLE;
$this->description = MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_GOOGLECHECKOUT_SORT_ORDER;
$this->mode = MODULE_PAYMENT_GOOGLECHECKOUT_STATUS;
$this->merchantid = trim(MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTID);
$this->merchantkey = trim(MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTKEY);
$this->mode = MODULE_PAYMENT_GOOGLECHECKOUT_MODE;
$this->enabled = (MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') ? true : false;
$this->continue_url = MODULE_PAYMENT_GOOGLECHECKOUT_CONTINUE_URL;

// These are the flat shipping methods, add any other that is not merchant calculated 
$this->shipping_support = array("flat", "item", "table");

	  // These 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
 $this->mc_shipping_methods = array(
					'ups' => array(
								'domestic_types' =>
								  array(
									  '1DA' => 'Next Day Air',
									  '2DA' => '2nd Day Air',
									  '3DS' => '3 Day Select',
									  'GND' => 'Ground',

									   ),

								'international_types' =>
								  array(

									   ),
									),
							  );

$this->mc_shipping_methods_names = array(
									 'ups' => 'United Parcel Service (1 x 10lbs)',
									);

$this->hash = NULL;
$this->ship_flat_ui = 'Standard flat-rate shipping';
$this->schema_url = 'http://checkout.google.com/schema/2';
$this->base_url = $this->mode .'cws/v2/Merchant/'. $this->merchantid;
$this->checkout_url = $this->base_url .'/checkout';
$this->checkout_diagnose_url = $this->base_url .'/checkout/diagnose';
$this->request_url = $this->base_url .'/request';
$this->request_diagnose_url = $this->base_url .'/request/diagnose';
$this->variant = 'text';

if ((int)MODULE_PAYMENT_GOOGLECHECKOUT_ORDER_STATUS_ID > 0) {
  $this->order_status = MODULE_PAYMENT_GOOGLECHECKOUT_ORDER_STATUS_ID;
}
 }

 function getMethods() {
  if($this->hash == NULL) {
  $rta = array();
	  $this->_gethash($this->mc_shipping_methods, $rta);
	  $this->hash = $rta;
  }
return $this->hash;
 }

 function _gethash($arr, &$rta, $path =array()) {
if (is_array($arr)) {
  foreach ($arr as $key => $val) {
	$this->_gethash($arr[$key], $rta, array_merge(array($key), $path));
  }
}
else {
  $rta[$arr] = $path;
}
 }

 // Function used from Google sample code to sign the cart contents with the merchant key.
 function CalcHmacSha1($data) {
$key = $this->merchantkey;
$blocksize = 64;
$hashfunc = 'sha1';
if (strlen($key) > $blocksize) {
  $key = pack('H*', $hashfunc($key));
}
$key = str_pad($key, $blocksize, chr(0x00));
$ipad = str_repeat(chr(0x36), $blocksize);
$opad = str_repeat(chr(0x5c), $blocksize);
$hmac = pack(
				'H*', $hashfunc(
						($key^$opad).pack(
								'H*', $hashfunc(
										($key^$ipad).$data
								)
						)
				)
			);
return $hmac; 
 }

 // Decides the shipping name to be used.
 // May not call this if the same name is to be used.
 // Useful if some one wants to map to Google checkout shopping types (flat, pickup or merchant calculate).
 function getShippingType($shipping_option) {
switch($shipping_option) {
  case GOOGLECHECKOUT_FLAT_RATE_SHIPPING:
	return $this->ship_flat_ui .'- Flat Rate'; 
  case GOOGLECHECKOUT_ITEM_RATE_SHIPPING:
	return $this->ship_flat_ui .'- Item Rate';
  case GOOGLECHECKOUT_TABLE_RATE_SHIPPING:
	return $this->ship_flat_ui .'- Table Rate';
  default:
	return '';
}	
 }

 // Function used to compute the actual price for shipping depending upon the shipping type selected.
 function getShippingPrice($ship_option, $cart, $actual_price, $handling = 0, $table_mode = '') {
  // Flat, item, table
switch($ship_option) {
  case 'flat':
	return $actual_price;	
  case 'item':
	return ($actual_price * $cart->count_contents()) + $handling;
  case 'table':
	// Check the mode to be used for pricing the shipping.
	if($table_mode == 'price') {
	  $table_size = $cart->show_total();
	}
	elseif ($table_mode == 'weight') {
	  $table_size = $cart->show_weight();
	}

	// Parse the price (value1:price1, value2:price2)						
	$tok = strtok($actual_price, ',');
	$tab_data = array();
	while($tok != FALSE) {
	  $tab_data[] = $tok;
	  $tok = strtok(',');
	}  
	$initial_val = 0;	  
	foreach($tab_data as $curr) {
	  $final_val = strtok($curr, ':');
	  $pricing = strtok(':'); 
	  if($table_size >= $initial_val && $table_size <= $final_val) {
		$price = $pricing + $handling;
		break;
	  }
	  $initial_val = $final_val;
	}
	return $price;
  default:
	return 0;
}		
 }

 // Class methods...
 function update_status() {
 }

 function javascript_validation() {
return false;
 }

 function selection() {
return array('id' => $this->code, 'module' => $this->title);
 }

 function pre_confirmation_check() {
return false;
 }

 function confirmation() {
return false;
 }

 function process_button() {
 }

 function before_process() {
return false;
 }

 function after_process() {
return false;
 }

 function output_error() {
return false;
 }

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

 function install() {
global $language;
require_once(DIR_FS_CATALOG .'includes/languages/'. $language .'/modules/payment/googlecheckout.php');
$shipping_list = 'array(\'not\')';
tep_db_query("ALTER TABLE ". TABLE_CONFIGURATION ." CHANGE `configuration_value` `configuration_value` TEXT NOT NULL");
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 GoogleCheckout Module', 'MODULE_PAYMENT_GOOGLECHECKOUT_STATUS', 'True', 'Accepts payments through Google Checkout on your site', '6', '0', '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, set_function, date_added) values ('.htaccess Basic Authentication Mode with PHP over CGI?', 'MODULE_PAYMENT_GOOGLECHECKOUT_CGI', 'False', 'This configuration will <b>disable</b> PHP Basic Authentication in the responsehandler.php to validate Google Checkout messages.<br />If setted True you MUST configure your .htaccess files <a href=\"htaccess.php\" target=\"_OUT\">here</a>.', '6', '4', 'tep_cfg_select_option(array(\'False\', \'True\'),',now())");	
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTID', '', 'Your merchant ID is listed on the \"Integration\" page under the \"Settings\" tab', '6', '1', now())");
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant Key', 'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTKEY', '', 'Your merchant key is also listed on the \"Integration\" page under the \"Settings\" tab', '6', '2', 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 ('Select Mode of Operation', 'MODULE_PAYMENT_GOOGLECHECKOUT_MODE', 'https://sandbox.google.com/checkout/', 'Select either the Developer\'s Sandbox or live Production environment', '6', '3', 'tep_cfg_select_option(array(\'https://sandbox.google.com/checkout/\', \'https://checkout.google.com/\'),',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 ('Select Merchant Calculation Mode of Operation', 'MODULE_PAYMENT_GOOGLECHECKOUT_MC_MODE', 'https', 'Merchant calculation URL for Sandbox environment. (Checkout production environment always requires HTTPS.)', '6', '4', 'tep_cfg_select_option(array(\'http\', \'https\'),',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 Google Checkout for Virtual Goods?', 'MODULE_PAYMENT_GOOGLECHECKOUT_VIRTUAL_GOODS', 'False', 'If this configuration is enabled and there is any virtual good in the cart the Google Checkout button will be shown disabled.', '6', '4', '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, set_function, date_added) values ('MultiSocket Shipping Quotes Retrieval', 'MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET', 'False', 'This configuration will enable a multisocket feature to parallelize Shipping Providers quotes. This should reduce the time this call take and avoid GC Merchant Calculation TimeOut. <a href=\"multisock.html\" target=\"_OUT\">More Info</a>.(Alfa)', '6', '4', '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, set_function, date_added) values ('Allow US PO BOX shipping?', 'MODULE_PAYMENT_GOOGLECHECKOUT_USPOBOX', 'True', 'Allow sending items to US PO Boxes?', '6', '4', '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, set_function, date_added) values ('Default Values for Real Time Shipping Rates', 'MODULE_PAYMENT_GOOGLECHECKOUT_SHIPPING', '', 'Default values for real time rates in case the webservice call fails.', '6', '5',\"gc_cfg_select_shipping($shipping_list, \",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 ('Rounding Policy Mode', 'MODULE_PAYMENT_GOOGLECHECKOUT_TAXMODE', 'HALF_EVEN', 'This configuration specifies the methodology that will be used to round values to two decimal places. <a href=\"http://code.google.com/apis/checkout/developer/Google_Checkout_Rounding_Policy.html\">More info</a>', '6', '4', 'tep_cfg_select_option(array(\'UP\',\'DOWN\',\'CEILING\',\'HALF_UP\',\'HALF_DOWN\', \'HALF_EVEN\'),',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 ('Rounding Policy Rule', 'MODULE_PAYMENT_GOOGLECHECKOUT_TAXRULE', 'PER_LINE', 'This configuration specifies when rounding rules should be applied to monetary values while Google Checkout is computing an order total.', '6', '4', 'tep_cfg_select_option(array(\'PER_LINE\',\'TOTAL\'),',now())");
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Google Analytics Id', 'MODULE_PAYMENT_GOOGLECHECKOUT_ANALYTICS', 'NONE', 'Do you want to integrate the module with Google Analytics? Add your GA Id (UA-XXXXXX-X), NONE to disable. <br/> More info <a href=\'http://code.google.com/apis/checkout/developer/checkout_analytics_integration.html\'>here</a>', '6', '1', now())");
tep_db_query("insert into ". TABLE_CONFIGURATION ." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Continue shopping URL.', 'MODULE_PAYMENT_GOOGLECHECKOUT_CONTINUE_URL', 'index.php', 'Specify the page customers will be directed to if they choose to continue shopping after checkout.', '6', '8', 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 of display.', 'MODULE_PAYMENT_GOOGLECHECKOUT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
tep_db_query("create table if not exists ". $this->table_name ." (customers_id int(11), buyer_id bigint(20))");
tep_db_query("create table if not exists ". $this->table_order ." (orders_id int(11), google_order_number bigint(20), order_amount decimal(15,4))");
 }

 function remove() {
tep_db_query("delete from ". TABLE_CONFIGURATION ." where configuration_key in ('". implode("', '", $this->keys()) ."')");
// If it is required to delete GC tables on removing the module, the two lines below could be uncommented.
// tep_db_query("drop table " . $this->table_name);
// tep_db_query("drop table " . $this->table_order);
 }

 function keys() {
return array('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_CGI', 
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTID',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MERCHANTKEY',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MODE',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_MC_MODE',
			 'MODULE_PAYMENT_GOOGLECHECKOUT_VIRTUAL_GOODS',
//						   'MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_USPOBOX',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_SHIPPING',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_TAXMODE',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_TAXRULE',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_ANALYTICS',
			 'MODULE_PAYMENT_GOOGLECHECKOUT_CONTINUE_URL',
					   'MODULE_PAYMENT_GOOGLECHECKOUT_SORT_ORDER');
 }
}
// ** END GOOGLE CHECKOUT **
?>

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Install the Google Checkout module again and tell me what you see regarding shipping...in the module itself. If you did as I instructed regarding the shipping generator...you should not be seeing any funky errors about things being unable to be configured. You should simply see fields to enter default shipping prices in the event Google can't connect to UPS.

 

I got no errors with the shipping. It worked without a flaw. If you look at my previous post I was having a problem installing this module and it just refreshing long before I started this. Shipping isn't showing up in checkout and I am getting no errors and no orders are going to the OSC Admin UI.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Nick, I'm not calling you a liar. I'm not calling you anything. For crying out loud, I've been sitting in my office for 2 days trying to help you get GC to work.

 

All I know on my end is...I check my website morning, noon and night and I have never seen my GC buttons as red x's or greyed out since going live. If anything, I assumed you were probably messing around with the module and that's why I saw what I saw. And I think I'm probably right on that. I've never seen that. But...since going live...I haven't touched a thing in my files, with regard to GC. I'm just happy mine works.

 

I'm going to sound like a crappy eBay employee now, but...have you tried deleting cookies and whatnot from your web browser?

 

Honestly....you should be able to remove GC from the payment modules folder in Admin....and it's gone. And when you select it...it's like it never was selected. All new...no merchant key inserted...no merchant ID...nothing. Like you're installing it for the first time in your life. That's how it should look.

 

Are you using IE? The latest and greatest, IE 7.0 by any chance?

 

Click on Tools at the top of your web browser. Then click on Internet Options. Then find the Browsing History field and click Delete. Delete all cookies, temp files and assorted crapola that could possible be preventing you from viewing your website with...fresh eyes.

 

I don't know what time it is where you're at, but...it's really late here in NC. I have to get some sleep or I'll really be nasty on the board tomorrow. LOL.

 

This isn't that big a deal, Nick. You're 90% home, in my opinion, just having your Google Checkout buttons active. The rest is....a little of this and that. I'll talk to you tomorrow.

 

Don't go to bed mad and don't be offended. It's just a little something that's left. I can appreciate the frustration, Lord knows I had a lot of the same 3 weeks ago myself. It will get sorted out. See ya later...

Link to comment
Share on other sites

Yes I have cleared the browser cache. You have only been live 2 weeks. I have used it for over a year and seen it go up down.

 

Remember, stop right now and think, go back to your installation files. Do you see any buttons or images in it?

 

No?

 

Because they are generated by the GC, so..... If the GC server goes down, don't you think the buttons are going to go down to keep people from using it since the server is down. Where else would I get that error screen, I didn't just pull it out of thin air. I had that window open from earlier today and I even posted the link earlier this after noon about what it was showing me. For some reason it is caching the info and I don't know why it is saving the info. I delete it and i have gone through the DB to see if anything is in there and nothing. Ever time I delete it and re upload it and hit install it just refreshes and I click on the text for the module and it opens right up but I don't get a remove button or anything and all the info is stored like I never deleted it. I deleted it again. Removed all the code, and reinstalled all the code, uploaded the files again. And same thing, wont install just refreshes and the fields are already field in like it was never deleted. I am out of ideas.......

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Hi Nick, I've put the first version of shopping_cart.php you posted on here which can be now seen at:

 

http://www.1and1free.co.uk/shop/catalog/shopping_cart.php

 

And the code is below:

 

<?php
/*
 $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require("includes/application_top.php");

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

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_cart.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($cart->count_contents() > 0) {
?>
  <tr>
	<td>
<?php
$info_box_contents = array();
$info_box_contents[0][] = array('align' => 'center',
								'params' => 'class="productListing-heading"',
								'text' => TABLE_HEADING_REMOVE);

$info_box_contents[0][] = array('params' => 'class="productListing-heading"',
								'text' => TABLE_HEADING_PRODUCTS);

$info_box_contents[0][] = array('align' => 'center',
								'params' => 'class="productListing-heading"',
								'text' => TABLE_HEADING_QUANTITY);

$info_box_contents[0][] = array('align' => 'right',
								'params' => 'class="productListing-heading"',
								'text' => TABLE_HEADING_TOTAL);

$any_out_of_stock = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// Push all attributes information in an array
  if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
	while (list($option, $value) = each($products[$i]['attributes'])) {
	  echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
	  $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
								  from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
								  where pa.products_id = '" . (int)$products[$i]['id'] . "'
								   and pa.options_id = '" . (int)$option . "'
								   and pa.options_id = popt.products_options_id
								   and pa.options_values_id = '" . (int)$value . "'
								   and pa.options_values_id = poval.products_options_values_id
								   and popt.language_id = '" . (int)$languages_id . "'
								   and poval.language_id = '" . (int)$languages_id . "'");
	  $attributes_values = tep_db_fetch_array($attributes);

	  $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
	  $products[$i][$option]['options_values_id'] = $value;
	  $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
	  $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
	  $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
	}
  }
}

for ($i=0, $n=sizeof($products); $i<$n; $i++) {
  if (($i/2) == floor($i/2)) {
	$info_box_contents[] = array('params' => 'class="productListing-even"');
  } else {
	$info_box_contents[] = array('params' => 'class="productListing-odd"');
  }

  $cur_row = sizeof($info_box_contents) - 1;

  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

  $products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
				   '  <tr>' .
				   '	<td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
				   '	<td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

  if (STOCK_CHECK == 'true') {
	$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
	if (tep_not_null($stock_check)) {
	  $any_out_of_stock = 1;

	  $products_name .= $stock_check;
	}
  }

  if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
	reset($products[$i]['attributes']);
	while (list($option, $value) = each($products[$i]['attributes'])) {
	  $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
	}
  }

  $products_name .= '	</td>' .
					'  </tr>' .
					'</table>';

  $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
										 'text' => $products_name);

  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}

new productListingBox($info_box_contents);
?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
  </tr>
<?php
if ($any_out_of_stock == 1) {
  if (STOCK_ALLOW_CHECKOUT == 'true') {
?>
  <tr>
	<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>
  </tr>
<?php
  } else {
?>
  <tr>
	<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>
  </tr>
<?php
  }
}
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
$back = sizeof($navigation->path)-2;
if (isset($navigation->path[$back])) {
?>
			<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>
<?php
}
?>
			<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></form></td>
  </tr>
  <tr>
	<td>
	</td>
  </tr>
<?php
  } else {
?>
  <tr>
	<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></form></td>
  </tr>
<?php
 }
?>
<?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

$status_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_GOOGLECHECKOUT_STATUS'");
while ($status = tep_db_fetch_array($status_query)) {
  $status_flag = $status['configuration_value'];
}
if ($status_flag == 'True') {
  include('googlecheckout/gcheckout.php');
}
// ** END GOOGLE CHECKOUT **
?>
</table></td>

<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

If you could find out what the problem is that would be appreciated! :thumbsup:

Link to comment
Share on other sites

This one might be a little tricky since I can't really play around with it since I don't have your server available in front of me to where I can make a change, then view it, change, view it, etc. If you see where it is at now you'll notice it is between these tags <td> <tr> <table> etc. Just play around with it until it works. It is in the right area just not before the right tags the ones the the / are ending tags like this </td> </tr> </table> those are close table tags. <tr> are whats called rows, so every time you see one of those it is a new row. Now you can have several rows within one table

 

Look where the code is now and see this line right above where the Google code is now.

 

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

 

try placing it between </table> and </td> above If that doesn't work then go down a little further and place it after the </form> tag. You just have to play with it. It's also the best way to learn.

 

Let me know how it works out, if you still can't get it out playing with it for a while then we might need to nest it in a new table.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Hi Nick, thanks for that :)

 

I've moved the Google Checkout code around and you can see from the link below that it looks fine when you have an empty shopping cart:

 

http://www.1and1free.co.uk/shop/catalog/shopping_cart.php

 

Unfortunately though, when I place an item into the basket the error happens again!

 

I have moved the Google Checkout code to just before the </form> tag, which solves this problem (when an item is in the basket) but the problem then happens when the basket is empty!

 

So basically I can only have it looking right on one or the other, not both :'(

 

Any ideas?

Link to comment
Share on other sites

I don't think they placement of the button would have anything to do with how the page looks when the cart has products. If the placement of it was incorrect then it would throw the look off regardless if the cart was empty or not because the position of the button doesn't change between and empty cart and a cart with products because that code is nested. You get what I am saying?

 

Try this to test it out....

 

Back up that file and save it. Then go in there an remove that Google code completely and then add products to the basket and see what it does. If it doesn't throw the template off then it could be that code but I wouldn't see how if it works on a empty cart. So if it doesn't throw the cart off with product in it then post the code WITH the google button and I will take a look at it.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Good Afternoon, Nick. You and I need to stop posting at 3 am...especially when I've had a few beers. :)

 

Alright. I see what you mean by your screenshot in post 82. No remove button. No edit button.

 

This is what I see when I open my Payment Modules > Google Checkout

 

paymentmodule.gif

 

Obviously, I do have remove and edit buttons.

 

Are you only missing these buttons for the Google Checkout module? In other words, do you have those buttons for your PayPal module? Your other payment modules? If so, then I think something went wrong on your install of GC.

 

When I look at your screenshot, I think...gosh, his looks so different than mine. Cute little PayPal icons and whatnot.

 

Are you using OSC 2.2 or....something else?

Link to comment
Share on other sites

No I am using OSC 2.2 I just added the logos in the Admin side for quick reference.

 

Are you only missing these buttons for the Google Checkout module?

 

Yes, all the others are working, That is what I was referring to by I have no way to remove it and it doesn't show it has installed but when I click on the install button it just refreshes the page. If I click on the googlecheckout text it will open it up to edit. I fill in the fields and hit update an the bottom it will save everything but then takes me back to he install button. Everything is saving but it's not installing and that is code within the installation of the GC files, nothing I have done. I have gone through this code over and over and over again and I can't find out why. Even when I delete it from the server and upload it again and click on it all the feilds are filled in like it was cached and I have deleted everything cleared the cache, refreshed the server, my FTP everything and it still shows back up. I am in the process now of uninstalling it again for the 5th time and try a go at it again. I have doubled check and triple checked the double check and I don't see anything wrong.

 

Go look at the other Google topic, I have managed to piss off some folk who seem to think it is ok to use the IPN version of GC because of this busted module.... :D

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

I give up, I don't know why I even tried again. Like I said this code isn't stable. It might work for some but for others it doesn't because it's not a stable code.

 

I have completely deleted the files from the server, removed all code and reinstalled everything. It still won't let me install the module but yet all the info is stored in it again like it was never deleted. I just don't get it, it's caching this info from somewhere and I don't know where and it only happens with this module. So it leads me to believe that is something in the code of the GC files that doesn't agree with some shops.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Oh, my. Just visited the other thread. Nick strikes again.

 

Have you visited your database via, say, PHPMyAdmin and poked around for Google entries and deleted?

 

When I go into it and select my database, it's clearly showing entries for Google Checkout and Google Orders.

 

I remember long ago trying to install SEO URLS for my site and it was a disaster. I backtracked and removed all the code, but I still had the entry for it on the Admin side.

 

I had to go into PHPMyAdmin and select my database and then select configuration_group and manually select and delete the entry for SEO URLs.

 

I'm just wondering if there's something else you need to do in order to completely get rid of GC, in order to try installing anew. Something obviously went wrong with your install, by virtue of the lack of remove & edit capability in the module.

Link to comment
Share on other sites

Yes as I stated in eariler posts I went into the DB and I did find the Google checkout and Google Orders and I completely deleted them. Then I browsed the DB for anything related to GC and found nothing else. I have completely removed all code and files related to GC and now I am getting this error on my checkout payment page trying to call a file that I have deleted from the payment class which was never edited or had to be touched.

 

 

Warning: payment(includes/languages/english/modules/payment/googlecheckout.php) [function.payment]: failed to open stream: No such file or directory in /home/txcampin/public_html/includes/classes/payment.php on line 38

 

Warning: payment(includes/languages/english/modules/payment/googlecheckout.php) [function.payment]: failed to open stream: No such file or directory in /home/txcampin/public_html/includes/classes/payment.php on line 38

 

Warning: payment() [function.include]: Failed opening 'includes/languages/english/modules/payment/googlecheckout.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/txcampin/public_html/includes/classes/payment.php on line 38

 

Warning: payment(includes/modules/payment/googlecheckout.php) [function.payment]: failed to open stream: No such file or directory in /home/txcampin/public_html/includes/classes/payment.php on line 39

 

Warning: payment(includes/modules/payment/googlecheckout.php) [function.payment]: failed to open stream: No such file or directory in /home/txcampin/public_html/includes/classes/payment.php on line 39

 

Warning: payment() [function.include]: Failed opening 'includes/modules/payment/googlecheckout.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/txcampin/public_html/includes/classes/payment.php on line 39

 

Fatal error: Cannot instantiate non-existent class: googlecheckout in /home/txcampin/public_html/includes/classes/payment.php on line 41

 

 

 

I have software galore when it comes to edited and installing contributions and I have never had this much problem with on. I have over 50 installed successfully without problems for 2 years. I have PHP Designer but 2005 and 07, Dreamweaver 8 and the entire Studio 8 suite, Beyond Compare comparing software and so on. Everytime I use GC I have more problems with my shop then I have ever had and I know it's not me.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

I don't think they placement of the button would have anything to do with how the page looks when the cart has products. If the placement of it was incorrect then it would throw the look off regardless if the cart was empty or not because the position of the button doesn't change between and empty cart and a cart with products because that code is nested. You get what I am saying?

 

Try this to test it out....

 

Back up that file and save it. Then go in there an remove that Google code completely and then add products to the basket and see what it does. If it doesn't throw the template off then it could be that code but I wouldn't see how if it works on a empty cart. So if it doesn't throw the cart off with product in it then post the code WITH the google button and I will take a look at it.

 

I don't get it, I removed the code and it threw the template off (as it did initially with the default code) but with it (Google Checkout code) it looks fine (with no products).

 

It seems like with a product in the shopping cart it comes up with a new problem :blink:

 

Do you have any idea what it is?

 

Thanks again Nick :)

Link to comment
Share on other sites

Honestly I have no clue. Welcome to the bugs of GC I was talking about. This code isn't stable and for modified shops this code doesn't work all that well. I just installed this on a fresh clean shop with nothing on it and it worked. It seems though with customized shops it won't work.

 

Let me sit on it for a bit and think about it and I will get back to you.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Just had a thought, the problem only occurs when the shopping basket has an item in - the template is stretched because when you add an item to the shopping basket, it shows the item thumbnail, price and title which is too large (width-wise) for the template.

 

So if I located the file which is linked to a shopping basket that has an item in it then I should be able to reduce the table width shouldn't I?

 

Or am I well off!?

Link to comment
Share on other sites

Does it do the same thing without the google code and products in the cart?

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Ok, so if it was messed up before adding this contribution then your problem lies in that layout of that page. You need to take the Google code out and fix the HTML within that page in get it to display correctly with both items in and out of the cart. Then go back and add the Google code for that page.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...