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,684

Results 981 to 1,000 of 3,921
This thread is locked. New replies are disabled.
3 Apr 2007, 10:26 AM
#981
blessisaacola avatar

blessisaacola

Totally Zenned

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

Google Checkout module for ZC 1.3.x (beta)

Here is mine line 145-157 with the code implemented:

<?php
    if (sizeof($selection) > 1) {
      if($selection[$i]['id'] == "googlecheckout")
        continue;
        if (empty($selection[$i]['noradio'])) {
 ?>
<?php echo zen_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $_SESSION['payment'] ? true : false), 'id="pmt-'.$selection[$i]['id'].'"'); ?>
<?php   } ?>
<?php
    } else {
    	
?>
<?php echo zen_draw_hidden_field('payment', $selection[$i]['id']); ?>
3 Apr 2007, 11:12 AM
#982
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)

Hi Ropu-

I assume most folks in the Zen Cart community assume that when a new mod or mod update is released it supports (and/or is based upon core code from) the latest version iof Zen Cart, unless clearly stated otherwise.

And I was previously understanding your mod was updated to support Zen Cart 1.37.

However while comparing the template override files included with v.1.3RC1rev1 of your mod, with the same files in the stock Zen Cart 1.37 distribution, I discovered the three files bundled in your mod are edits of an OLDER Zen Cart version (possibly 1.36), not based on the latest Zen Cart 1.37 version as one would expect.

The result is some newer functionality/features supported by Zen Cart 1.37 are not available if the template override files in your mod are utilized.

Best practice is to make clear in the readme which Zen Cart version your override or edited core files are based upon, and just as important, which Zen Cart version your merge (Option B) instructions are intended for. This will prevent much confusion.

For instance compare the following three files:

  1. includes/templates/template_default/templates/tpl_login_default.php

Zen Cart 1.37 Stock shows:

  • @version $Id: tpl_login_default.php 5419 2006-12-28 05:56:39Z drbyte $

GC mod v.1.30rc1rev1 shows:

  • @version $Id: tpl_login_default.php 2834 2006-01-11 22:16:37Z birdbrain $
  1. includes/templates/template_default/templates/tpl_shopping_cart_default.php

Zen Cart 1.37 Stock shows:

  • @version $Id: tpl_shopping_cart_default.php 5414 2006-12-27 07:51:03Z drbyte $

GC mod v.1.30rc1rev1 shows:

  • @version $Id: tpl_shopping_cart_default.php 4140 2006-08-15 03:37:53Z drbyte $
  1. includes/templates/template_default/templates/tpl_checkout_payment_default.php

Zen Cart 1.37 Stock shows:

  • @version $Id: tpl_checkout_payment_default.php 5414 2006-12-27 07:51:03Z drbyte $

GC mod v.1.30rc1rev1 shows:

  • @version $Id: tpl_checkout_payment_default.php 4332 2006-09-01 04:33:16Z ajeh $

Maybe you could re-release your mod with template files based on Zen Cart 1.37?

Just some ideas to keep in mind in future development efforts.

But you did use the latest version of /admin/orders.php. :wink2:

Thanks,
Woody

3 Apr 2007, 11:23 AM
#983
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,

By ropu's own admission here: http://www.zen-cart.com/forum/showpost.php?p=351579&postcount=951 only admin/orders.php was based on zcv1.3.7. I am sure he will probably update the templates to be zcv1.3.7.

There are a lot of people that have problem because PayPal Express checkout was introduced in zcv1.3.7 and the fact that the templates are based on zcv1.3.7 creates some issues for people not merging code but just overriding templates.

In the interim, if anyone the templates based on zcv1.3.7 I'd gladly provide mine.

3 Apr 2007, 11:53 AM
#984
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:

This has been discussed in previous posts. The reference in the install instruction is actually wrong. Ropu was using a different template than 1.3.7 when that instruction was written and obviously it hasn't been changed. If you want me to email you my tpl_checkout_payment_default.php for comparison I can do that.
Thanks for the info Isaac. My assumption was that would have been fixed in the latest release. Generally before installing a mod I don't read further back in the support thread, further than when the latest version was released. (Unless I'm having issues comprehending the install instructions). The assumption is little things like this would get corrected in the very next release version. Requiring anyone to wade through a thread of a 1000 posts to find out such information is not warranted.

