View Full Version : Google Checkout
wptech
08-10-2006, 06:50 AM
Google Checkout for Oscommerce:
Anyone here tested this mod out? I have with oscmax and it's posting a number 1 where the google checkout button should be. I think it's cuz of BTS.
It's located here:
http://www.oscommerce.com/community/contributions,4373/category,all/search,google+checkout
there's also a way better google checkout (API) for oscommerce that costs money here:
http://www.graith.co.uk/google_checkout.php
Hopefully someday this one will be free and oscmax could implement it since google checkout is going to be the future of ecommerce.
Thanks,
Ben
lonestarphd
08-12-2006, 08:38 AM
Another commercial version.
http://store.oscommerce-manager.com/
kopoba11
08-26-2006, 06:38 AM
Make sure to test your host for correct versions ofXMLDOm and curle
http://www.graith.co.uk/test_google_functions.zip
For example, I cannot run google checkout from Brian since my host different versions. In addition it will not work on PHP5
Later
JonCloud420
09-05-2006, 10:12 PM
Hello...
I am wondering if anyone has gotten the Google Checkout Level 2 contributions working on OscMax RC3?
The install directions called for all changes to be made on shopping_cart.php, but BTS changes that.
I think I might have something in the wrong place or somthing on the shopping_cart.tpl.php.
Does anyone have this working and/or can help me navigate to the solution? I really want to get this working.
Thanks,
JonCLoud :lol:
JonCloud420
09-13-2006, 04:33 PM
Does anybody have the Google Checkout Level 2 Contribution wiorking with OscMAX RC3?
I have it completely installed according to instructions built for plain oscommerce. But as we all know, BTS changes some things. For the most part, I know how it works, but I am having a difficulty making the mods work on the shopping_cart.tpl.php/shopping_cart.php page/s.
I'd really like to use this and take advatage of the Adwords savings it offers, but I need a brother to led me a hand, or a set of eyes to be sure.
I just need someone to look at my page code and tell me what is wrong with it, for I am only a half-ass PHP guy.
Here goes:
The directions say:
open shopping_cart.php
::around line 32 find
<!-- body //-->
::replace with
<!--- Google Checkout Start--->
<?php require(DIR_WS_FUNCTIONS . 'GlobalAPIFunctions.php'); ?>
<?php require(DIR_WS_FUNCTIONS . 'CheckoutAPIFunctions.php'); ?>
<!--- Google Checkout End --->
<!-- body //-->
::around line 150 find
}
new productListingBox($info_box_contents);
::replace with
//Google Checkout Start
include("Google_Item_Code.php");
//Google Checkout End
}
new productListingBox($info_box_contents);
::around line 200 find
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
::replace with
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr></form>
<? //Google Checkout Start
include("Google_Button_Code.php");
//Google Checkout End
?>
::around line 236 find
</table></form></td>
::replace with
</table></td>
Thats it. You're done changing files.
So I did that, but I had to use shopping_cart.tpl.php.
Here is my code for that page:
<!--- Google Checkout Start--->
<?php require(DIR_WS_FUNCTIONS . 'GlobalAPIFunctions.php'); ?>
<?php require(DIR_WS_FUNCTIONS . 'CheckoutAPIFunctions.php'); ?>
<!--- Google Checkout End --->
<!-- body //-->
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_cart.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
if ($cart->count_contents() > 0) {
?>
<tr>
<td class="infoBoxHeading">
<?php
$info_box_contents = array();
$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_REMOVE);
$info_box_contents[0][] = array('params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_PRODUCTS);
$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_QUANTITY);
$info_box_contents[0][] = array('align' => 'right',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_TOTAL);
$any_out_of_stock = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// Push all attributes information in an array
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
while (list($option, $value) = each($products[$i]['attributes'])) {
echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
//++++ QT Pro: Begin Changed code
$attributes = tep_db_query("select popt.products_options_name, popt.products_options_track_stock, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . $products[$i]['id'] . "'
and pa.options_id = '" . $option . "'
and pa.options_id = popt.products_options_id
and pa.options_values_id = '" . $value . "'
and pa.options_values_id = poval.products_options_values_id
and popt.language_id = '" . $languages_id . "'
and poval.language_id = '" . $languages_id . "'");
//++++ QT Pro: End Changed Code
$attributes_values = tep_db_fetch_array($attributes);
$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
$products[$i][$option]['options_values_id'] = $value;
$products[$i][$option]['products_options_values_na me'] = $attributes_values['products_options_values_name'] ;
$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
//++++ QT Pro: Begin Changed code
$products[$i][$option]['track_stock'] = $attributes_values['products_options_track_stock'] ;
//++++ QT Pro: End Changed Code
}
}
}
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (($i/2) == floor($i/2)) {
$info_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$info_box_contents[] = array('params' => 'class="productListing-odd"');
}
$cur_row = sizeof($info_box_contents) - 1;
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));
$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
if (STOCK_CHECK == 'true') {
//++++ QT Pro: Begin Changed code
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity'], $products[$i]['attributes']);
}else{
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
}
//++++ QT Pro: End Changed Code
if (tep_not_null($stock_check)) {
$any_out_of_stock = 1;
$products_name .= $stock_check;
}
}
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_na me'] . '</i></small>';
}
}
$products_name .= ' </td>' .
' </tr>' .
'</table>';
$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
'text' => $products_name);
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));
$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}
//Google Checkout Start
include("Google_Item_Code.php");
//Google Checkout End
}
new productListingBox($info_box_contents);
?>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
</tr>
<?php
if ($any_out_of_stock == 1) {
if (STOCK_ALLOW_CHECKOUT == 'true') {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>
</tr>
<?php
} else {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
$back = sizeof($navigation->path)-2;
if (isset($navigation->path[$back])) {
?>
<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>
<?php
}
?>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr></form>
<? //Google Checkout Start
include("Google_Button_Code.php");
//Google Checkout End
}
?>
</table></td>
</tr>
</table></td>
</tr>
<?php
else {
?>
<tr>
<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
}
?>
</table>
Now, as it is, it throws an error when you try to checkout:
Parse error: syntax error, unexpected '}' in /home/hsphere/local/group-1/home/joncloud/deeptronics.com/templates/aabox/content/shopping_cart.tpl.php on line 185
However, I am not sure if this is the whole problem or not. BTW, the admin side of it seems to work fine.
Can anyone help me out, PLEASE? Pretty please with sugar on top?
Thanks,
JonCLoud
[/quote]
mymikl
11-06-2006, 10:03 AM
Google Checkout I looked at the module page but my version is 2.0 and I dont find the catalog folder under /store or /store/includes/language/english. I dont work with either OSCOMMERCE or OCSMAX 2.0 everyday. I was wondering if anyone had put into place the contribution listed here in the forum with 2.0?
Thanks MrMikl
allwebnow
11-17-2006, 07:16 AM
Yes, I'm very interested in knowing whether the oscmax dev team is going to implement the recent level 2 google checkout module (located oscommerce.com) into the next releases. It would be a great addition to offer as a payment processor for those who don't have a merchant account. Can someone please post the status of this mod in conjunction to osmax future releases?
Here's the link to the level 2 module contrib: http://www.oscommerce.com/community/contributions,4556/category,all/search,google+checkout
kingsland
07-10-2007, 10:58 AM
michael_s created a zip file with the files to copy straight over see (http://www.oscmax.com/forums/google-checkout/7380-google-checkout-module-2.html#post25477)
but the problem is that it has errors. But this may help. I have asked for help on multiple occasions for this contribution but no luck so far, although a member called ropu is working on it at the moment see here (Issue 32 - google-checkout-oscommerce - Google Code (http://code.google.com/p/google-checkout-oscommerce/issues/detail?id=32&can=1&q=))
I hope this helps.
If you get this one working that would be brill. I have attempted many installs like many others on this forum with no luck. This looks like one of those work in progress contributions with many faults at the moment, interest is growing in this contribution as far as I can see with the growing number of posts on this topic.
Good luck
michael_s
07-10-2007, 04:32 PM
AFAIK there are no errors in the google checkout module I packaged up.
It works flawlessly for me and nobody has told me specifically where it is not working for them. Tell me exactly the issue and I can fix it... I just drop in the modified files into my stock osCMax 2 shop and it works 100% every time. No errors. No problems.
kingsland
07-10-2007, 10:01 PM
The problem is that when I install your module I click on install within the admin / payment modules section and nothing happens. I then click to edit the google module and I get the following error.
Parse error: syntax error, unexpected T_ARRAY_CAST in /home/............../public_html/admin/modules.php(234) : eval()'d code on line 1
I would really appreciate your help on this one, thanks
kingsland
07-11-2007, 10:48 AM
use FTP software to navigate to your area of space on your hosts server; normally located on YOURusername/public_html/catalog
This is where it is located for me;
I hope this helps
kingsland
07-11-2007, 10:58 AM
Yes, I'm very interested in knowing whether the oscmax dev team is going to implement the recent level 2 google checkout module (located oscommerce.com) into the next releases. It would be a great addition to offer as a payment processor for those who don't have a merchant account. Can someone please post the status of this mod in conjunction to osmax future releases?
Here's the link to the level 2 module contrib: osCommerce: Google Checkout module for osCommerce (http://www.oscommerce.com/community/contributions,4556/category,all/search,google+checkout)
I know michael_s has developed a copy and paste solution. I get errors but I want to know whether its just me because others have been able to install it without any errors. see http://www.oscmax.com/forums/google-checkout/7380-google-checkout-module-2.html#post25477
wxwalsh
08-02-2007, 03:24 PM
I've brought the price down and YES, it will be free in about six months (that's always been my intention).
I downloaded OSCMax2 RC3 and updated the instructions for that, so Google Checkout Level 2 is now working properly with OSCMax. You even get the Customer telephone number with it.
Brian
Graith Internet
Any chance of making good on this, Brian? It's been nearly a year.
wxwalsh
08-02-2007, 03:33 PM
Does anyone have an otherwise raw OSCMax fileset with google checkout integrated? Rather than having everyone who wants to use google checkout go through what seems to be a painful manual process that many are reporting problems doing?
michael_s
08-02-2007, 03:36 PM
Don't bother paying. I have been working with Ropu, the developer of the GC level 2 module and I have just about finished testing GC1.4 for osCMax. I am hoping to have it available Saturday or Sunday this weekend. If you can wait a few more days, it will be worth it. :)
michael_s
08-02-2007, 03:50 PM
No. Wait a couple of days and you will have your hands on a drop in package... See my reply to your other post.
wxwalsh
08-02-2007, 03:58 PM
Don't bother paying. I have been working with Ropu, the developer of the GC level 2 module and I have just about finished testing GC1.4 for osCMax. I am hoping to have it available Saturday or Sunday this weekend. If you can wait a few more days, it will be worth it. :)
Great!
I know one of the issues I read about involves not being able to pass shipping costs calculated by OSC to Google checkout. Has that been resolved?
Also, would downloadable products work with this setup? Would the user be able to download products after checking out via GC? That was another issue I recall being a problem some months ago.
michael_s
08-02-2007, 04:06 PM
I am not a GC expert, I am just porting the existing 1.4 code to be compatible with osCMax. Whatever issues present in the 1.4 GC module for osCommerce will be present in the osCMax version.
You can check out the development of the module itself here:
google-checkout-oscommerce - Google Code (http://code.google.com/p/google-checkout-oscommerce/)
Here is the official thread for the osCMax version of this module:
http://www.oscmax.com/forums/google-checkout/10076-official-google-checkout-v1-4-oscmax-2-0-thread.html
michael_s
08-05-2007, 07:03 PM
Wait no longer, the full-on osCMax version of google checkout 1.4 beta has been released.
I have started an official support thread here:
http://www.oscmax.com/forums/google-checkout/10076-official-google-checkout-v1-4-oscmax-2-0-thread.html
You can grab the Google Checkout module for osCMax here:
http://www.oscmax.com/project/google_checkout
Powered by vBulletin® Version 4.2.0 Copyright © 2023 vBulletin Solutions, Inc. All rights reserved.