Zen Cart Logo
Forums / Addon Payment Modules / Google Checkout module for ZC 1.3.x (beta)

Google Checkout module for ZC 1.3.x (beta)

Locked

Views: 1,099,782

Results 1,001 to 1,020 of 3,921
This thread is locked. New replies are disabled.
4 Apr 2007, 2:12 AM
#1001
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Google Checkout module for ZC 1.3.x (beta)

Woodymon:

In Modules > Payment > Google Checkout, I see listed under "Default Values for Real Time Shipping Rates" the following two items:

Per Item International
Per Item National

But I do not seen any controls to set the defaults for these two basic shipping options

So question again: Can I not use my one manual shipping method and must I use a third party shipping provider with Google Checkout?

If third party is required, why? If not, is there any straight forward process to make Google Checkout support very basic Zen Cart shipping operation?

Woody

Woody,

Do 'Per Item International' and 'Per Item National' exist in your shipping modules?

The shipping methods listed in the includes/modules/payment/googlecheckout.php file refer to shipping methods you have defined in your Admin>Modules>Shipping configuration.

As far as the default values, I have only had to set them for third-party (USPS, UPS, Fed-Ex, etc.) domestic shipping method (Priority Mail only, in my case). Flat-rate, table, etc, and international of any kind, does not seem to need default values. I think it's only needed where rates are looked up at the 'third=party' sites.

Third-party is definitely not required for GCO.

4 Apr 2007, 3:13 AM
#1002
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

I was not able to figure out how to apply the "zone-based per item" shipping policy using the table rates shipping module. I spent hours in attempting to do so without success. Then Kim nicely clued me as to a streamlined shipping configuration for Zen Cart which I have been utilizing for awhile now with PayPal, etc. (ZC 1.23-1.37)

For reference, the "National and International Per Item Shipping" shipping mod available in the download area replicates the exact same shipping configuration steps I've employed. See here: http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_51&products_id=334

My two normally used shipping modules listed under "Modules > Shipping" are:

  • Per Item International "iteminternational" (customer sees this as "USPS Airmail")
  • Per Item National "itemnational" (customer sees this as "USPS Media Mail")

USA and subzones are only supported by "itemnational" module.
All other countries and zones are only supported by "iteminternational" module

In essence these two modules are simple hybrids of the per-item module, one supporting USA/sub-zones, the other supporting all other countries/zones. (zone-item basis, not based on weight).

With this method we can generate an EXACT shipping cost right in the shop and tell the customers in plain language, before they even add items to their shopping cart, what the basic shipping costs will be. This really helps limit the wonder about ship costs and reduces the time required to submit and process an order (easy on the customer and easy on the admin).

The reason to have two separate modules is to apply different "per-item shipping" and "per-order handling" charge, depending on if in national or international zone.

National Policy: $5 for single item and $3 each add'l item
thus: Shipping Cost 3.00 & Handling Fee 2.00

International: $10 for single item and $4 each add'l item
thus Shipping Cost 4.00 & Handling Fee 6.00

