PHP Code:
<?php
/*
**GOOGLE CHECKOUT ** v1.4.7
* @version $Id: shipping_methods.php 5852 2007-12-14 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',
'BPM' => 'Bound Printed Material',
'LIBRARY' => 'Library'
),
'international_types' =>
array(
'Global Express Guaranteed' => 'Global Express Guaranteed (1 - 3 days)',
'Global Express Guaranteed Non-Document Rectangular' => 'Global Express Guaranteed Non-Document Rectangular (1 - 3 days)',
'Global Express Guaranteed Non-Document Non-Rectangular' => 'Global Express Guaranteed Non-Document Non-Rectangular (1 - 3 days)',
'Express Mail International (EMS)' => 'Express Mail International (EMS) (3 - 5 days)',
'Express Mail International (EMS) Flat Rate Envelope' => 'Express Mail International (EMS) Flat Rate Envelope (3 - 5 days)',
'Priority Mail International' => 'Priority Mail International (6 - 10 days)',
'Priority Mail International Flat Rate Box' => 'Priority Mail International Flat Rate Box (6 - 10 days)',
'Priority Mail International Flat Rate Envelope' => 'Priority Mail International Flat Rate Envelope',
'First-Class Mail International' => 'First-Class Mail International',
),
),
'fedexexpress' => array(
'domestic_types' =>
array(
'06' => 'FedEx First Overnight',
'01' => 'FedEx Priority Overnight',
'05' => 'FedEx Standard Overnight',
'03' => 'FedEx 2Day',
'20' => 'FedEx Express Saver',
),
'international_types' =>
array(
'01' => 'FedEx International Priority',
'03' => 'FedEx International Economy',
),
),
'fedexground' => array(
'domestic_types' =>
array(
'90' => 'FedEx Home Delivery',
),
'international_types' =>
array(
),
),
'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'
),
),
'ups' => array(
'domestic_types' =>
array(
'1DM' => 'Next Day Air Early AM',
'1DML' => 'Next Day Air Early AM Letter',
'1DA' => 'Next Day Air',
'1DAL' => 'Next Day Air Letter',
'1DAPI' => 'Next Day Air Intra (Puerto Rico)',
'1DP' => 'Next Day Air Saver',
'1DPL' => 'Next Day Air Saver Letter',
'2DM' => '2nd Day Air AM',
'2DML' => '2nd Day Air AM Letter',
'2DA' => '2nd Day Air',
'2DAL' => '2nd Day Air Letter',
'3DS' => '3 Day Select',
'GND' => 'Ground',
'GNDCOM' => 'Ground Commercial',
'GNDRES' => 'Ground Residential',
'STD' => 'Canada Standard',
'XPR' => 'Worldwide Express',
'XPRL' => 'worldwide Express Letter',
'XDM' => 'Worldwide Express Plus',
'XDML' => 'Worldwide Express Plus Letter',
'XPD' => 'Worldwide Expedited'
),
'international_types' =>
array(
),
),
'zones' => array(
'domestic_types' =>
array(
'zones' => 'Zones Rates'
),
'international_types' =>
array(
'zones' => 'Zones Rates intl'
),
),
'freeoptions' => array(
'domestic_types' =>
array(
'freeoptions' => 'Free Options'
),
'international_types' =>
array(
'freeoptions' => 'Free Options intl'
),
),
'freeshipper' => array(
'domestic_types' =>
array(
'freeshipper' => 'Free Shipper'
),
'international_types' =>
array(
'freeshipper' => 'Free Shipper intl'
),
),
'perweightunit' => array(
'domestic_types' =>
array(
'perweightunit' => 'Perweight Unit'
),
'international_types' =>
array(
'perweightunit' => 'Perweight Unit intl'
),
),
'storepickup' => array(
'domestic_types' =>
array(
'storepickup' => 'Store Pickup'
),
'international_types' =>
array(
'storepickup' => 'Store Pickup 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' => 'Vary by Weight/Price'
),
'international_types' =>
array(
'table' => 'Vary by Weight/Price intl'
),
),
'itemnational' => array(
'domestic_types' =>
array(
'itemnational' => 'Item National',
),
'international_types' =>
array(
),
),
'iteminternational' => array(
'domestic_types' =>
array(
),
'international_types' =>
array(
'iteminternational' => 'Item International',
),
),
);
$mc_shipping_methods_names = array(
'usps' => 'USPS',
'fedex1' => 'FedEx',
'ups' => 'UPS',
'zones' => 'Zones',
'fedexexpress' => 'Fedex Express',
'fedexground' => 'Fedex Ground',
'freeoptions' => 'Free Options',
'freeshipper' => 'Free Shipper',
'perweightunit' => 'Perweight Unit',
'storepickup' => 'Store Pickup',
'flat' => 'Flat Rate',
'item' => 'Item',
'table' => 'Table',
'itemnational' => 'Per Item National',
'iteminternational' => 'Per Item International',
);
?>
@kellan4459, you first need to decide which shipping options you're going to offer and remove everything else you're not offering from shipping_methods.php. GCO misbehave quiet a bit when using the default file as you have it. This is the reason there's a shipping_method generator included with the mod. Once you've made the modification, uninstall and reinstall GCO from the the admin payment module side. This is simply to flush out all options currently enabled now that shouldn't be.
Test your site again after doing that and report back what error message you're getting if any. Do you have any error on GCO website under Tools - Integration Console?
I changed it to
I then uninstalled and reinstalled GCO and same results. I will check for any errors on GCO and let you know.PHP Code:
<?php
$mc_shipping_methods = array(
'table' => array(
'domestic_types' =>
array(
'table' => '3-5 days',
),
'international_types' =>
array(
),
),
'zones' => array(
'domestic_types' =>
array(
'zones' => 'Shipping to US',
),
'international_types' =>
array(
'zones' => 'International Shipping',
),
),
);
$mc_shipping_methods_names = array(
'table' => 'USPS First Class',
'zones' => 'Zone Rates',
);
?>
Are you trying to use "Carrier Calculated Shipping" now instead of "Merchant Calculated Shipping"? I see from the PM you sent me that carrier calculated shipping is now turned on but not configured. I'd suggest trying one thing at a time going the easy route.
Carrier Calculated Shipping should work out of the box if you configure it, enable it, test it and if configured right 100% guaranteed it will work, then move on to Merchant Calculated Shipping using a standard shipping like USPS or UPS to test and if you configure either right, then it should work as well. Once those are working then you can move to the table/zone options. I suspect you're configuring things wrong on your admin side which is why you're experiencing the problem you're experiencing.
according to the GCO module it is set to False. That is an old error so it may be where the site owner was playing with it. I'm just trying to help get them working.
Another error is:
We encountered an error trying to access your server at https://theirurl.com/googlecheckout/responsehandler.php
where theirurl is the site url
Hi guys,
I have already ask about it in other thread but no one answer and I need advice quickly.
So: I installed Google Checkout (1.4.7., I used option B because I already installed other payment modules like Western Union and EU Standard Transfer) but I get this:
ERROR: module not loaded due to missing language file: /public_html/myshop/includes/languages/english/modules/payment/gcheckout.php
I understand I missed file but: there is "googlecheckout.php" file in includes/languages/english/modules/payment. Is it this one? When I upload it I get the same error, when I rename it other payment modules don't show up ( PayPal modules, Western Union, Nochex). Could you tell me what I do wrong? How can I have all payment modules?
Thanks for help in advance.
ekele
my GC file structure doesn't have gcheckout.php in path you posted.
What I do have is
/includes/languages/english/modules/payment/googlecheckout.php
and
/includes/languages/modules/payment/googlecheckout.php
they have the same name but the contents are not identical. Do you have both these files uploaded? Compare your GC file structure residing on your pc to your online file structure to be sure all files have all been uploaded and in the correct folders. Compare file sizes too.
I have had GC installed on 1.3.9d for a few weeks now and it has been functioning correctly; checkout processes right, usps shipping is included, orders are posted to admin, I get google emails. However last night I noticed something not right on the front end.
This is what happens.
Not logged in:
Select an item, put it in the cart and the shopping_cart page looks as it should.
Logged in:
Select an item, put it in the cart and the shopping_cart page loses it's right column and footer.
I'm using the file tpl_shopping_cart_default.php as an over ride. If I delete it and let the default file take over the problem goes away but the google code is not in the default file so naturally the google checkout button is gone.
The only code merged into the 1.3.9d tpl_shopping_cart_default.php file is the google checkout snippet
PHP Code:
<!-- * BEGIN GOOGLE CHECKOUT * -->
<?php
// ** GOOGLE CHECKOUT **
include(DIR_WS_MODULES . 'show_google_components.php');
// ** END GOOGLE CHECKOUT **
?>
<!-- * END GOOGLE CHECKOUT * -->
I notice when I log in and go to the cart page with a saved item in it I get this error message in the log file.
PHP Fatal error: Cannot redeclare class order in /home/xxxxxxx/public_html/includes/classes/order.php on line 1091
the only thing on line 1091, which is the very last line, is a curly bracePHP Code:
}
Has anyone had this happen in their store?
I'm at a loss what to do next.
This is the entire tpl_shopping_cart_default.php file content:
PHP Code:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=shopping_cart.<br />
* Displays shopping-cart contents
*
* @package templateSystem
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_shopping_cart_default.php 5554 2007-01-07 02:45:29Z drbyte $
* @version $Id: tpl_shopping_cart_default.php 5936 2007-12-14 18:15:39Z ropu - Added Google Checkout $
*/
?>
<div class="centerColumn" id="shoppingCartDefault">
<?php
if ($flagHasCartContents) {
?>
<?php
if ($_SESSION['cart']->count_contents() > 0) {
?>
<div class="forward"><?php echo TEXT_VISITORS_CART; ?></div>
<?php
}
?>
<h1 id="cartDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if ($messageStack->size('shopping_cart') > 0) echo $messageStack->output('shopping_cart'); ?>
<?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
<div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php if (!empty($totalsDisplay)) { ?>
<div class="cartTotalsDisplay important"><?php echo $totalsDisplay; ?></div>
<br class="clearBoth" />
<?php } ?>
<?php if ($flagAnyOutOfStock) { ?>
<?php if (STOCK_ALLOW_CHECKOUT == 'true') { ?>
<div class="messageStackError"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div>
<?php } else { ?>
<div class="messageStackError"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div>
<?php } //endif STOCK_ALLOW_CHECKOUT ?>
<?php } //endif flagAnyOutOfStock ?>
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="cartContentsDisplay">
<tr class="tableHeading">
<th scope="col" id="scQuantityHeading"><?php echo TABLE_HEADING_QUANTITY; ?></th>
<th scope="col" id="scUpdateQuantity"> </th>
<th scope="col" id="scProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
<th scope="col" id="scUnitHeading"><?php echo TABLE_HEADING_PRICE; ?></th>
<th scope="col" id="scTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
<th scope="col" id="scRemoveHeading"> </th>
</tr>
<!-- Loop through all products /-->
<?php
foreach ($productArray as $product) {
?>
<tr class="<?php echo $product['rowClass']; ?>">
<td class="cartQuantity">
<?php
if ($product['flagShowFixedQuantity']) {
echo $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
} else {
echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
}
?>
</td>
<td class="cartQuantityUpdate">
<?php
if ($product['buttonUpdate'] == '') {
echo '' ;
} else {
echo $product['buttonUpdate'];
}
?>
</td>
<td class="cartProductDisplay">
<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
<br class="clearBoth" />
<?php
echo $product['attributeHiddenField'];
if (isset($product['attributes']) && is_array($product['attributes'])) {
echo '<div class="cartAttribsList">';
echo '<ul>';
reset($product['attributes']);
foreach ($product['attributes'] as $option => $value) {
?>
<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>
<?php
}
echo '</ul>';
echo '</div>';
}
?>
</td>
<td class="cartUnitDisplay"><?php echo $product['productsPriceEach']; ?></td>
<td class="cartTotalDisplay"><?php echo $product['productsPrice']; ?></td>
<td class="cartRemoveItemDisplay">
<?php
if ($product['buttonDelete']) {
?>
<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>"><?php echo zen_image($template->get_template_dir(ICON_IMAGE_TRASH, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_TRASH, ICON_TRASH_ALT); ?></a>
<?php
}
if ($product['checkBoxDelete'] ) {
echo zen_draw_checkbox_field('cart_delete[]', $product['id']);
}
?>
</td>
</tr>
<?php
} // end foreach ($productArray as $product)
?>
<!-- Finished loop through all products /-->
</table>
<div id="cartSubTotal"><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $cartShowTotal; ?></div>
<br class="clearBoth" />
<!--bof shopping cart buttons-->
<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>
<?php
// show update cart button
if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) {
?>
<div class="buttonRow back"><?php echo zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT); ?></div>
<?php
} else { // don't show update button below cart
?>
<?php
} // show update button
?>
<!--eof shopping cart buttons-->
</form>
<br class="clearBoth" />
<?php
if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1') {
?>
<div class="buttonRow back"><?php echo '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR) . '\')">' .
zen_image_button(BUTTON_IMAGE_SHIPPING_ESTIMATOR, BUTTON_SHIPPING_ESTIMATOR_ALT) . '</a>'; ?></div>
<?php
}
?>
<!-- * BEGIN GOOGLE CHECKOUT * -->
<?php
// ** GOOGLE CHECKOUT **
include(DIR_WS_MODULES . 'show_google_components.php');
// ** END GOOGLE CHECKOUT **
?>
<!-- * END GOOGLE CHECKOUT * -->
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
<?php // the tpl_ec_button template only displays EC option if cart contents >0 and value >0
if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') {
include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
}
?>
<!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
<?php
if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '2') {
/**
* load the shipping estimator code if needed
*/
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory('shipping_estimator.php')); ?>
<?php
}
?>
<?php
} else {
?>
<h2 id="cartEmptyText"><?php echo TEXT_CART_EMPTY; ?></h2>
<?php
$show_display_shopping_cart_empty = $db->Execute(SQL_SHOW_SHOPPING_CART_EMPTY);
while (!$show_display_shopping_cart_empty->EOF) {
?>
<?php
if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_FEATURED_PRODUCTS') { ?>
<?php
/**
* display the Featured Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php
if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_SPECIALS_PRODUCTS') { ?>
<?php
/**
* display the Special Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>
<?php
if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_NEW_PRODUCTS') { ?>
<?php
/**
* display the New Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php
if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_UPCOMING') {
include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));
}
?>
<?php
$show_display_shopping_cart_empty->MoveNext();
} // !EOF
?>
<?php
}
?>
</div>
Bookmarks