Zen Cart Logo
Forums / Addon Payment Modules / Google Checkout with JROX Affiliate Manager

Google Checkout with JROX Affiliate Manager

Locked

Views: 9,427

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
15 Nov 2006, 4:48 AM
#1
jsohler avatar

jsohler

New Zenner

Join Date:
Nov 2005
Posts:
12
Plugin Contributions:
0

Google Checkout with JROX Affiliate Manager

I'm setting up a ZenCart site for a client, and they are really excited about using Google Checkout because of the FREE merchant processing through the end of the year, and because of the fact that for every $1 you spend on Google Adwords, they credit you $10 in merchant processing fees.

At present, the problem is that they also want to employ an affilaite program. I used to recommend another product, but have now switched to recommending JROX because I've heard good things about thier support and impressed by their activity here on the ZenCart forums.

The problem with either of these systems in conjuction with ZenCart is that (from my understanding) rely on control being returned to "checkout_success.php", and Google Checkout doesn't do that.

From my understanding, Google Checkout uses a callback URL to let ZenCart know when the status of an order has changed. Based on that, I would imagine that JROX integration code would need to be incorporated into "googlecheckout/responsehandler.php", or some other routines that are initiated from Google Checkout.

Unfortunately I'm not a PHP developer, and in fact completely left the software development world a few years back. From my observation, the dust hasn't completely settled in regard Google Checkout and ZenCart integration, but I was wondering if anyone was doing work with adding Affiliate software integration to the mix.

Thanks in advance for any assistance.

Sincerely,

Jeff Sohler
https://www.EnrichmentUnlimited.com

Don't resist LIFE! Accept every moment as if you had chosen it.

15 Nov 2006, 7:41 AM
#2
surfbum avatar

surfbum

New Zenner

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

Re: Google Checkout with JROX Affiliate Manager

jsohler:

At present, the problem is that they also want to employ an affilaite program. I used to recommend another product, but have now switched to recommending JROX because I've heard good things about thier support and impressed by their activity here on the ZenCart forums.

JROX has the best support out here. I switched to them to host my sites. Every time I needed support, the response time was measured in minutes, not days. They were always able to help me, smart people over there. Can't say enough good things about them. <shameless unpaid plug>

jsohler:

From my understanding, Google Checkout uses a callback URL to let ZenCart know when the status of an order has changed. Based on that, I would imagine that JROX integration code would need to be incorporated into "googlecheckout/responsehandler.php", or some other routines that are initiated from Google Checkout.

I'm going to be putting up a test host to see if I can get this going myself. If I can't get them both working together. If you make any progress, let me know.
.

21 Nov 2006, 11:25 PM
#3
jroxonline avatar

jroxonline

New Zenner

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

Re: Google Checkout with JROX Affiliate Manager

Hello,

We would like to test this option as well. We'll look at the Google Integration Code and see what we can do to get this integrated with JAM.

23 Nov 2006, 2:21 PM
#4
jsohler avatar

jsohler

New Zenner

Join Date:
Nov 2005
Posts:
12
Plugin Contributions:
0

Re: Google Checkout with JROX Affiliate Manager

Jroxonline,

We're still waiting for the Google Leve 2 Checkout module that's available here on the ZenCart site to stabalize.

MagneticOne claims to offer a complete Google Checkout Level 2 module that supports attribute based pricing, taxes and standard/custom shipping modules.

I'm asking for feedback to find out how stable their module is, as we may move forward with it because we want to take advantage of the FREE merchant processing the Google is offering through the end of the year. It may actually be worth paying for a module that is stable and complete now (if it is).

I'm hoping that you might also work with them on integration, as I would imagine it might be slightly different.

Please keep us posted!

Sincerely,

Jeff Sohler
https://www.EnrichmentUnlimited.com

7 Dec 2006, 5:23 PM
#5
krypton1 avatar

krypton1

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: Google Checkout with JROX Affiliate Manager

I'm working on this right now. I tried integrating jrox by hand into the google checkout responsehandler.php

So far it doesn't work. I finally figured out that the reason: it checks for cookies. responsehandler.php is getting run on the server, not the end users local computer (with the cookie). I will post a solution if/when i find one.

Brian

8 Dec 2006, 4:26 AM
#6
jroxonline avatar

jroxonline

New Zenner

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

Re: Google Checkout with JROX Affiliate Manager

krypton1,

