Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Apr 2007
    Posts
    54
    Plugin Contributions
    0

    Default Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    GOOGLE CHECKOUT MOD - places google checkout button on step 2 out of 3 on the zencart checkout. It gives google checkout the
    total value and description of the purchase, thus eliminating the need for google to calculate tax and shipping (and eliminating all the errors that go along with that).
    This is to go around the google checkout bug that screws up calculating shipping on zen cart purchases.

    Another good thing is that you don't need to have google checkout enabled in zencart, this method simply gives information straight to your google checkout account.

    THIS IS A BETA VERSION SO I WOULD LIKE TO REPEAT

    PLEASE BACK UP FILES BEFORE MODIFYING!!!!
    (don't say i didn't warn you)

    PLEASE POST HERE ANY PROBLEMS / ISSUES AND I WILL TRY MY BEST TO ANSWER

    By Serge Bronstein
    Sebron Company
    Fullerton, California
    Date: 12-10-2007
    We create online stores and do custom programming!
    questions? --> "http://www.sebronco.com/services/contactus.php"


    ******************************************************************************** *****************************

    Please backup original copies of files before modifying!
    Files to backup:
    \includes\templates\YOURTEMPLATE\templates\tpl_checkout_payment_default.php
    \includes\templates\YOURTEMPLATE\templates\tpl_shopping_cart_default.php
    \includes\templates\template_default\templates\tpl_modules_order_totals.php
    \includes\templates\template_default\sideboxes\tpl_shopping_cart.php


    Replace where it says YOURTEMPLATE with your template name
    Replace MerchantID# with your google checkout merchant #


    *********************************
    In file \includes\templates\YOURTEMPLATE\templates\tpl_checkout_payment_default.php

    after text:

    <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>
    <div align=right>

    add:

    <!-- Code by Sebron Company www.sebronco.com/services -->

    <form method="POST" action="https://checkout.google.com/cws/v2/Merchant/MERCHANTID#/checkoutForm" accept-charset="utf-8" name=googlecheckout>
    <!-- Product Name -->
    <input type="hidden" name="item_name_1" value="Payment to ***YOUR COMPANY NAME ***"/>
    <!-- Product Description -->
    <input type="hidden" name="item_description_1" value="<?php echo $_SESSION['myproducts']." *** OPTIONS: ".$_SESSION['myoptions']." *** SHIPPING: ".$GLOBALS['myshipping'];?>">
    <!-- Quantity -->
    <input type="hidden" name="item_quantity_1" value="1"/>
    <input type="hidden" name="item_price_1" value="<?php echo str_replace("$","",$GLOBALS['mytotal']);?>"/>
    <!-- charset=UTF-8; Do not remove this line -->
    <input type="hidden" name="_charset_"/>
    <!-- Display Google Checkout button -->
    <br>
    <input type="image" name="Google Checkout" alt="Fast checkout through Google" src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=421499532774289&w=180&h=46&style=white&variant=text&loc =en_US"
    height="46" width="180"/>
    OR
    </form>
    </p>
    </div>
    **********************************
    in file \includes\templates\YOURTEMPLATE\templates\tpl_shopping_cart_default.php

    after text:

    /**
    * 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 4140 2006-08-15 03:37:53Z drbyte $
    */

    add:

    $_SESSION['myoptions']='';

    after text:

    <?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

    add:

    $_SESSION['myoptions'].=$value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']);
    ************************************************

    in file \includes\templates\template_default\templates\tpl_modules_order_totals.php

    replace:

    if ($GLOBALS[$class]->output[$i]['title']=="Total:"){
    $GLOBALS['mytotal']=$GLOBALS[$class]->output[$i]['text']; }
    if ((!stristr($GLOBALS[$class]->output[$i]['title'],"Total:"))&&(!stristr($GLOBALS[$class]->output[$i]['title'],"Tax"))){

    with:

    if ($GLOBALS[$class]->output[$i]['title']=="Total:"){
    $GLOBALS['mytotal']=$GLOBALS[$class]->output[$i]['text']; }
    if ((!stristr($GLOBALS[$class]->output[$i]['title'],"Total:"))&&(!stristr($GLOBALS[$class]->output[$i]['title'],"Tax"))){
    $GLOBALS['myshipping']=$GLOBALS[$class]->output[$i]['title']; }

    **************************************************************
    in file \includes\templates\template_default\sideboxes\tpl_shopping_cart.php

    after text:

    /**
    * Side Box Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cartt 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.php 4821 2006-10-23 10:54:15Z drbyte $
    */

    add:

    $_SESSION['myproducts']="";

    after text:

    $content .= $products[$i]['name']. '</span></a></li>' . "\n";

    add:

    $_SESSION['myproducts'].=" *** ".$products[$i]['name'].$products[$i]['attribute'];
    ***************************************



    THATS IT!!!

  2. #2
    Join Date
    Sep 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW)

    hi serge111,
    do I still have to have cURL on my server? My host says that they just upgraded their Cpanel and no longer support cURL or libcURL. If I still need it can I use PHP/cURL? When you say that you dont have to have google checkout enabled, do you still have to have the mod (beta 1.4.1) installed?
    Thanks,
    Sean

  3. #3
    Join Date
    Apr 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW)

    Quote Originally Posted by v0903856 View Post
    hi serge111,
    do I still have to have cURL on my server? My host says that they just upgraded their Cpanel and no longer support cURL or libcURL. If I still need it can I use PHP/cURL? When you say that you dont have to have google checkout enabled, do you still have to have the mod (beta 1.4.1) installed?
    Thanks,
    Sean
    hi sean,

    you just need to have a regular php/zen cart installation. you don't need to have google checkout installed or enabled in zencart, but you do need valid working google checkout account. (general account). all this does is use a custom google checkout form and submits the price and products names from the zen cart order.

  4. #4
    Join Date
    Apr 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    today found a small bug...doesn't display # of multiple purchases...will fix soon...for example if someone buys 5 of the same item, it doesn't show '5' in the purchase notes...only discovered this today after many purchases so it's not super duper important but i will fix soon...just need to find where zencart keeps that #...

  5. #5
    Join Date
    Dec 2007
    Posts
    130
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    Hi there,
    This is a cool idea better than the google checkout module. Although works fine for me, is not included in the payment option and keeps looping back, which is no nice. Also like you state messing with the shipping and tax tables.

    However i tried to implement this and did not work
    1) Moved the left column to the right and the right was pushed down below
    2) in the file tpl_module_order_totals.php

    I have the following


    <?php
    /**
    * Module Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 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_modules_order_totals.php 2993 2006-02-08 07:14:52Z birdbrain $
    */
    ?>
    <?php
    /**
    * Displays order-totals modules' output
    */
    for ($i=0; $i<$size; $i++) { ?>
    <div id="<?php echo str_replace('_', '', $GLOBALS[$class]->code); ?>">
    <div class="totalBox larger forward"><?php echo $GLOBALS[$class]->output[$i]['text']; ?></div>
    <div class="lineTitle larger forward"><?php echo $GLOBALS[$class]->output[$i]['title']; ?></div>
    </div>
    <br class="clearBoth" />
    <?php } ?>




    Which differs from the one provided by you.

    Any help here?

    I would love to implement this rather the google checkout

    Sincerely
    Marcelo

  6. #6
    Join Date
    Apr 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    i missed that file! sorry...ok here's what my file looks like...

    includes/templates/template_default/templates/tpl_modules_order_totals.php

    *******

    <?php
    /**
    * Module Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 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_modules_order_totals.php 2993 2006-02-08 07:14:52Z birdbrain $
    */
    ?>
    <?php
    /**
    * Displays order-totals modules' output
    */

    // added serge bronstein
    for ($i=0; $i<$size; $i++) { ?>
    <div id="<?php echo str_replace('_', '', $GLOBALS[$class]->code); ?>">
    <div class="totalBox larger forward"><?php echo $GLOBALS[$class]->output[$i]['text']; ?></div>
    <div class="lineTitle larger forward"><?php echo $GLOBALS[$class]->output[$i]['title']; ?></div>
    <?php
    if ($GLOBALS[$class]->output[$i]['title']=="Total:"){
    $GLOBALS['mytotal']=$GLOBALS[$class]->output[$i]['text']; }
    if ((!stristr($GLOBALS[$class]->output[$i]['title'],"Total:"))&&(!stristr($GLOBALS[$class]->output[$i]['title'],"Tax"))){
    $GLOBALS['myshipping']=$GLOBALS[$class]->output[$i]['title']; }
    ?>
    </div>
    <br class="clearBoth" />
    <?php } ?>

    ***************

  7. #7
    Join Date
    Dec 2007
    Posts
    130
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    Ok neighbour I am gonna try see what happens

  8. #8
    Join Date
    Dec 2007
    Posts
    130
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    Quote Originally Posted by marcelo63 View Post
    Ok neighbour I am gonna try see what happens
    sorry I tried many times I give up is not working
    - check put page shows my payment methods and close to checkout button the Google "badge" hence is not as located as payment options. chick on Google check out image goes no where and in fact pops up a warning that no payment has been selected.
    Also in the script you declare a sandbox account which the "badge" does not work

    <input type="image" name="Google Checkout" alt="Fast checkout through Google" src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=421499532774289&w=180&h=4 6&style=white&variant=text&loc=en_US"
    height="46" width="180"/>


    1) My knowledge of ht ml and PHP is intermediate/ Novice. I just follow instruction pretty well, that's it. so I am sorry if I am dub on this.
    2) good if someone (if not done alredy ) can adapt this module to Zen-Cart
    addons.oscommerce.com/info/5157
    3) Is a pain in the for us when processing Priority Handling, Gift Wrapping, Free shipping, Wholesale prices, and other discounts and coupons with Google as Check out Module. Also my people haddetected that if the customers sign up for an account with us, look around and come back again, they go to Google and select to have their email address "hidden" to the merchant, the return information creates a duplicate account.
    4) Also I Would love to have s contribution Amazon Payments, which still in beta test will be a pain for PayPoopoo ) aka PayEnemy
    addons.oscommerce.com/info/5628

    Sincerely
    Marcelo
    www.ysandals.com
    Last edited by Kim; 30 Dec 2007 at 10:57 PM.

  9. #9
    Join Date
    Apr 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    that sandbox part is just an image...so it should be fine...i tried makin an account with your store and i didn't even see the GC button on the 2 of 3 page of checkout...can you upload everything and then email me [email protected] and i will take a look at your page...btw your store looks nice

    also check out my signature links - you can list your products for free there with a froogle feed...you can produce a froogle feed for zencart by downloading and installing an "easy populate" mod

  10. #10
    Join Date
    Apr 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Google Checkout Mod for Zen Cart (NEW) -- Quick GC Button

    ok here are the files as i have them, open zip and read the readme file thanks!

    http://www.rottenemployer.com/files/gc.zip

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Removing Checkout button for Google Checkout
    By ricky_101 in forum Addon Payment Modules
    Replies: 12
    Last Post: 6 Mar 2011, 12:32 AM
  2. Problem with Google Checkout button at shopping cart
    By entanianick in forum Addon Payment Modules
    Replies: 3
    Last Post: 10 Oct 2010, 01:32 AM
  3. Google Checkout for Zen Cart V1.3.9.f ?
    By waboose_ath in forum Addon Payment Modules
    Replies: 2
    Last Post: 16 Sep 2010, 11:46 AM
  4. Can I use Zen-Cart for a digital download site w/google checkout?
    By Mr_bill in forum Addon Payment Modules
    Replies: 2
    Last Post: 2 May 2010, 12:59 PM
  5. Google Checkout - New orders not updating Zen Cart Admin Site
    By handkem in forum Addon Payment Modules
    Replies: 13
    Last Post: 26 Jan 2009, 12:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg