Contributions
Google Checkout module for osCommerce
This Google Checkout module for osCommerce adds Google Checkout as a payment module within osCommerce.
This allows merchants using osCommerce to build their sites with Google Checkout as a payment processing option.
The plugin provides Level 2 integration of Google Checkout with osCommerce.
Plugin features include:
1. Posting shopping carts to Google Checkout
2. Shipping support (Currently, flat rates, item rates and table rates are supported)
3. Tax support
4. User and order updates within osCommerce
5. Order processing using osCommerce Admin UI
Expand All / Collapse All
This may NOT apply to everyone!
The function in homewetbar's instructions for product option handling uses tep_decode_specialchars. This function is not available to me anywhere.
If you don't have it either, then you will want to use the following built-in PHP function instead: htmlspecialchars_decode
Download the file for the updated version. The downloadable file is homewetbar's updates + my own updates to replace the appropriate function call.
catalogincludes/ Fix for GOOGLE CHECKOUT MODULE FOR OSC (v1.4.5_CCS)
When going to purchase an item you get this error at the checkout screen
* DIR_FS_CATALOG and DIR_WS_MODULES may be wrong configured in
includes/configure.php file. This dir doens't exists: /trunk/****/
****/catalogincludes/modules/shipping/
(please note the **** above are your site directory folders)
As seen above, there needs to be a "/" in between catalog and includes (catalog/includes/)
How to fix//
Manually Edit:
OSC_DIR/catalog/includes/configure.php
Find:
define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
Replace with:
define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');
INTEGRATING GOOGLE CHECKOUT with PRODUCT ATTRIBUTES OPTION TYPE FEATURE INSTRUCTIONS
Google checkout by default does not support the product options contrib. This is a stand alone file with instructions on how to make google checkout compatible with it. Hopefully someone can append this to the bottom of the instructions in the next full release for everyone's benefit. Remember to always backup first.
This deals with the issue that when UK shops use google checkout after a customer returns the county code is not set correctly in his account details, and all shop prices are then shown without TAX (VAT).
Just replace your checkouthandler.php file with this one in /googlecheckout/checkouthandler.php
Your shop now reads the country code from google correctly.
just run this lines into your phpmyadmin...
CREATE TABLE IF NOT EXISTS `google_orders` (
`orders_id` int(11) default NULL,
`google_order_number` bigint(20) default NULL,
`order_amount` decimal(15,4) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `google_checkout_logs` (
`google_checkout_logs_id` int(11) NOT NULL auto_increment,
`message_type` varchar(255) NOT NULL default '',
`msg_time` datetime NOT NULL default '0000-00-00 00:00:00',
`google_order_id` varchar(255) NOT NULL default '',
`xml` text NOT NULL,
`orders_id` int(11) default NULL,
PRIMARY KEY (`google_checkout_logs_id`),
KEY `orders_id` (`orders_id`),
KEY `google_order_id` (`google_order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS `google_checkout` (
`customers_id` int(11) default NULL,
`buyer_id` bigint(20) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Google Checkout module for osCommerce
This is the slightly newer version posted at http://code.google.com/p/google-checkout-oscommerce/downloads/list that will created needed tables for 100% new installs.
Only diffrence is in OSC_DIR/catalog/includes/modules/payment/googlecheckout.php
09/27/2007 v1.4.5_CCS (ropu)
- Added Carrier Calculated Shipping Support (CCS)!!
(http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Carrier_Calculated_Shipping.html)
- Added Sandbox and Production id/key config in Admin UI
- Added SANDBOX string to the payment method in order page for orders processed
with GC using sandbox.
- Added a warning under the GC Button when in Sandbox mode.
- Added a warning in the Payment Modules page in the Admin UI when in Sandbox mode.
- Disalbe merchant Calculation Shipping methods from the Admin UI by setting
Default value to 0.
- Added Google Checkout Custom Order States that match Google Checkout ones.
(Check INSTALLATION, an SQL must be run to update old GC order status)
- Check for non-valid state changes
- Allow product categories to use GC as checkout system
- Added Cart Expiration
- Check for correct configure.php defines to avoid shipping module inclusion errors
- Added a configuration to disable GC button for specific product categories
(double check http://checkout.google.com/seller/policies.html#4)
- Send Zencart's Credentials to new customers created with GC
- If AutoCharge is enabled in GC, a whole Digital purchase is processed without
merchant intervention.
- Use updated PHP Sample code
- Changed PHP Sample code parser classes names to avoid comflicts
(XMLParser -> CG_XMLParser, XMLBuilder -> CG_XMLBuilder)
- Added Cancel Order feature.
- Added shipping_methods_uk.php with UK pre-configured shipping methods.
- Admin UI configuration regroupment
- Added Recommended Default Values to Shipping_generator
- Installer fix
09/27/2007 v1.4.5_CCS (ropu)
- Added Carrier Calculated Shipping Support (CCS)!!
(http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Carrier_Calculated_Shipping.html)
- Added Sandbox and Production id/key config in Admin UI
- Added SANDBOX string to the payment method in order page for orders processed
with GC using sandbox.
- Added a warning under the GC Button when in Sandbox mode.
- Added a warning in the Payment Modules page in the Admin UI when in Sandbox mode.
- Disalbe merchant Calculation Shipping methods from the Admin UI by setting
Default value to 0.
- Added Google Checkout Custom Order States that match Google Checkout ones.
(Check INSTALLATION, an SQL must be run to update old GC order status)
- Check for non-valid state changes
- Allow product categories to use GC as checkout system
- Added Cart Expiration
- Check for correct configure.php defines to avoid shipping module inclusion errors
- Added a configuration to disable GC button for specific product categories
(double check http://checkout.google.com/seller/policies.html#4)
- Send Zencart's Credentials to new customers created with GC
- If AutoCharge is enabled in GC, a whole Digital purchase is processed without
merchant intervention.
- Use updated PHP Sample code
- Changed PHP Sample code parser classes names to avoid complicts
(XMLParser -> CG_XMLParser, XMLBuilder -> CG_XMLBuilder)
- Added Cancel Order feature.
- Added shipping_methods_uk.php with UK pre-configured shipping methods.
- Admin UI configuration regroupment
- Added Recommended Default Values to Shipping_generator
This small addition of 3 lines of code to gcheckout.php in the GoogleCheckout 1.4 version will add the Product_Model of each product to the Description sent to GoogleCheckout.
Very useful for dropship stores that use the warehouse model number to place their orders. Or any store with a large number of products that rely on the Product Model to place or track orders.
There is a screen shot included which shows very clearly the difference in what shows up in your Google Checkout Orders.
Package Includes:
Screen Shot of Before and After
Installation Instructions.txt
Modified v1.4 version of GCheckout.php
17/07/2007 v1.4beta1 (ropu)
- Refactor new-order-notification handling
- Merged the GC return page with the OSC default one, checkout_success.php
used as continue-shopping URL. Buyer will return with his logged in to OSC
- Digital Delivery support
- Support Google Refunds and Cancellations
- Fixed GC Invoicing issue, items will be added to the order details
- If the customers e-mail address already exists in OSC then add the
order placed to their account instead of creating a new customer
- If the GC exits in OSC but uses a different email then add the
order placed to their account instead of creating a new customer.
- Check if new customers have <email-allowed> and activate newsletters
- OT tax support
- Existing OSC customer accounts are updated when GC orders processed
- No more need to know admin folders name
- Add GC Module Version Control to avoid mix of configured and installed modules errors
- Moved Shipping quotes definition from includes/modules/payment/googlecheckout.php
to googlecheckout/shipping_methods.php
- Added OSC Order# to the GC Order when state changes from Pending to Processing
- Added index.html to googlecheckout/* dirs.
- Upgraded to use OSCommerce v2.2RC1
06/20/2007 v1.4 apha (ropu)
- Refactor all code using PHP Sample Code as the base library (under googlecheckout/library)
- Handles Logging, added log levels (error, request, response)
- Configuration from UI (comming soon), needed??
- Handles Basic authentication, add support for IIS (See TROUBLESHOOTING)
- Handles all XML parsing and building (New xml parsed used)
- Added OT support (low order fees, group discounts and any other custom OT module)
- feedback needed. Calculating tax for this, still an issue.
- Add warning messages when GC button is disabled.
- Add stack message in Admin UI with GC orders state changes and errors
- Added configuration to also use OSC email system for GC orders
- Added shipping generator (googlecheckout/shiping_generator/) (optional)
- Added a metric tester for shipping times feedback (optional)
- Added 3rd party tracking
- Added a coustom Continue shopping url with GC bought items.
- Moved logs to a .htacces protected dir (googlecheckout/logs)
- Added Correct HTTP status (2xx, 4xx, 5xx) return when errors occurrs with the correct message
- All strings are defined in the language include (only english right now)
- Use DEFAULT_CURRENCY as the currency in GC cart, not buyers session one
- Added version number to all files
- Added GC Module Installed and Configured Version check.
- Slipt README and CHANGELOG
This will allow your text attributes from imprint to be sent over to google checkout.
This overwrites the product description and places in the text attributes.
Thanks, any questions or comments direct them to me at bar@pics.com
ONLY WORKS WITH VERSION 1.4!!! I WILL ONLY RELEASE OLDER VERSION BY REQUEST
17/07/2007 v1.4beta1 (ropu)
- Refactor new-order-notification handling
- Merged the GC return page with the OSC default one, checkout_success.php
used as continue-shopping URL. Buyer will return with his logged in to OSC
- Digital Delivery support
- Support Google Refunds and Cancellations
- Fixed GC Invoicing issue, items will be added to the order details
- If the customers e-mail address already exists in OSC then add the
order placed to their account instead of creating a new customer
- If the GC exits in OSC but uses a different email then add the
order placed to their account instead of creating a new customer.
- Check if new customers have <email-allowed> and activate newsletters
- OT tax support
- Existing OSC customer accounts are updated when GC orders processed
- No more need to know admin folders name
- Add GC Module Version Control to avoid mix of configured and installed modules errors
- Moved Shipping quotes definition from includes/modules/payment/googlecheckout.php
to googlecheckout/shipping_methods.php
- Added OSC Order# to the GC Order when state changes from Pending to Processing
- Added index.html to googlecheckout/* dirs.
- Upgraded to use OSCommerce v2.2RC1
06/20/2007 v1.4 apha (ropu)
- Refactor all code using PHP Sample Code as the base library (under googlecheckout/library)
- Handles Logging, added log levels (error, request, response)
- Configuration from UI (comming soon), needed??
- Handles Basic authentication, add support for IIS (See TROUBLESHOOTING)
- Handles all XML parsing and building (New xml parsed used)
- Added OT support (low order fees, group discounts and any other custom OT module)
- feedback needed. Calculating tax for this, still an issue.
- Add warning messages when GC button is disabled.
- Add stack message in Admin UI with GC orders state changes and errors
- Added configuration to also use OSC email system for GC orders
- Added shipping generator (googlecheckout/shiping_generator/) (optional)
- Added a metric tester for shipping times feedback (optional)
- Added 3rd party tracking
- Added a coustom Continue shopping url with GC bought items.
- Moved logs to a .htacces protected dir (googlecheckout/logs)
- Added Correct HTTP status (2xx, 4xx, 5xx) return when errors occurrs with the correct message
- All strings are defined in the language include (only english right now)
- Use DEFAULT_CURRENCY as the currency in GC cart, not buyers session one
- Added version number to all files
- Added GC Module Installed and Configured Version check.
- Slipt README and CHANGELOG
* not full package * updated INSTALLATION.txt attached *
If you have problems with the formatting of your login.php page after install, use the following as a replacement for step 5 of the installation or just use the attached file:
----------------------------------------------------------------------------
5. /catalog/login.php LINE 203
============================================================================
REPLACE:
<td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></form></td>
WITH:
<td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<?php
// ** GOOGLE CHECKOUT **
// Checks if the Google Checkout payment module has been enabled and if so
// includes gcheckout.php to add the Checkout button to the page
$status_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_GOOGLECHECKOUT_STATUS'");
while ($status = tep_db_fetch_array($status_query)) {
$status_flag = $status['configuration_value'];
}
if ($status_flag == 'True') {
include('googlecheckout/gcheckout.php');
}
// ** END GOOGLE CHECKOUT **
?>
</td>
</tr>
</table></form></td>
All details you can find in a file or in support forum:
http://forums.oscommerce.com/index.php?s=&showtopic=229637&view=findpost&p=1074991
04/10/2007 v1.3RC1 (ropu)
- Add tracking data to the Admin UI Orders
- Fixed SSL issue with Google Analytics feature
- International Shipping Features
- Restricting Shipping Options for Post Office (P.O.) Box Addresses feature
- International Tax Features
- Selecting a Rounding Policy for Tax Calculations
- Fixed Tax for zones
- Fixed Tax for products
- Added support for All Areas Zones
- Add a configuration to disable Google Checkout Button when are virtual good in the cart
(double check http://checkout.google.com/seller/policies.html#4)
- Disable multisocket Option :(
04/18/2007 v1.3RC2 (ropu)
- Support for UK merchants
http://code.google.com/apis/checkout/developer/release_notes.html (apr13)
- Docs update
- Minor bug fix
- Added Shipping Generator Tool in the stardard package (Optional)
- Flat rate shipping bug fixed
- Improved tax and shipping restrictions
Fix wrong function name
Fix gray button when Tax Class selected bug (Thx BlessIsaacola)
V1.2 RC2 (ropu)
-Fix duplicated upsxml names
-Add <calculation-mode>SINGLE</calculation-mode>
02/26/2007 v1.2 (ropu)
- Add multisocket feature for merchant-calculations (alfa)(optional)
- Different algorithm to retrieve quotes
- Add Google Analytics Support
- Add support for PHP CGI installations
- Add in UPSXML methods by default
- Add user and password for Google Checkout buyers
- Items retrieved from Merchant-private-item-data instead of session.
- Many bug fixes
Fix <tax-table-selector> strict validation.
This is the third beta version of the new release collaborated on by rszrama and ropu that cleans up a large amount of code dealing with the osCommerce integration and fixes shipping. Merchant calculated shipping results are now being returned properly and in a timely manner.
Again, this is a beta. Kinks will be worked out, and once some behind the scenes stuff is taken care of this will be officially rolled into the contribution and put up in the Google repository as well.
I just don't want people to continue to download the old, broken distributions.
This module has been tested successfully to provide merchant calculations for FedEx (using the fedex1 module) and UPS (using the UPS XML module, though it still times out sometimes).
[[ Difference from b2 to b3 is a fix in the installation instructions and catalog/admin/includes/functions/general.php. ]]
This is the second beta version of the new release collaborated on by rszrama and ropu that cleans up a large amount of code dealing with the osCommerce integration and fixes shipping. Merchant calculated shipping results are now being returned properly and in a timely manner.
Again, this is a beta. Kinks will be worked out, and once some behind the scenes stuff is taken care of this will be officially rolled into the contribution and put up in the Google repository as well.
I just don't want people to continue to download the old, broken distributions.
This module has been tested successfully to provide merchant calculations for FedEx (using the fedex1 module) and UPS (using the UPS XML module, though it still times out sometimes).
[[ This is the exact same contribution as the one below just packaged in a .zip instead of a .tar.gz file. ]]
This is the second beta version of the new release collaborated on by rszrama and ropu that cleans up a large amount of code dealing with the osCommerce integration and fixes shipping. Merchant calculated shipping results are now being returned properly and in a timely manner.
Again, this is a beta. Kinks will be worked out, and once some behind the scenes stuff is taken care of this will be officially rolled into the contribution and put up in the Google repository as well.
I just don't want people to continue to download the old, broken distributions.
This module has been tested successfully to provide merchant calculations for FedEx (using the fedex1 module) and UPS (using the UPS XML module, though it still times out sometimes).
This is a beta version of a new release collaborated on by rszrama and ropu that cleans up a large amount of code dealing with the osCommerce integration and fixes shipping. Merchant calculated shipping results are now being returned properly and in a timely manner.
Again, this is a beta. Kinks will be worked out, and once some behind the scenes stuff is taken care of this will be officially rolled into the contribution and put up in the Google repository as well.
I just don't want people to continue to download the old, broken distributions over the weekend. We'll see you all on Monday! ;)
Few minor fixes in instructions.
Added a Quick Fix and tip TXT file.
This is THE FULL DOWNLOADABLE PACKAGE.
Did NOT edit any original code.
This a full package for users that have UPS XML installed.
Original files were pulled from Google's SVN and added fixes to make UPSXML module to coincide.
All original files from December 5th, revised.
Fixed and renamed README to README.txt
Renamed INSTALLATION to INSTALLATION.txt
Besides fixing ReadMe file and changing files extensions to TXT files, ALL files are original.
FULL DOWNLOAD
- Added order-state-change, risk-information and charge-amount notification into the Admin UI
- Fixed Shopping cart not obtained from session.
- Add support for Merchant Calculated Shipping Rates.
- Fixed minor bugs in responsehandler.php and orders.php files
- Change the XML parser and builder
- Removed getallheader() function
- Fixed wrong Qty in Admin UI
- Fixed modules not saving their settings
- Fixed Notify Customer option
Fixed minor bugs in responsehandler.php and orders.php files
Step-by-step installation instructions included.
Updated the original module to run on either PHP4 or PHP5.
This Google Checkout module for osCommerce adds Google Checkout as a payment module within osCommerce.
This allows merchants using osCommerce to build their sites with Google Checkout as a payment processing option.
The plugin provides Level 2 integration of Google Checkout with osCommerce.
Plugin features include:
1. Posting shopping carts to Google Checkout
2. Shipping support (Currently, flat rates, item rates and table rates are supported)
3. Tax support
4. User and order updates within osCommerce
5. Order processing using osCommerce Admin UI
Note: Contributions are used at own risk.