Of course we can do this as all the books we ship are very close to the same weight. Except for printed docs which we don't apply shipping or handling charge and instead apply "ALWAYS FREE SHIPPING" and integrate the shipping into the product cost for these items. (but that may have to change with stamps going up...again). And of course we don't apply a shipping charge to downloads (Side-note: Linda clued me into the point that downloads don't need to be marked "ALWAYS FREE SHIPPING", they are already defined that way internally).

I digress...How to make this ship policy work with Google Checkout, that is my present journey. (I thought getting Google Checkout to work on this shop would be much much easier when I initiated this journey).

Hopefully this info will help Ropu and other Google Checkout developers understand the dire need for more robust and transparent support for basic Zen Cart shipping module configuration.

It is possible that Ropu's "Shipping Method Generator" tool was intended for my situation. But I just don't understand how to apply it. See http://demo.globant.com/~brovagnati/tools/shipping_generator.php

Woody

4 Apr 2007, 3:38 AM
#1003
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

Woody, I turned on split page login on our site temporarily, please check it out and tell me if it's behaving the way you want it to or not with regards to googlecheckout.

4 Apr 2007, 3:46 AM
#1004
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

This is my tpl_shopping_cart_default.php. Please not that the placement of paypal express button is personal preference. I am going to be changing this button location when we start to display shipping estimate in the shopping cart instead of using estimate button.

<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=shopping_cart.<br />
 * Displays shopping-cart contents
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 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 5414 2006-12-27 07:51:03Z drbyte $
 */
?>
<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']; ?>"><div id="cartImage" class="back"><?php echo $product['productsImage']; ?></div><div id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></div></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 checkout button
?>

<!--eof shopping cart buttons-->
</form>

<br class="clearBoth" />
<?php  include(DIR_WS_MODULES . 'show_google_components.php');  ?>
<?php
    switch (true) {
      case (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
      break;
      case (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
        break;
      }
?>
<?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
  }
?>
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
  <?php  // only display EC option if cart contents >0 and value >0
if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True' && $_SESSION['cart']->count_contents() > 0 && $_SESSION['cart']->total > 0) {
  include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
}
?>
<!-- ** END PAYPAL EXPRESS CHECKOUT ** -->

</div>
4 Apr 2007, 3:50 AM
#1005
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Woodymon:

For reference, the "National and International Per Item Shipping" shipping mod available in the download area replicates the exact same shipping configuration steps I've employed. See here: http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_51&products_id=334

My two normally used shipping modules listed under "Modules > Shipping" are:

  • Per Item International "iteminternational" (customer sees this as "USPS Airmail")
  • Per Item National "itemnational" (customer sees this as "USPS Media Mail")

I digress...How to make this ship policy work with Google Checkout, that is my present journey. (I thought getting Google Checkout to work on this shop would be much much easier when I initiated this journey).

Hopefully this info will help Ropu and other Google Checkout developers understand the dire need for more robust and transparent support for basic Zen Cart shipping module configuration.

It is possible that Ropu's "Shipping Method Generator" tool was intended for my situation. But I just don't understand how to apply it. See http://demo.globant.com/~brovagnati/tools/shipping_generator.php

Woody

I would hazard a guess that you can use something like:

 
'itemnational' => array( 
      'domestic_types' => 
       array( 'itemnational' => 'Per Item National'
                 ), 

       'international_types' => 
       array(
                 ), 
       ), 

and

'iteminternational' => array( 
       'domestic_types' => 
        array( 
                 ), 

        'international_types' => 
         array( 'iteminternational' => 'Per Item International'                                      
                 ), 
           ), 

Then for your GCO display you could add:

'itemnational' => 'Media Mail',
'iteminternational' => 'Air Mail',

to the

 $this->mc_shipping_methods_names = array(  
4 Apr 2007, 3:54 AM
#1006
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

BlessIsaacola:

Woody, I turned on split page login on our site temporarily, please check it out and tell me if it's behaving the way you want it to or not with regards to googlecheckout.
Yes yours is working good. Could you be kind enough to post (and maybe shop cart template file too)... purdy please ;-)

And excellent looking shop you have.

Woody

4 Apr 2007, 3:56 AM
#1007
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

BlessIsaacola:

Woody, I turned on split page login on our site temporarily, please check it out and tell me if it's behaving the way you want it to or not with regards to googlecheckout.

When testing this, please keep in mind that when you're on the split login page what you see depends on whether you have an item in shopping cart with dollar value or not. Add a free item to shopping cart versus an item that have dollar value also affects the type of login page that is displayed.

Currently, googlecheckout does not display the button on the login page if there is no dollar value in the shopping cart when split login page is enabled (even if a free item that requires shipping is added). If split login page is not enabled, then googlecheckout button is displayed but greyed out.

4 Apr 2007, 3:58 AM
#1008
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

Wow! Great support! Thanks Issac and Chain_man!

Woody

4 Apr 2007, 3:59 AM
#1009
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

Woodymon:

Yes yours is working good. Could you be kind enough to post (and maybe shop cart template file too)... purdy please ;-)

And excellent looking shop you have.

Woody

I posted my shopping cart template a few posts above. Please keep in mind that the template I posted above is the one online right now. I actually I have three different versions. One that places PayPal button before googlecheckout button, one that places paypal button after the shipping estimator button and one that places paypal button after googlecheckout but before shipping estimator button which for when we are displaying the shipping estimates directly in the shopping cart.

4 Apr 2007, 4:03 AM
#1010
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Woodymon:

Wow! Great support! Thanks Issac and Chain_man!

Woody

Just a little payback...

4 Apr 2007, 4:10 AM
#1011
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

Isaac you beat posting your template before I could even ask ;-)

And Chain_man, appreciate the shipping configuration info.

I'm finally coming out of the fog now and think I have a clear map in front of me.