BlessIsaacola:

Also, know of the template files are different since version 1.0.5 so if you have a working template with the code changes that is already based on ZC V1.3.7 you're good.
Not sure exactly what you mean here? I have a stock Zen Cart 1.37 I'm testing this mod out on (so I'm installing the mod fresh, not upgrading the mod). And I'm hand merging in the code following Option B instructions in the install readme. So are you now stating I should not follow those guidelines? Egads. I thought this was going to be straight forward, editing four files with five simple snippets of code.

See in my latest post that I found the package still contains older template files.

So I guess it is best that I wait for ropu to release Zen Cart 1.37 template edit instructions.

FYI, I no longer directly upload modified Zen cart files (template overrides or otherwise) provided in a mod package. I've been burned too many times doing it that way. My policy now is to manually compare and manually merge ALL mods and custom code released by anyone (except for Zen Cart dev team releases). And I will never, ever again install a Zen Cart mod on a production server, without first testing on a fresh STOCK Zen Cart installation on a test server. Doing this takes a little more upfront, but almost always saves time and hair-pulling frustration down the road. And you learn more about the mod code which helps in later troubleshooting and with upgrade issues.

Woody

3 Apr 2007, 12:02 PM
#985
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 completely agree with you that this should have been fixed. What I meant by saying that no changes in the template file since 1.0.5 was simply to say if you already installed any version prior to this with the changes made to your zcv1.3.7 you shouldn't have to change the template files again.

However, if this is a new install on zcv1.3.7 that have not been modified, you will have to apply the changes to the 4 files. Sorry for the confusion. I need to sleep, I have been up for 26 hours.

I just got done dealing with uninstalling ultimate seo url...I think I am staying away from that mod for a long time (even though I contributed towards funding it) :D Okay, that's a different thread :)

3 Apr 2007, 12:16 PM
#986
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:

By ropu's own admission only admin/orders.php was based on zcv1.3.7. I am sure he will probably update the templates to be zcv1.3.7.

There are a lot of people that have problem because PayPal Express checkout was introduced in zcv1.3.7 and the fact that the templates are based on zcv1.3.7 creates some issues for people not merging code but just overriding templates.
Darn. Some how I missed tj1's post and ropu's follow-up regards to the old template files. Thought I read everything in this thread since the release before installing. Wasted much time documenting the issues I was observing and posting my findings. Argh.

Yes most of the new code in the three 1.37 template files has to do with PayPal Express but some does not. Anyway, although this mod is still beta (or RC which is beta+), I would rather see just a little additional quality control in the releases, rather than the rush to release. Might prevent lots of hair pulling and keep this thread shorter. Not criticizing just an observation from someone who has lost lots of hair while testing out various permutations of this mod since October.

I need an aspirin or three now. Thanks again for the helpful info Isaac. Have a nice rest. zzzzz

Woody

3 Apr 2007, 12:22 PM
#987
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:

Darn. Some how I missed tj1's post and ropu's follow-up regards to the old template files. Thought I read everything in thread since the release before installing. Wasted much time documenting the issues I was observing and posting my findings. Argh.

Yes most of the new code in the three 1.37 template files has to do with PayPal Express but some does not. Anyway, although this mod is still beta (or RC which is beta+), I would rather see just a little additional quality control in the releases, rather than the rush to release. Might prevent lots of hair pulling and keep this thread shorter. Not criticizing just an observation from someone who has lost lots of hair while testing out various permutations of this mod since October.

I need an aspirin or three now.

Woody

Woody,

You have great observations and your contribution to the community is excellent. Personally, I enjoy reading your posts because they are always very thorough and you put so much time and effort into your posts to make them value added.

I was actually telling my wife about you the other day that you remind me so much of a lady I used to work with because of your attention to details. I was actually thinking that you must be a certified quality assurance person :)

Thank you for all you do to make this community a better place. Now if you can just fix all my problems with various mod, you'd be....:D

3 Apr 2007, 10:20 PM
#988
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)

Question: Does anyone have a login template file supporting ZC 1.37 built-in "split-login" functionality and customized for Google Checkout working?

My edit of the ZC 1.37 /includes/templates/YOUR_TEMPLATE/templates/tpl_login_default.php did not go so well so Google Checkout image not displaying on login page. Then I recalled I had Zen Cart 1.37 "split-login" feature enabled which may be a problem. So I uploaded tpl_login_default.php that comes with the mod and I observed the GC image, but of course everything (the ZC login form, ZC registration form and GC image/link) is jammed onto one single page. Too difficult to navigate and absorb all info on one page.

When I last tested GC, on a ZC 1.36 shop, I put together a custom split login page and made it work nicely with Google checkout. But with ZC 1.37 I would rather utilize 1.37's integrated split-login functionality, and then customize for Google Checkout, as necessary.

But before I attempt to resurrect my login template for ZC 1.36 and try to update it with 1.37 code, I thought best to ask if anyone here already has a working login template file based on ZC 1.37 which supports both "split-login" AND Google Checkout?

Thanks,
Woody

3 Apr 2007, 10:25 PM
#989
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)

Here is 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 5523 2007-01-03 09:37:48Z drbyte $
 */
?>
<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  include(DIR_WS_MODULES . 'show_google_components.php');  ?>
<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" />

  <!-- ** GOOGLE CHECKOUT ** -->
    <?php  include(DIR_WS_MODULES . 'show_google_components.php');  ?>
  <!-- ** END GOOGLE CHECKOUT ** -->

<?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>
3 Apr 2007, 10:26 PM
#990
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)

Hey Woody, I just realized I don't have the split login enabled so I am not sure if this is what you need or not but at least you can compare my file to your 1.3.7 file.

3 Apr 2007, 10:36 PM
#991
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:

Thank you for all you do to make this community a better place.
Actually thank you Isaac! I observe you consistently posting clear and concise comments, questions, answers and specific assistance throughout many of the mod support threads. Always helpful posts.

Myself, I am long winded, I do find that writing down (or typing out) my questions/issues often brings up possible solutions and workarounds to my frontal lobe. And I often answer my own questions just before hitting the send button. But I decide to submit my inquiry posts anyway (along with solution I discovered... or read elsewhere) always thinking it might possibly help someone else.

But I am long winded and I need to work on that ;-)

Back to configuring Google Checkout...

Woody

3 Apr 2007, 10:47 PM
#992
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:

Actually thank you Isaac! I observe you consistently posting clear and concise comments, questions, answers and specific assistance throughout many of the mod support threads. Always helpful posts.

Obviously you haven't been reading the Ultimate SEO URL thread today. :lol: BTW, Thanks for the compliments. I am going to be employing your assistance soon when I am ready to install Zen Lightbox.

3 Apr 2007, 10:48 PM
#993
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 have the "Better Together" mod installed which applies a discount if two items are purchased together. However, since that mod directly effects "order totals" and the order totals processing occurs at "Zen Cart checkout time", the Better Together discounts are not applied when using Google Checkout (and I assume the same when using PayPal eExpress but I have not yet tested).

Anyone have a workaround?

Or is the ONLY solution to post an "advisory" on the relevant product info pages stating the "better together" discount is not available with Google Checkout.

I have the discount applied to only a few products but unsure yet if this idea is supported by Google Checkout "policy".

I will post in the mod support thread. Maybe swguy has a hack.

Thanks,
Woody

4 Apr 2007, 12:25 AM
#994
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

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

Woodymon:

Darn. Some how I missed tj1's post and ropu's follow-up regards to the old template files. Thought I read everything in this thread since the release before installing. Wasted much time documenting the issues I was observing and posting my findings. Argh.
Woody

Yep, you did miss all my last few posts, they were pretty much the same as what you wrote later, but you were a bit more detailed. :)

I found it easier merging the files using WinMerge.

BlessIsaacola, can you post your edited tpl_shopping_cart_default.php? I have it all working fine now, but initially I had trouble figuring out where the edit had to go in this file because if one follows the exact instructions, the GC button doesn't show up when viewing the cart.
Although it's working just fine, since I don't know much about this, I would like to compare what you have to what I have to make sure I put the code in the right place.

4 Apr 2007, 12:27 AM
#995
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)

Thought I would bring this back up to the top as I see the admin directory is still hard coded into gcheckout.php.

http://www.zen-cart.com/forum/showpost.php?p=298937&postcount=299

DrByte:

The /admin/ path is not defined anywhere outside the admin folder. This is for security reasons. If nobody can find the path to your admin folder, it is much more difficult to exploit.

It would be more prudunt for the GC module to include an appropriate path in its return post-back so that it knows where to find relevant files, rather than to hard-code the path into any particular file.

4 Apr 2007, 12:55 AM
#996
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)

Ropu,

I'm searching for some recommends regarding configuring Zen Cart shipping to work with Google Checkout (or the other way around).

First I should state, we do NOT have a "third party shippiing provider". That is we ship "manually" and our shipping policies are very basic.

As a test...

With the sandbox enabled, I just added a physical item to my shopping cart then clicked Google Checkout on the shopping cart page. I observed the following error at the URL https://sandbox.google.com/checkout/cws/v2/Merchant/blahblahblah/checkout:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<error serial-number="blahblahblah">
<error-message>Duplicate shipping name FREE SHIPPING! found.</error-message>
</error>

(blahblahblah is hight-tech obfuscation.)

Not sure what would contribute to the above error.

Probably I need to do some work setting-up shipping for Google Checkout but that's where I get lost.

I've visited http://demo.globant.com/~brovagnati/tools/shipping_generator.php
but I don't understand how it works, even after clicking the question mark [?] helplinks.

Question 1: Does Google Checkout work if there is no third party shipping provider specified?

We use USPS mediamail and USPS airmail. But we don't connect to USPS via Zen Cart.

Question 2: I've previously posted to this thread the very basic shipping policy we employ. Does the latest version of this mod support such shipping policy? PayPal, and other payment methods we employ work fine with our basic shipping configuration. Any tips or recommends on how to make Google Checkout support our basic shipping method.

Rather than repost the basic shipping policy we employ please see these references for the details:

http://www.zen-cart.com/forum/showpost.php?p=298068&postcount=296
http://www.zen-cart.com/forum/showpost.php?p=306047&postcount=437
http://www.zen-cart.com/forum/showpost.php?p=309950&postcount=494
http://www.zen-cart.com/forum/showpost.php?p=323889&postcount=612

Thanks,
Woody

4 Apr 2007, 1:07 AM
#997
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)

tj1:

Yep, you did miss all my last few posts, they were pretty much the same as what you wrote later, but you were a bit more detailed. :)

I found it easier merging the files using WinMerge.

BlessIsaacola, can you post your edited tpl_shopping_cart_default.php? I have it all working fine now, but initially I had trouble figuring out where the edit had to go in this file because if one follows the exact instructions, the GC button doesn't show up when viewing the cart.
Although it's working just fine, since I don't know much about this, I would like to compare what you have to what I have to make sure I put the code in the right place.

@tj1: Do you use Zen Cart 1.37 with split-login? If so how is it working with merged Google Checkout?

I previously used WinMerge, but Linda sold me on the idea of Beyond Compare.

My merged tpl_shopping_cart_default.php is working fine (I found it was the easiest of the three to merge). If Isaac is not nearby soon I can post a copy.

Actually it might be good to post ALL three template file merges (for Zen Cart 1.37), so others can use and Ropu could include in his next release.

Woody

4 Apr 2007, 1:59 AM
#998
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:

Ropu,

I'm searching for some recommends regarding configuring Zen Cart shipping to work with Google Checkout (or the other way around).

First I should state, we do NOT have a "third party shippiing provider". That is we ship "manually" and our shipping policies are very basic.

As a test...

With the sandbox enabled, I just added a physical item to my shopping cart then clicked Google Checkout on the shopping cart page. I observed the following error at the URL https://sandbox.google.com/checkout/cws/v2/Merchant/blahblahblah/checkout:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<error serial-number="blahblahblah"> <error-message>Duplicate shipping name FREE SHIPPING! found.</error-message> </error> ``` > > (blahblahblah is hight-tech obfuscation.) > > Not sure what would contribute to the above error. > > Probably I need to do some work setting-up shipping for Google Checkout but that's where I get lost. Woody -

Maybe I can help sort through this - or add to the confusion...

The error above about Duplicate shipping name is rooted in the includes/modules/payment/googlecheckout.php file.