Any chance you can send us that code so we can play with it as well? We're not familiar with the google checkout process yet, but it sounds like they do something similar to what Paypal does with IPN.

Do they allow you to add custom variables to the Google checkout button before it is clicked?

8 Dec 2006, 12:22 PM
#7
jroxonline avatar

jroxonline

New Zenner

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

Re: Google Checkout with JROX Affiliate Manager

Okay... We got something working for the Zencart Google Checkout Module and JAM integration.

First, we used the following to test:

  1. Zencart 1.3.6 default install from Fantastico (no addon modules)
  2. The Google Checkout Module for Zen Cart, the latest available download available here:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_48&products_id=314

Here's the instructions.

  1. First, make sure you integrate the Google Checkout Module for Zen Cart per their instructions.

  2. Test it using the Google Checkout Sandbox, and make sure Google Checkout is working for you as expected.

  3. When you transactions are posting properly to Zen Cart, you can now make some edits to the module.

  4. Open up and edit /googlecheckout/gcheckout.php file and make the following edits starting at or around line 160:

$gcheck->push('merchant-private-data');
$gcheck->element('session-data', $private_data);
$gcheck->element('product-data', $product_list);
$gcheck->element('ip-address', $_SERVER['REMOTE_ADDR']); //add ip address of customer. - added by colosports
** if (!empty($_COOKIE['jrox']))
{
$gcheck->element('jam-cookie', $_COOKIE['jrox']);
}**
$gcheck->pop('merchant-private-data');

  1. Save this file. Open up /googlecheckout/responsehandler.php and make the following edits at or around line 212:

                        'class' => $order_totals[$i]['code'],
                             'sort_order' => makeSqlInteger($order_totals[$i]['sort_order']));
     zen_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
    

    }

    ** ##############################

    SET JAM AFFILIATE COOKIE

    ##############################
    if(isset($data[$root]['shopping-cart']['merchant-private-data']['jam-cookie'])) {
    $jam_cookie = $data[$root]['shopping-cart']['merchant-private-data']['jam-cookie'];
    $url = "http://www.domain.com/affiliates/sale.php?amount=".$data[$root]['order-total']."&trans_id=".$data[$root]['google-order-number']."&custom_mid=".$jam_cookie;
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $resp = curl_exec($ch);
    curl_close ($ch);
    }
    ##############################

    END JAM AFFILIATE COOKIE

    ##############################**
    break;
    }
    case "order-state-change-notification": {
    process_order_state_change_notification($root, $data, $message_log);
    break;
    }

  2. Save the file and upload. Make sure to change https://www.domain.com/affiliates to point to your JAM install.

  3. Test it. Click on an active affiliate URL, do a test transaction and select Google Checkout as your payment option. Check to make sure the transaction is inserted into Zen Cart as well as the commission being generated in JAM.

Holler if you have any questions.

Ryan

8 Dec 2006, 6:04 PM
#8
krypton1 avatar

krypton1

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: Google Checkout with JROX Affiliate Manager

lol!! Ryan!

I stayed up all night last night coming up with my own fix for this. After much hours of head banging I finally wake up this morning, and come here to proudly display it to the world, and wham...you beat me to it.

Damn!

I did it almost the same way except I used the IP address instead of the cookie (and it required a small change in affiliate/sale.php) so I think your version is better.

Oh well, at least we got it working. This is huge since Google is offering free processing through all of 2007, a ton of people are going to want to use this fix.

Thanks!
Brian

2 Jun 2007, 1:20 AM
#9
jnetmcp avatar

jnetmcp

New Zenner

Join Date:
Apr 2007
Posts:
23
Plugin Contributions:
0

Re: Google Checkout with JROX Affiliate Manager

PayPal is offering free credit card transaction processing too and $100 Yahoo Ad Word credit.

You can sign up here: **http://www.zen-cart.com/getpaypal**

jnetmcp

www.infaithwear.com

Inspire Change...

30 Oct 2008, 7:46 PM
#10
evdoinfo avatar

evdoinfo

New Zenner

Join Date:
Sep 2008
Posts:
2
Plugin Contributions:
0

Re: Google Checkout with JROX Affiliate Manager

jroxonline:

Okay... We got something working for the Zencart Google Checkout Module and JAM integration.
First, we used the following to test:

  1. Zencart 1.3.6...
    Holler if you have any questions. Ryan

Ryan, do i still have to do the same thing, if using zencart 1.3.8a?

thanks in advance.