If I was a bettin' man I would think getting this payment mod up and running before hitting post #2000 is a distinct possibility ;-)

Thanks again,
Woody

4 Apr 2007, 4:15 AM
#1012
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Here's my tpl_checkout_payment_default.php

<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=checkout_payment.<br />
 * Displays the allowed payment modules, for selection by customer.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 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_checkout_payment_default.php 4332 2006-09-01 04:33:16Z ajeh $
 * modified for both GoogleCheckout and PayPal Express checkout
 */
?>
<?php echo $payment_modules->javascript_validation(); ?>
<div class="centerColumn" id="checkoutPayment">
<?php echo zen_draw_form('checkout_payment', zen_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', ($flagOnSubmit ? 'onsubmit="return check_form();"' : '')); ?>

<h1 id="checkoutPaymentHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if ($messageStack->size('redemptions') > 0) echo $messageStack->output('redemptions'); ?>
<?php if ($messageStack->size('checkout') > 0) echo $messageStack->output('checkout'); ?>
<?php if ($messageStack->size('checkout_payment') > 0) echo $messageStack->output('checkout_payment'); ?>

<?php
  if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>
<div><?php echo TEXT_CONDITIONS_DESCRIPTION;?></div>
<?php echo  zen_draw_checkbox_field('conditions', '1', false, 'id="conditions"');?>
<label class="checkboxLabel" for="conditions"><?php echo TEXT_CONDITIONS_CONFIRM; ?></label>
</fieldset>
<?php
  }
?>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      if (!$payment_modules->in_special_checkout()) {
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>

<h2 id="checkoutPaymentHeadingAddress"><?php echo TITLE_BILLING_ADDRESS; ?></h2>

<div id="checkoutBillto" class="floatingBox back">
<?php if (MAX_ADDRESS_BOOK_ENTRIES >= 2) { ?>
<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHANGE_ADDRESS, BUTTON_CHANGE_ADDRESS_ALT) . '</a>'; ?></div>
<?php } ?>
<address><?php echo zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'); ?></address>
</div>

<div class="floatingBox important forward"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?></div>
<br class="clearBoth" />
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      }
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>

<fieldset id="checkoutOrderTotals">
<legend id="checkoutPaymentHeadingTotal"><?php echo TEXT_YOUR_TOTAL; ?></legend>
<?php
  if (MODULE_ORDER_TOTAL_INSTALLED) {
    $order_totals = $order_total_modules->process();
?>
<?php $order_total_modules->output(); ?>
<?php
  }
?>
</fieldset>

<?php
  $selection =  $order_total_modules->credit_selection();
  if (sizeof($selection)>0) {
    for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
      if ($_GET['credit_class_error_code'] == $selection[$i]['id']) {
?>
<div class="messageStackError"><?php echo zen_output_string_protected($_GET['credit_class_error']); ?></div>

<?php
      }
      for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
<fieldset>
<legend><?php echo $selection[$i]['module']; ?></legend>
<?php echo $selection[$i]['redeem_instructions']; ?>
<div class="gvBal larger"><?php echo $selection[$i]['checkbox']; ?></div>
<label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label>
<?php echo $selection[$i]['fields'][$j]['field']; ?>
</fieldset>
<?php
      }
    }
?>

<?php
    }
?>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      if (!$payment_modules->in_special_checkout()) {
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>

<fieldset>
<legend><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></legend>

<?php
  if (SHOW_ACCEPTED_CREDIT_CARDS != '0') {
?>

<?php
    if (SHOW_ACCEPTED_CREDIT_CARDS == '1') {
      echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled();
    }
    if (SHOW_ACCEPTED_CREDIT_CARDS == '2') {
      echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled('IMAGE_');
    }
?>
<br class="clearBoth" />
<?php } ?>

<?php
  $selection = $payment_modules->selection();

  if (sizeof($selection) > 1) {
?>
<p class="important"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></p>
<?php
  } elseif (sizeof($selection) == 0) {
?>
<p class="important"><?php echo TEXT_NO_PAYMENT_OPTIONS_AVAILABLE; ?></p>

<?php
  }
?>

<?php
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>

<?php
    if (sizeof($selection) > 1) {
// GoogleCheckout modification
      if($selection[$i]['id'] == "googlecheckout")
        continue;
// End GoogleCheckout mod
         ?>
<?php echo zen_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $_SESSION['payment'] ? true : false), 'id="pmt-'.$selection[$i]['id'].'"'); ?>
<?php
    } else {
?>
<?php echo zen_draw_hidden_field('payment', $selection[$i]['id']); ?>
<?php
    }