Here's what that section of my file looks like:

	$this->mc_shipping_methods = array(
                        'usps' => array(
                                    'domestic_types' =>
									array(	'Priority' => 'Priority Mail'
											),
					                       
    
                                    'international_types' =>
                          			array(	'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'
											),
										),
                           
						 'fedex1' => array(
                                    'domestic_types' =>
                                      array(
                                           ),

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

                                    'international_types' =>
                                      array(

                                           ),
                                        ),
                        'zones' => array(
                                    'domestic_types' =>
                                      array(
                                          'zones' => 'Zones Rates'
                                           ),

                                    'international_types' =>
                                      array(
                                          'zones' => 'Zones Rates intl'
                                           ),
                                        ),
                        'fedexexpress' => array(
                                    'domestic_types' =>
                                      array(
                                           ),

                                    'international_types' =>
                                      array(

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

                                    'international_types' =>
                                      array(

                                           ),
                                        ),
                        'freeoptions' => array(
                                    'domestic_types' =>
                                      array(
                                          'freeoptions' => 'Free Options'
                                           ),

                                    'international_types' =>
                                      array(
                                           ),
                                        ),
                        'freeshipper' => array(
                                    'domestic_types' =>
                                      array(
                                          'freeshipper' => 'Free Shipper'
                                           ),

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

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

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

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

                                    'international_types' =>
                                      array(
                                           ),
                                        ),
                        'table' => array(
                                    'domestic_types' =>
                                      array(
                                          'table' => 'Vary by Weight/Price'
                                           ),

                                    'international_types' =>
                                      array(
                                           ),
                                        ),
                                  );

	$this->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' => 'Media Mail',
                                        );	

As you can see, most of the values have been removed. If you count the major shipping types listed, you should see 13, each with a 'domestic' and 'international' section. If you see more, look for an extra FREE SHIPPING. That would cause the error you noted above.

Woodymon:

I've visited http://demo.globant.com/~brovagnati/tools/shipping_generator.php
but I don't understand how it works, even after clicking the question mark [?] helplinks.

Question 1: Does Google Checkout work if there is no third party shipping provider specified?

We use USPS mediamail and USPS airmail. But we don't connect to USPS via Zen Cart.

I ship manually too, although I use a zen>usps connection to estimate postage and it connects to GCO.

But my main shipping display comes from a table. Refering to the code listing above, I only have one entry for USPS domestic, That's for priority, in case someone's in a hurry. The USPS International section is how I quote shipping for international shipping.

The bulk of my shipping is via media mail. I have the rates set in a table in the Shipping Module>Table rates. It is passed to GCO in the last main shipping array - 'table' => array(
'domestic_types' =>
array(
'table' => 'Vary by Weight/Price'
),

In a fit of whimsey, I used the entry for table in the bottom of the above code to display "Media Mail" in the GCO selection rather than "Table" This is accomplished here:
'item' => 'Item',
'table' => 'Media Mail',
);

Woodymon:

Question 2: I've previously posted to this thread the very basic shipping policy we employ. Does the latest version of this mod support such shipping policy? PayPal, and other payment methods we employ work fine with our basic shipping configuration. Any tips or recommends on how to make Google Checkout support our basic shipping method.

Thanks,
Woody

As noted above, using a table rate for shipping would work for you. Setting your table up to count by item you might have something like this: 0:5,1.1:8,2.1:11, etc. (You probably already have this if PayPal and checkout works for you. Just reference your table as in the code above.) I accidently noticed that zones (mzmt) was picked up too, so that may also be an option for you, say, for international...)

As a side note, you must be really careful when making changes to the section that contains the above code. The correct number and placement of the parentheses and commas is critical. If you go to Admin reinstall the GCO module, but it doesn't appear, check the ()s and the commas.

I would like to see a self-calculating substitute for this file that just reads the Shipping module entries and automatically uses them for GCO setup. This file is the most vulnerable part of this add-in, in my opinion.

I hope this helps.

4 Apr 2007, 2:01 AM
#999
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)

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?

As a reminder, currently when I checkout I see the error:

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

Thanks for the temporary virtual goods workaround. Grayed out Google checkout button image with the text "Not available for these items" will have to be good enuff, at least until the wishful day when Google Checkout matures and instant downloads are truly supported ;-)

Woody

4 Apr 2007, 2:09 AM
#1000
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)

chain_man:

I would like to see a self-calculating substitute for this file that just reads the Shipping module entries and automatically uses them for GCO setup. This file is the most vulnerable part of this add-in, in my opinion.

I hope this helps.
Very informative and helpful post. I will play around (diligently) with shipping as you have suggested. Thank you very much for pointing me in the right direction...again.

Woody