where do i change the google url???
at this line?? = 'GCheckout_button' => "http://".$GCheckout_subdomain.".google.com/".($GCheckout_subdomain == 'sandbox'?'checkout/':'')."buttons/checkout.gif",
thank you....
<?
/*
gOscCommunicator.php, Advance Google Checkout BETA
Advance Software
http://www.advancewebsoft.com
Copyright (c) 2006 Advance Software
*/
class gOscCommunicator {
function gOscCommunicator($language)
{
$this->language = $language;
$this->languages_id = 1;
require_once('includes/configure.php');
require_once(DIR_FS_CATALOG.DIR_WS_FUNCTIONS.'database.php');
require_once(DIR_FS_CATALOG.DIR_WS_INCLUDES .'filenames.php');
require_once(DIR_FS_CATALOG.DIR_WS_INCLUDES .'database_tables.php');
tep_db_connect() or die('Unable to connect to database server!');
}
function tep_get_products_description($product_id, $language_id) {
$product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'");
$product = tep_db_fetch_array($product_query);
return $product['products_description'];
}
function _get_products_model($products_id)
{
$product_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$product = tep_db_fetch_array($product_query);
return $product['products_model'];
}
function _get_tax_rate($country_id, $zone_id, $tax_class_id)
{
$tax_query = tep_db_query("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$tax_class_id . "' group by tr.tax_priority");
if (tep_db_num_rows($tax_query)) {
$tax_multiplier = 1.0;
while ($tax = tep_db_fetch_array($tax_query)) {
$tax_multiplier *= 1.0 + ($tax['tax_rate'] / 100);
}
$tax_rate = ($tax_multiplier - 1.0) * 100;
} else {
$tax_rate = 0;
}
return $tax_rate;
}
function getConfiguration()
{
$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION .' where configuration_key like "GOOGLECHECKOUT_%" or configuration_key = "DEFAULT_ORDERS_STATUS_ID" or configuration_key = "SHIPPING_MAX_WEIGHT" or configuration_key = "SHIPPING_ORIGIN_COUNTRY" or configuration_key = "SHIPPING_ORIGIN_ZIP"');
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
$this->shipping_modules = array();
if (defined('GOOGLECHECKOUT_FLAT_STATUS') && (GOOGLECHECKOUT_FLAT_STATUS == 'true' || GOOGLECHECKOUT_FLAT_STATUS == 'True'))
$this->shipping_modules[] = array('file' => 'gCheckout_flat.php','class' => 'gCheckout_flat');
if (defined('GOOGLECHECKOUT_ITEM_STATUS') && (GOOGLECHECKOUT_ITEM_STATUS == 'true' || GOOGLECHECKOUT_ITEM_STATUS == 'True'))
$this->shipping_modules[] = array('file' => 'gCheckout_item.php','class' => 'gCheckout_item');
require_once('includes/languages/' . $this->language . '/modules/payment/gCheckout.php');
$GCheckout_subdomain = GOOGLECHECKOUT_SUBDOMAIN;
$GCheckout_merchant_id = GOOGLECHECKOUT_MERCHANT_ID;
$GCheckout_merchant_key = GOOGLECHECKOUT_MERCHANT_KEY;
$options = array(
'GCheckout_currency' => 'USD',
'GCheckout_xmlSchema' => '
http://checkout.google.com/schema/2',
'GCheckout_button' => "http://".$GCheckout_subdomain.".google.com/".($GCheckout_subdomain == 'sandbox'?'checkout/':'')."buttons/checkout.gif",
'GCheckout_button_w' => '180',
'GCheckout_button_h' => '46',
'GCheckout_button_loc' => 'en_US',
'GCheckout_button_style' => 'trans',
'GCheckout_base_url' => "https://".$GCheckout_subdomain.".google.com/".($GCheckout_subdomain == 'sandbox'?'checkout/':'')."cws/v2/Merchant/".$GCheckout_merchant_id,
'GCheckout_url' => "https://".$GCheckout_subdomain.".google.com/".($GCheckout_subdomain == 'sandbox'?'checkout/':'')."cws/v2/Merchant/".$GCheckout_merchant_id. "/checkout",
'GCheckout_diagnose_url' => "https://".$GCheckout_subdomain.".google.com/".($GCheckout_subdomain == 'sandbox'?'checkout/':'')."cws/v2/Merchant/".$GCheckout_merchant_id. "/checkout/diagnose",
'GCheckout_request_url' => "https://".$GCheckout_subdomain.".google.com/".($GCheckout_subdomain == 'sandbox'?'checkout/':'')."cws/v2/Merchant/".$GCheckout_merchant_id. "/request",
'GCheckout_request_diagnose_url' => "https://".$GCheckout_subdomain.".google.com/".($GCheckout_subdomain == 'sandbox'?'checkout/':'')."cws/v2/Merchant/".$GCheckout_merchant_id. "/request/diagnose",
'GCheckout_or_use_text' => GOOGLECHECKOUT_OR_USE
);
$options['GCheckout_subdomain'] = $GCheckout_subdomain;
$options['GCheckout_merchant_id'] = $GCheckout_merchant_id;
$options['GCheckout_merchant_key'] = $GCheckout_merchant_key;
return $options;
}
function getContinueShoppingUrl()
{
return HTTP_SERVER. DIR_WS_CATALOG;
}
function getShoppingCartUrl()
{
return HTTP_SERVER. DIR_WS_CATALOG. FILENAME_SHOPPING_CART;
}
function getItemWeight($products_id)
{
$weight_query = tep_db_query("Select products_weight from ".TABLE_PRODUCTS." where products_id = '".(int)$products_id."'");
$weight = tep_db_fetch_array($weight_query);
return $weight['products_weight'];
}
function getProducts($cart, $languages_id) {
$products_array = array();
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$products_array[$i]['name'] = $products[$i]['name'];
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
$products_array[$i]['name'].=' (';
while (list($option, $value) = each($products[$i]['attributes'])) {
$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_array[$i]['name'].= $attributes_values['products_options_name'].": ".$attributes_values['products_options_values_name'].", ";
}