?>
<label for="pmt-<?php echo $selection[$i]['id']; ?>" class="radioButtonLabel"><?php echo $selection[$i]['module']; ?></label>

<?php
    if (MODULE_ORDER_TOTAL_COD_STATUS == 'true' and $selection[$i]['id'] == 'cod') {
?>
<div class="alert"><?php echo TEXT_INFO_COD_FEES; ?></div>
<?php
    } else {
      // echo 'WRONG ' . $selection[$i]['id'];
?>
<?php
    }
?>
<br class="clearBoth" />

<?php
    if (isset($selection[$i]['error'])) {
?>
    <div><?php echo $selection[$i]['error']; ?></div>

<?php
    } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>

<div class="ccinfo">
<?php
      for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
<label <?php echo (isset($selection[$i]['fields'][$j]['tag']) ? 'for="'.$selection[$i]['fields'][$j]['tag'] . '" ' : ''); ?>class="inputLabelPayment"><?php echo $selection[$i]['fields'][$j]['title']; ?></label><?php echo $selection[$i]['fields'][$j]['field']; ?>
<br class="clearBoth" />
<?php
      }
?>
</div>
<br class="clearBoth" />
<?php
    }
    $radio_buttons++;
?>
<br class="clearBoth" />
<?php
  }
?>

</fieldset>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      } else {
        ?><input type="hidden" name="payment" value="<?php echo $_SESSION['payment']; ?>" /><?php
      }
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>

<fieldset>
<legend><?php echo TABLE_HEADING_COMMENTS; ?></legend>
<?php echo zen_draw_textarea_field('comments', '45', '3'); ?>
</fieldset>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONTINUE_CHECKOUT, BUTTON_CONTINUE_ALT, 'onclick="submitFunction('.zen_user_has_gv_account($_SESSION['customer_id']).','.$order->info['total'].')"'); ?></div>
<div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '<br />' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></div>

</form>
</div>
4 Apr 2007, 4:21 AM
#1013
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

And my tpl_shopping_cart_default.php:

<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=shopping_cart.<br />
 * Displays shopping-cart contents
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 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 5414 2006-12-27 07:51:03Z drbyte $
 *
 * modified for both GoogleCheckout and PayPal Express 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']; ?>"><div id="cartImage" class="back"><?php echo $product['productsImage']; ?></div><div id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></div></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 checkout button
?>

<!--eof shopping cart buttons-->
</form>

<br class="clearBoth" />
<?php
    switch (true) {
      case (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
      break;
      case (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
        break;
      }
?>
<?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
  }
?>
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
  <?php  // only display EC option if cart contents >0 and value >0
if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True' && $_SESSION['cart']->count_contents() > 0 && $_SESSION['cart']->total > 0) {
  include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
}
?>
<!-- ** END PAYPAL EXPRESS CHECKOUT ** -->

<?php  include(DIR_WS_MODULES . 'show_google_components.php');  ?>

</div>
4 Apr 2007, 4:23 AM
#1014
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

And my tpl_login_default.php:

<?php
/**
 * Page Template
 *
 * @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_login_default.php 5419 2006-12-28 05:56:39Z drbyte $
 *
 * Modified for both GoogleCheckout and PayPal Express checkout
 */
?>
<div class="centerColumn" id="loginDefault">

<h1 id="loginDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if ($messageStack->size('login') > 0) echo $messageStack->output('login'); ?>


<?php if ( USE_SPLIT_LOGIN_MODE == 'True' || $ec_button_enabled) { ?>
<!--BOF PPEC split login- DO NOT REMOVE-->
<fieldset class="floatingBox back">
<legend><?php echo HEADING_NEW_CUSTOMER_SPLIT; ?></legend>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT ** ?>
<?php if ($ec_button_enabled) { ?>
<div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT; ?></div>

  <div class="center"><?php require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php'); ?></div>
<hr />
<?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_DIVIDER; ?>
<?php } ?>
<?php // ** END PAYPAL EXPRESS CHECKOUT ** ?>
<div class="information"><?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_SPLIT; ?></div>

<?php echo zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); ?>
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT); ?></div>
</form>
</fieldset>

<fieldset class="floatingBox forward">
<legend><?php echo HEADING_RETURNING_CUSTOMER_SPLIT; ?></legend>
<div class="information"><?php echo TEXT_RETURNING_CUSTOMER_SPLIT; ?></div>

