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

Results 1,161 to 1,180 of 3,921
This thread is locked. New replies are disabled.
16 Apr 2007, 3:49 PM
#1161
woodymon avatar

woodymon

Totally Zenned

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

Google Checkout module for ZC 1.3.x (beta)

ropu:

please post the step-by-step to reproduce it, and i'll test it
also tell me if u can do it in http://demo.globant.com/~brovagnati/zen_demo2/
I thought I did provide a "step-by-step". I could write a novel if you want :wink2:
Will checkout your demo to see if I can replicate issue there.

Woody

16 Apr 2007, 3:52 PM
#1162
theangel2g avatar

theangel2g

New Zenner

Join Date:
Mar 2007
Posts:
27
Plugin Contributions:
0

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

Address is fine but the cost of shipping doesn't appear. It says: (Shipping and tax calculated on next page)

But when you go to the next page there are no shipping fees. It worked before but I obviously did something wrong. Any help is appreciated.

16 Apr 2007, 3:55 PM
#1163
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

Woodymon:

getting closer...I think.

I used this code

<?php $cart = $_SESSION['cart']; if ( MODULE_PAYMENT_GOOGLECHECKOUT_VIRTUAL_GOODS == 'True' && $cart->get_content_type() != 'physical' ) { echo '<div class="warning">' . MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_VIRTUAL . '</div>'; } ?>
> 
> So after:
>    $cart = $_SESSION['cart'];  
> 
> For debugging I added:
>    echo $cart;
> 
> And I observed:
> ```
Object id #4
```Any ideas?
> 
> Thanks,
> Woody

yes woody, the issue is that the shipping_cart.php class is not loaded before u are trying to grap the object from session, so it doesnt know what class to use. so u must include that file before getting the cart from session.

ropu
16 Apr 2007, 4:19 PM
#1164
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)

dharma:

Since ZC as of 1.3.7 has Paypal Express Checkout code in the core files, I wanted to suggest that in the next version of GCO be compatible with the existing PPE (have both PPE and GCO working at the same time).
With the latest 1.3RC2 update Ropu has included the current 1.37 template files (as provided by Chainman), so no need for template merging, unless you have customized your login or shopping cart template pages or admin orders page.

So "compatibility" with PPEC is a non-issue.

when it comes to accepting payments, this should be along with paypal part of the core/base files, and not a mod left to a few hard working people....but fully supported by the ZC developers and included in each new ZC release.

Not sure what you mean by "fully supported".

Keep in mind that DrByte is doing the updates on the PPEC (and PP IPN) mods along with supporting/developing Zen Cart proper. I don't think he has much time left over to also develop Google Checkout mod. But maybe he does and just does not require sleep :wink2:

(Note the PPEC module had been changing almost as fast as the GC module, until recently.)

I'm sure the founders are happy to have ropu do the heavy lifting.

Including GC in core is good idea from the shopowner perspective (as good as including PPEC anyway). But that would have to wait at least after the mod is out of beta and that will be some time. And I suspect the support team would first need to agree to become a Google Checkout partner before it would ever become a built in payment module. And they would have to find the time and expertise to support.

Woody

16 Apr 2007, 4:49 PM
#1165
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

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

Thanks woody for your response...I am going by the GCO version available in the downloads 1.0.4r...as it is still there I assumed that was the last stable version....by fully supported, I meant that any bug fixes, patches etc in both PPE and GCO be updated then rolled into the next upgrade of ZC as a whole.

I am not a big fan of paypal, and am excited by google checkout...but I guess I will have to wait a bit longer...I just wish you guys weren't alone on it, seems like a big job...

anyway, I do appreciate all the hard work everyone has done so far and am looking forward to it all coming together...

16 Apr 2007, 5:19 PM
#1166
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:

yes woody, the issue is that the shipping_cart.php class is not loaded before u are trying to grap the object from session, so it doesnt know what class to use. so u must include that file before getting the cart from session.

ropu
That makes sense. But I assume the class was loaded by config.core.php
(autoloader array for catalog application_top.php)
See http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials

At any rate, when I insert into tpl_product_info_display.php:
require(DIR_WS_CLASSES . 'shopping_cart.php');

above:
$cart = $_SESSION['cart'];

The page stops loading wherever the require was inserted.
I also tried making it the first line in the file after the comments in the header.

I also tried:
include(DIR_WS_CLASSES . 'shopping_cart.php');

include or require, either appears to have the same effect.

I observe the error in error log:
PHP Fatal error: Cannot redeclare class shoppingcart in /home/myaccount/public_html/myshop/includes/classes/shopping_cart.php on line 1878

Any more ideas?

Thanks again,
Woody

16 Apr 2007, 5:30 PM
#1167
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)

dharma:

Thanks woody for your response...I am going by the GCO version available in the downloads 1.0.4r...as it is still there I assumed that was the last stable version....by fully supported, I meant that any bug fixes, patches etc in both PPE and GCO be updated then rolled into the next upgrade of ZC as a whole.

Get the much newer mod version. 1.3RC2_beta. Ropu posted a link to it on Friday.

ropu is the developer following up on the work others had implemented before him. He has taken this mod very far in the last month. It can be very difficult if more than one person is developing a mod. The left hand will not necessarily know what the right hand is doing. And note the mod is based on the Google Checkout API (and has to be maintained to support the API).

The rest of us are just shopowners whom are beta "testers'. You should be one too! Just download the mod, install, test and post your findings.

Woody

16 Apr 2007, 5:37 PM
#1168
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

Woodymon:

That makes sense. But I assume the class was loaded by config.core.php
(autoloader array for catalog application_top.php)
See http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials

At any rate, when I insert into tpl_product_info_display.php:
require(DIR_WS_CLASSES . 'shopping_cart.php');

above:
$cart = $_SESSION['cart'];

The page stops loading wherever the require was inserted.
I also tried making it the first line in the file after the comments in the header.

I also tried:
include(DIR_WS_CLASSES . 'shopping_cart.php');

include or require, either appears to have the same effect.

I observe the error in error log:
PHP Fatal error: Cannot redeclare class shoppingcart in /home/myaccount/public_html/myshop/includes/classes/shopping_cart.php on line 1878

Any more ideas?

Thanks again,
Woody
woody the file should be included before the session is started.

16 Apr 2007, 6:01 PM
#1169
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:

woody the file should be included before the session is started.

ropu,

The error log entry I reported appears to indicate that it is indeed loaded before the product info page displays.

And I have restarted my browser and observe same issue. Or do I have to do something special to kill the session? Should I empty the sessions table in the DB?

I also put the include at the bottom of application_top.php but then the site would not load.

Woody

16 Apr 2007, 6:05 PM
#1170
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

Woodymon:

ropu,

The error log entry I reported appears to indicate that it is indeed loaded before the product info page displays.

And I have restarted my browser and observe same issue. Or do I have to do something special to kill the session? Should I empty the sessions table in the DB?

I also put the include at the bottom of application_top.php but then the site would not load.

Woody
try doing a ```php
session_destroy():

16 Apr 2007, 6:14 PM
#1171
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

ropu:

try doing a ```php
session_destroy():


this code work for me


```php
<?php
/*
 * Created on 16/04/2007
 *
 * Coded by: Ropu
 * Globant - Buenos Aires, Argentina  - zen_demo2
 */
 chdir('./..');
 include_once('includes/application_top.php');
 
 print_r($_SESSION['cart']);
 
 print_r($_SESSION['cart']->get_content_type());
 
 
?>

add this in the googlechekout/ dir

http://200.69.205.154/~brovagnati/zen_demo2/googlecheckout/woody_cart.php

ropu

16 Apr 2007, 6:35 PM
#1172
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:

try doing a ```php
session_destroy():


I'm not surre how/where to do this. Should i put at the top of the template file or ??

I deleted all the entries in the sessions table. But still did not solve. 

Below is my relevant code in my template file:
```php
<?php 
    include('includes/classes/shopping_cart.php');
	$cart = $_SESSION['cart']; 
	echo $cart;
	if ( MODULE_PAYMENT_GOOGLECHECKOUT_VIRTUAL_GOODS == 'True' && $cart->get_content_type() != 'physical' ) {
		echo '<p class="productGeneral">Blah blah blah.</p><br />';
      }
?>

But when

 include('includes/classes/shopping_cart.php');

is located as above the product_info_display page does not fully load.

and I see error in error log as just explained.

PHP Fatal error:  Cannot redeclare class shoppingcart

If I remove the include then the page loads fine but no text displays reporting the product is a download product.

What am I doing wrong? I think I'm going in circles.

Woody

16 Apr 2007, 6:53 PM
#1173
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)

<?php
/*
 * Created on 16/04/2007
 *
 * Coded by: Ropu
 * Globant - Buenos Aires, Argentina  - zen_demo2
 */
 chdir('./..');
 include_once('includes/application_top.php');
 print_r($_SESSION['cart']);
 print_r($_SESSION['cart']->get_content_type());
?>

What do I do with the above code?

add this in the googlechekout/ dir

OK i downloaded the file and put in googlecheckout directory.

I just tried to chat via GTalk and you were away.I think I'm mucking up this thread with this. Hopefully iniitiate a new thread soon :wink2:

Woody

16 Apr 2007, 8:39 PM
#1174
mgraphic avatar

mgraphic

New Zenner

Join Date:
Oct 2005
Posts:
25
Plugin Contributions:
0

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

How does ZC Orders admin send updates to GC orders status?

16 Apr 2007, 8:46 PM
#1175
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

Hi all

im releasing v1.3RC2 of the module

here is the link
http://google-checkout-zencart.googlecode.com/files/google-checkout-zencart-v1.3RC2.zip

Date: Mon Apr 16 13:27:15 2007
** Changes from v1.3RC1**

Added Files:
trunk/googlecheckout/shipping_generator/
trunk/googlecheckout/shipping_generator/README
trunk/googlecheckout/shipping_generator/index.php
trunk/googlecheckout/shipping_generator/multigenerator.php
trunk/googlecheckout/shipping_generator/multishipping_generator.js
trunk/googlecheckout/shipping_generator/multishipping_generator.php
trunk/googlecheckout/shipping_generator/shipping_method_generator.php
** Removed Files: **
trunk/includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_payment_default.php
** Modified Files:**
trunk/INSTALLATION
trunk/README
trunk/admin/includes/functions/extra_functions/added_function_for_google_checkout.php
trunk/googlecheckout/gcheckout.php
trunk/googlecheckout/responsehandler.php
trunk/includes/languages/english/modules/payment/googlecheckout.php
trunk/includes/modules/payment/googlecheckout.php
trunk/includes/templates/YOUR_TEMPLATE/templates/tpl_login_default.php
trunk/includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart_default.php

** Change Log:**
04/16/2007 v1.3RC2 (ropu)

  • Support for UK merchants
    http://code.google.com/apis/checkout/developer/release_notes.html (apr13)
  • Updated Templates to Zencart v1.3.7
  • Remove tpl_checkout_payment_default.php
  • Docs update
  • Minor bug fix
  • Added Shipping Generator Tool in the stardard package (Optional)
  • Flat rate shipping bug fixed
  • Improved tax and shipping restrictions
  • Added configurable Continue shopping URL.
  • Fix Warning: Invalid argument supplied for foreach() in
    /home/public_html/googlecheckout/gcheckout.php on line 390
  • Fixed shipping not showing correctly in the orders page

ropu

16 Apr 2007, 8:49 PM
#1176
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

mgraphic:

How does ZC Orders admin send updates to GC orders status?

hi mg

GC uses cURL to send xml request to GC servers.

u can find that code in admin/orders.php and /admin/includes/functions/extra_functions/added_function_for_google_checkout.php

ropu

16 Apr 2007, 9:19 PM
#1177
mgraphic avatar

mgraphic

New Zenner

Join Date:
Oct 2005
Posts:
25
Plugin Contributions:
0

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

ropu:

hi mg

GC uses cURL to send xml request to GC servers.

u can find that code in admin/orders.php and /admin/includes/functions/extra_functions/added_function_for_google_checkout.php

ropu

So - The orders page in ZC sends the updates to your Google account, or does Google send requests for updates?

Just wondering - My sandbox account is not being updated of the order process changes.

16 Apr 2007, 9:44 PM
#1178
2004g35 avatar

2004g35

Zen Follower

Join Date:
Jan 2005
Location:
Winter Haven, FL
Posts:
156
Plugin Contributions:
0

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

in updating from previous versions - including r1.3RC2_beta - do you recommend removing any files first. Or will loading on top of it be okay. Thank,

16 Apr 2007, 9:46 PM
#1179
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

mgraphic:

So - The orders page in ZC sends the updates to your Google account, or does Google send requests for updates?

Just wondering - My sandbox account is not being updated of the order process changes.

ZC send google state change notifications

have a look to the README TRACKING USERS AND ORDERS http://google-checkout-zencart.googlecode.com/svn/trunk/README

there is described how state are changed

also google send notifications to ZC, these are merchant-calculation-callbacks, new-order-notification, risk-information, etc more info here
http://code.google.com/apis/checkout/developer/index.html#notification_api

ropu

16 Apr 2007, 11:47 PM
#1180
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

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

2004g35:

in updating from previous versions - including r1.3RC2_beta - do you recommend removing any files first. Or will loading on top of it be okay. Thank,
Overriding files will be ok

but remember to remove and re install the module from the admin UI, because some new configurations are added

ropu