<?php echo zen_draw_form('login', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
<label class="inputLabel" for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<?php echo zen_draw_input_field('email_address', '', 'size="18" id="login-email-address"'); ?>
<br class="clearBoth" />

<label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD; ?></label>
<?php echo zen_draw_password_field('password', '', 'size="18" id="login-password"'); ?>
<br class="clearBoth" />

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_LOGIN_ALT); ?></div>
<div class="buttonRow back important"><?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></div>
</form>
</fieldset>
<br class="clearBoth" />
<!--EOF PPEC split login- DO NOT REMOVE-->
<?php } else { ?>
<!--BOF normal login-->
<?php
  if ($_SESSION['cart']->count_contents() > 0) {
?>
<div class="advisory"><?php echo TEXT_VISITORS_CART; ?></div>
<?php
  }
?>
<?php echo zen_draw_form('login', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
<fieldset>
<legend><?php echo HEADING_RETURNING_CUSTOMER; ?></legend>

<label class="inputLabel" for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<?php echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="login-email-address"'); ?>
<br class="clearBoth" />

<label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD; ?></label>
<?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password') . ' id="login-password"'); ?>
<br class="clearBoth" />
</fieldset>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_LOGIN_ALT); ?></div>
<div class="buttonRow back important"><?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></div>
</form>
<br class="clearBoth" />

<?php  include(DIR_WS_MODULES . 'show_google_components.php');  ?>

<?php echo zen_draw_form('create_account', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field('action', 'process') . zen_draw_hidden_field('email_pref_html', 'email_format'); ?>
<fieldset>
<legend><?php echo HEADING_NEW_CUSTOMER; ?></legend>

<div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?></div>

<?php require($template->get_template_dir('tpl_modules_create_account.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_create_account.php'); ?>

</fieldset>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT); ?></div>
</form>
<!--EOF normal login-->
<?php } ?>
</div>
4 Apr 2007, 4:27 AM
#1015
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

I've posted my 3 modified template files in the posts above for all to use. There are only minimal modifications to accommodate both GoogleCheckout and PayPal Express checkout.

These are zencart 1.3.7 version base files.

4 Apr 2007, 5:21 AM
#1016
apinkpony11 avatar

apinkpony11

Zen Follower

Join Date:
Aug 2006
Posts:
112
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Hi Everyone,

Google has been working fine but recently (last few days) I have gotten a few "bad signature" type notices. I'm not sure what to do with these. When I click to find out more it shows me the whole xml cart that we sent them, and then a little xml they sent... not sure what to do with this.

Help appreciated. Thank you.

4 Apr 2007, 10:21 AM
#1017
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

  1. Regards to editing /modules/payment/googlecheckout.php

a. Made the edits as "hinted" by Doug for me to try out in this post:
http://www.zen-cart.com/forum/showpost.php?p=353165&postcount=1006

Inserting code into both mc_ array lists:
mc_shipping_methods = array()
mc_shipping_methods_names = array()

b. After the edits above I observed in Modules > Payment > Google Checkout configuration under "Default Values for Real Time Shipping Rates":

Per Item International
Per Item National
0 Per Item National

And noted a new form field adjacent to "Per Item National" with the number 0 displayed. But I have no idea as to it's function ;-). But there was no corresponding form field for "Per Item International". Strange, huh?

c. I then submitted another order to Google Checkout and observed same error as previous.

<error-message>Duplicate shipping name FREE SHIPPING! found.</error-message>
  1. So for "testing" purposes I altered edited code in googlecheckout.php to:
'itemnational' => array( 
	'domestic_types' => 
		array( 
		'itemnational' => 'Per Item National'
		), 

	'international_types' => 
		array(
		'itemnational' => 'Per Item National'
		), 
	), 
'iteminternational' => array( 
	'domestic_types' => 
		array( 
		'iteminternational' => 'Per Item International'
		), 

		'international_types' => 
		array( 
		'iteminternational' => 'Per Item International'                                      
		), 
	)

Note I added a domestic and international type for each array entry. Probably not correct but thinking maybe nothing in each array might be a problem and wanted to observe the effect of changing (won't hurt testing, afte all I'm playing in the sandbox).

And left in the following previously inserted code in mc_shipping_methods_names = array()

'itemnational' => 'Media Mail',
'iteminternational' => 'Air Mail',

And after making the above edits, I uninstalled the payment module and then reinstalled. I then observed under "Default Values for Real Time Shipping Rates" one form field for each of the following entry:

iteminternationaliteminternational_VD:0,
itemnationalitemnational_VD:0

Not sure what the _VD:0 indicates.

And each form field displayed the numeral zero by default. Again I do not understand what this value represents.

And quite certain this config is not correct.

And to test the theory I then added an item to my shopping cart and submitted order to Google Checkout. But same error as previous.

<error-message>Duplicate shipping name FREE SHIPPING! found.</error-message>

So still at a loss on how to edit googlecheckout.php to match my needs. And I think this exercise might be barking up the wrong tree? (see points 6 and 7 below).

  1. I have only three shipping modules installed:
  • freeshipper
  • iteminternational
  • itemnational
  1. Previously I did not have to worry about the sort order for the three ship modules. All were set for sort order 0 and everything still worked. But just in case I applied sort order of 3 to freeshipper and 1 and 2 to the other two respectively. Not sure if this makes any diff?

  2. As a follow-up to Doug's question. In googlecheckout.php I do not observe any 'extra' FREE SHIPPING array entries in the mc_shipping_methods array. I do see one 'freeshipper' and one 'freeoptions'. Same observation applies to mc_shipping_methods_names array.

Related question: What does mc_ represent in the two array names?

  1. And following up on something else Doug mentioned, editing the mc_ array code in googlecheckout.php may not be required in my situation since I'm not connecting to any third party shipper and thus no need for "real time shipping rates"?

  2. However further down in googlecheckout.php I observe some commented out function code that I'm thinking now applies to my situation.
    function getShippingType()
    function getShippingPrice()

I have to think about this more thoroughly. And still need to follow-up on a more recent shipping configuration suggestion from Isaac.

Appreciate all the contributed ideas thus far. Keep 'em coming :wink2:

Thanks,
Woody

4 Apr 2007, 11:28 AM
#1018
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

OK I used Ropu's Shipping Generator to generate the following:

$this->mc_shipping_methods = array(
                        'freeshipper' => array(
                                    'domestic_types' =>
                                      array(
                                          'freeshipper' => 'Free Shipper'
                                           ),

                                    'international_types' =>
                                      array(
                                          'freeshipper' => 'Free Shipper intl'
                                           ),
                                        ),
                        'itemnational' => array(
                                    'domestic_types' =>
                                      array(
                                          'itemnational' => 'Per Item National'
                                           ),

                                    'international_types' =>
                                      array(

                                           ),
                                        ),
                        'iteminternational' => array(
                                    'domestic_types' =>
                                      array(

                                           ),

                                    'international_types' =>
                                      array(
                                          'iteminternational' => 'Per Item International'
                                           ),
                                        ),
                                  );

$this->mc_shipping_methods_names = array(
                                         'freeshipper' => 'Free Shipper',
                                         'itemnational' => 'USPS Media Mail',
                                         'iteminternational' => 'USPS Air Mail',
                                        );

And then I inserted into googlecheckout.php
(I think this is the same code as Doug previously offered up).

But still same error when submitting order:

<error-message>Duplicate shipping name FREE SHIPPING! found.</error-message>

I'm stumped.

I should add that no errors are showing up in response_error.log

But I figured out the answer to one of my previous trivia questions:
mc = merchant calculated

Doh! Now only if I could answer some of the more important questions. Such as where do I go from here? And why doe this mod not want to work for me?

Woody

4 Apr 2007, 1:19 PM
#1019
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

For testing purposes I removed the 'freeshipper' references from both arrays. So the only references in the two arrays were 'itemnational' and 'iteminternational'.

Then I submitted an order. This time the order went through!

After logging into Google Checkout server with the buyers sandbox account, I observed 'itemnational' was the only ship method displayed in the shipping dropdown.

The amount of time for the shipping dropdown to render in the browser was unexpectedly long, and I almost clicked on the submit order button before the shipping dropdown was displayed...not sure of the effect had I done so.

So far, so fair.

However the shipping amount displayed in the dropdown and added to the total was $0.00. Should have been $5.

Also the dropdown did not display "USPS Media Mail" label as expected. Likely need to tweak my array configuration to solve this last one.

But the $0 shipping amount, and having to remove 'freeshipper', and the performance issues are problems.

And as always your ideas are welcome.

Woody

4 Apr 2007, 1:28 PM
#1020
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

And I was not get auto redirected back to the shop website as expected. Had to click the "Return to Shopping Center" link.

Woody