speed777 Posted September 6, 2009 Share Posted September 6, 2009 I've installed official v1.5 but face one issue. It processes order correctly (on the Google side) but doesn't save orders to osc db. The following data has been saved into /googlecheckout/logs/response_message.log Your help will be really appreciated. Read the part on sessions Quote Link to comment Share on other sites More sharing options...
MrBeard Posted September 10, 2009 Share Posted September 10, 2009 Hi All Please help me. I have the Google Checkout module working, but being in the UK I am struggling to get the Shipping to work. I've tried the Shipping calculator and it does not return me anything useful. In the admin section where I edit the Payment module I have the following: I can't find where the "rmfirst" exists ******************************************************** Disable Google Checkout for Virtual Goods? If this configuration is enabled and there is any virtual good in the cart the Google Checkout button will be shown disabled. True False Allow US PO BOX shipping? Allow sending items to US PO Boxes? True False Default Values for Real Time Shipping Rates Default values for real time rates in case the webservice call fails. Set Default Value to 0 to disable the method Shipping Generator Royal Mail 1st Class Standard rmfirst not configured! Royal Mail 2nd Class Standard rmsecond not configured! Royal Mail Standard Parcels rmstandardparcel not configured! GoogleCheckout Carrier Calculated Shipping Do you want to use GC Carrier calculated shipping? This feature can be mixed with Flat Rate Shipping, but not Merchant Calculated. True False Carrier Calculater Shipping Configuration Set Default Values, Fix and Variable charge Set Def. Value to 0 to disable the method FedEx domestic_types Def. Value | Fix Charge | Variable | Method Name GBP: GBP: % Ground GBP: GBP: % Home Delivery GBP: GBP: % Express Saver GBP: GBP: % 2Day GBP: GBP: % Standard Overnight GBP: GBP: % Priority Overnight GBP: GBP: % First Overnight ******************************************************** I'm sorry if I am repeating other peoples questions, I searched but couldn't find this being addressed. Cheers MrBeard Quote Link to comment Share on other sites More sharing options...
DAKstaff Posted September 22, 2009 Share Posted September 22, 2009 (edited) Hi All Please help me. I have the Google Checkout module working, but being in the UK I am struggling to get the Shipping to work. I've tried the Shipping calculator and it does not return me anything useful. In the admin section where I edit the Payment module I have the following: I can't find where the "rmfirst" exists ******************************************************** Disable Google Checkout for Virtual Goods? If this configuration is enabled and there is any virtual good in the cart the Google Checkout button will be shown disabled. True False Allow US PO BOX shipping? Allow sending items to US PO Boxes? True False Default Values for Real Time Shipping Rates Default values for real time rates in case the webservice call fails. Set Default Value to 0 to disable the method Shipping Generator Royal Mail 1st Class Standard rmfirst not configured! Royal Mail 2nd Class Standard rmsecond not configured! Royal Mail Standard Parcels rmstandardparcel not configured! GoogleCheckout Carrier Calculated Shipping Do you want to use GC Carrier calculated shipping? This feature can be mixed with Flat Rate Shipping, but not Merchant Calculated. True False Carrier Calculater Shipping Configuration Set Default Values, Fix and Variable charge Set Def. Value to 0 to disable the method FedEx domestic_types Def. Value | Fix Charge | Variable | Method Name GBP: GBP: % Ground GBP: GBP: % Home Delivery GBP: GBP: % Express Saver GBP: GBP: % 2Day GBP: GBP: % Standard Overnight GBP: GBP: % Priority Overnight GBP: GBP: % First Overnight ******************************************************** I'm sorry if I am repeating other peoples questions, I searched but couldn't find this being addressed. Cheers MrBeard when you use the shipping generator is generates php code for you that you are supposed to put into shipping_methods.php.Because you have'nt configured this file to have referances to your shipping methods is why you are getting these errors.Im in the uk myself and here is some example code that is in my file: <?php /* **GOOGLE CHECKOUT ** v1.4 * @version $Id: shipping_methods.php 5342 2007-06-04 14:58:57Z ropu $ * */ // this are all the available methods for each shipping provider, // see that you must set flat methods too! // CONSTRAINT: Method's names MUST be UNIQUE // Script to create new shipping methods // [url="http://demo.globant.com/~brovagnati/tools"]http://demo.globant.com/~brovagnati/tools[/url] -> Shipping Method Generator /** * File: googlecheckout/shipping_methods.php file */ $mc_shipping_methods = array( 'rmfirst' => array( 'domestic_types' => array( 'rmfirst' => '(No Tracking. Use at own risk. 1-3 days)', ), 'international_types' => array( ), ), 'rmfirstrec' => array( 'domestic_types' => array( 'rmfirstrec' => '(Insured up to GBP39, ships normally within 1 to 3 days)', ), 'international_types' => array( ), ), 'rmsecond' => array( 'domestic_types' => array( 'rmsecond' => '(Ships normally within 3 to 5 days)', ), 'international_types' => array( ), ), 'rmsecondrec' => array( 'domestic_types' => array( 'rmsecondrec' => '(Insured up to GBP39, ships normally within 3 to 5 days)', ), 'international_types' => array( ), ), 'rmspecial' => array( 'domestic_types' => array( 'rmspecial' => '(Insured up to GBP 500, ships normally Nextday)', ), 'international_types' => array( ), ), 'rmstandardparcel' => array( 'domestic_types' => array( 'rmstandardparcel' => '(Insured up to GBP39, ships normally within 3 to 5 days)', ), 'international_types' => array( ), ), 'parcelforce48' => array( 'domestic_types' => array( 'parcelforce48' => '(Insured up to GBP 150, ships normally within 48 Hours)', ), 'international_types' => array( ), ), 'spu' => array( 'domestic_types' => array( 'spu' => 'Pickup of the order from our warehouse at Unit 6, Key Business Park Kingsbury Road Erdington Birmingham', ), 'international_types' => array( ), ), ); $mc_shipping_methods_names = array( 'rmfirst' => 'Royal Mail 1st Class Standard', 'rmfirstrec' => 'Royal Mail 1st Class Recorded', 'rmsecond' => 'Royal Mail 2nd Class Standard', 'rmsecondrec' => 'Royal Mail 2nd Class Recorded', 'rmspecial' => 'Royal Mail Special Delivery', 'rmstandardparcel' => 'Royal Mail Standard Parcels', 'parcelforce48' => 'Parcelforce 48', 'spu' => 'Store Pickup. MO-FR 9:30/1:00-1:30/17:00', ); ?> Edited September 22, 2009 by DAKstaff Quote Link to comment Share on other sites More sharing options...
DAKstaff Posted September 22, 2009 Share Posted September 22, 2009 hi hopefully someone can help me with my problem,i got everything working fine in sandbox mode,had a compatible ssl cert installed,and switched to Production mode.The problem i have is that google can't reach my responshandler.php, it gives this error message: URL you are using for merchant calculations is not valid or is not https http://www.dakltd.co.uk/catalog/googlecheckout/responsehandler.php -- the error we got is An HTTPS URL is required. when i try to access the url manaully i get this message: IISPassword The page cannot be displayed There is a problem with the page youare trying to reach and it cannot be displayed. It is most likely that configuration files for this url are corrupted. -------------------------------------------------------------------------------- Please try the following: Click the Refresh button, or try again later. Open the home page, and then look for links to the information you want. If you believe you should be able to view this directory or page, please contact the Web site administrator by using the e-mail address or phone number listed on the home page. HTTP Error 500 IISPassword for Internet Information Services i have ran the htaccess.php file successfully and have basic htaccess enabled in the google control panel. Does anyone have any pointers as to what it might be?i've been trying everything i can think of for the best part of a week. I would be very gratefull for any help! Quote Link to comment Share on other sites More sharing options...
twistedstar Posted September 28, 2009 Share Posted September 28, 2009 Hi All Sorry for asking this question but we are new to this and dont kow what to do. Is a SSL required for Google checkout. I was under the assumption that the customer was directed to google and the payment was taken via that. Then added onto your account just as it is when you do on paypal. Can somebody please explain Not sure if this question actually belongs in here but how do you change the shiipping methods/costs to royal mail or Parcel force. Thanking you all in advance for any help Quote Link to comment Share on other sites More sharing options...
davidrecord Posted September 28, 2009 Share Posted September 28, 2009 Customer magically 'logged in' on return from Google Checkout If a customer who has not logged into my site puts some items in the basket and then does a Google Checkout, they are taken to the Google checkout pages as expected (currently using sandbox for testing). After they have finished entering their data, they are returned back to my site to gc_return.php. Here it gives them the notification of the product they have just bought, all as expected. However, I have just noticed that now the customer has the 'logged in' status, and they have the ability to go and look at their account, previous orders, addresses etc. all of which are blank. Has anybody else experienced this, and do you know of a fix? Thanks in advance, Dave Quote Link to comment Share on other sites More sharing options...
davidrecord Posted September 29, 2009 Share Posted September 29, 2009 Customer magically 'logged in' on return from Google Checkout If a customer who has not logged into my site puts some items in the basket and then does a Google Checkout, they are taken to the Google checkout pages as expected (currently using sandbox for testing). After they have finished entering their data, they are returned back to my site to gc_return.php. Here it gives them the notification of the product they have just bought, all as expected. However, I have just noticed that now the customer has the 'logged in' status, and they have the ability to go and look at their account, previous orders, addresses etc. all of which are blank. Has anybody else experienced this, and do you know of a fix? Thanks in advance, Dave I might as well reply to myslelf, since I've found out the answer (or some of it!). The magic code is in responsehandler.php in the googlecheckout directory. It does lots of clever things like check to see if the customer was logged into the site before going to GC. If a customer is logged in and their info (email address and delivery address) matches up with GC's version, then GC updates the personal information (+order history) pages on my website quite happily. What STILL doesn't work though is when a customer uses a different email/delivery address. When this happens GC creates a new account on my website and stores the information in there. When this happens, as soon as the user is returned to my site, they are logged in, but the personal information is not there. If they log out and log back in again (with the password that has been sent to them -- when the order state changes to Google Processing), they can finally see all of their personal information. I STILL need to find out why a customer cannot see his personal info when being returned to the site. DOES anybody else have any clues. IF SO PLEASE HELP ME. PLEEEASSSSEE Dave everyemail addresses, delivery addresses of who was logged into the site before go Quote Link to comment Share on other sites More sharing options...
speed777 Posted September 29, 2009 Share Posted September 29, 2009 I might as well reply to myslelf, since I've found out the answer (or some of it!). The magic code is in responsehandler.php in the googlecheckout directory. It does lots of clever things like check to see if the customer was logged into the site before going to GC. If a customer is logged in and their info (email address and delivery address) matches up with GC's version, then GC updates the personal information (+order history) pages on my website quite happily. What STILL doesn't work though is when a customer uses a different email/delivery address. When this happens GC creates a new account on my website and stores the information in there. When this happens, as soon as the user is returned to my site, they are logged in, but the personal information is not there. If they log out and log back in again (with the password that has been sent to them -- when the order state changes to Google Processing), they can finally see all of their personal information. I STILL need to find out why a customer cannot see his personal info when being returned to the site. DOES anybody else have any clues. IF SO PLEASE HELP ME. PLEEEASSSSEE Dave everyemail addresses, delivery addresses of who was logged into the site before go This sounds like it has to with the session being lost when the customer uses a different email/delivery address. When they log back in a new session is being created and they can view the account info properly. Quote Link to comment Share on other sites More sharing options...
speed777 Posted September 29, 2009 Share Posted September 29, 2009 (edited) Hi All Sorry for asking this question but we are new to this and dont kow what to do. Is a SSL required for Google checkout. I was under the assumption that the customer was directed to google and the payment was taken via that. Then added onto your account just as it is when you do on paypal. Can somebody please explain Not sure if this question actually belongs in here but how do you change the shiipping methods/costs to royal mail or Parcel force. Thanking you all in advance for any help [/quote Yes, a SSL is required for Googlecheckout to function properly and here's why. When a live transaction is activated the googlecheckout responsehandler.php file communicates with your site and this communication is encrypted, that means it goes to a https URL. You can use a shared certificate provided free by your server if you don't want to buy one. Edited September 29, 2009 by speed777 Quote Link to comment Share on other sites More sharing options...
speed777 Posted September 29, 2009 Share Posted September 29, 2009 (edited) hi hopefully someone can help me with my problem,i got everything working fine in sandbox mode,had a compatible ssl cert installed,and switched to Production mode.The problem i have is that google can't reach my responshandler.php, it gives this error message: URL you are using for merchant calculations is not valid or is not https http://www.dakltd.co.uk/catalog/googlecheckout/responsehandler.php -- the error we got is An HTTPS URL is required. when i try to access the url manaully i get this message: IISPassword The page cannot be displayed There is a problem with the page youare trying to reach and it cannot be displayed. It is most likely that configuration files for this url are corrupted. -------------------------------------------------------------------------------- Please try the following: Click the Refresh button, or try again later. Open the home page, and then look for links to the information you want. If you believe you should be able to view this directory or page, please contact the Web site administrator by using the e-mail address or phone number listed on the home page. HTTP Error 500 IISPassword for Internet Information Services i have ran the htaccess.php file successfully and have basic htaccess enabled in the google control panel. Does anyone have any pointers as to what it might be?i've been trying everything i can think of for the best part of a week. I would be very gratefull for any help! Your includes/configure.php file is not set up right. Edited September 29, 2009 by speed777 Quote Link to comment Share on other sites More sharing options...
speed777 Posted September 29, 2009 Share Posted September 29, 2009 (edited) Hi All Sorry for asking this question but we are new to this and dont kow what to do. Is a SSL required for Google checkout. I was under the assumption that the customer was directed to google and the payment was taken via that. Then added onto your account just as it is when you do on paypal. Can somebody please explain Not sure if this question actually belongs in here but how do you change the shiipping methods/costs to royal mail or Parcel force. Thanking you all in advance for any help Yes, a SSL is required for Googlecheckout to function properly and here's why. When a live transaction is activated the googlecheckout responsehandler.php file communicates with your site and this communication is encrypted, that means it goes to a https URL. You can use a shared certificate provided free by your server if you don't want to buy one. I want to restate this a bit, when a live transaction occurs Google communicates with your site via the responsehandler.php file. This communication is encrypted, that means it goes to a https URL. You can use a shared certificate provided free by your server if you don't want to buy one. Edited September 29, 2009 by speed777 Quote Link to comment Share on other sites More sharing options...
DAKstaff Posted September 30, 2009 Share Posted September 30, 2009 (edited) Your includes/configure.php file is not set up right. first off thanks for the reply,much appreciated! interestingly i checked this file and found this: define('HTTP_SERVER', 'http://www.dakltd.co.uk'); define('HTTPS_SERVER', 'http://www.dakltd.co.uk'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'www.dakltd.co.uk'); define('HTTPS_COOKIE_DOMAIN', 'www.dakltd.co.uk'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); so i changed it to this define('HTTP_SERVER', 'http://www.dakltd.co.uk'); define('HTTPS_SERVER', 'https://www.dakltd.co.uk'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'www.dakltd.co.uk'); define('HTTPS_COOKIE_DOMAIN', 'www.dakltd.co.uk'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); and it worked,however,i had not at this point added UPS XML to my shipping,so i disabled the module,added UPS in there,and re-enabled it..and it stopped working.Same error as before.. URL you are using for merchant calculations is not valid or is not https http://www.dakltd.co.uk/catalog/googlechec...onsehandler.php -- the error we got is An HTTPS URL is required the odd thing is im sure the message used to read: URL you are using for merchant calculations is not valid or is not https https://www.dakltd.co.uk/catalog/googlecheckout/responsehandler.php -- the error we got is An HTTPS URL is required of course the url i have set in the google options is https://www.dakltd.co.uk/catalog/googlecheckout/responsehandler.php its all very bizarre. Edited September 30, 2009 by DAKstaff Quote Link to comment Share on other sites More sharing options...
danrekshan Posted October 6, 2009 Share Posted October 6, 2009 A question/puzzle about Sales tax. I've spent the entire day search for an answer and experimenting, but no luck. I'm trying to get Google Checkout to handle the sales tax calculations because I'm using it as the sole method of payment, so the shopping cart posts to GCO before the customer enters shipping address. The goal is to have sales tax for California added to the order total in GCO. I've set up tax rates/classes/zones in the admin of OSC, but that doesn't work. I've removed all tax rates/classes/zones in admin, but that doesn't work either. I look at the response message log, and there's a <tax-table-selector> in the item information that I think is preventing GCO from calculating the tax. I've tried commenting out whatever would generated that tag in the googlecart.php. How can I charge tax only to CA resident using Google Checkout as the sole method of payment? Thank you so much in advance! Quote Link to comment Share on other sites More sharing options...
hodja451 Posted October 6, 2009 Share Posted October 6, 2009 https://checkout.google.com/sell/settings?section=TaxSetup Quote My experience relates to osCommerce Online Merchant v2.2 RC2 Link to comment Share on other sites More sharing options...
pramilo Posted October 13, 2009 Share Posted October 13, 2009 (edited) Hi all I am using Google Checkout module 1.5.0 RC1 and I came across an issue (which I solved) and wanted to share with you. I came across the issue when using the new feature of producing Google Base feeds but the issue potentially affects the whole operation of the module including payments. It happens that the XML class google uses does not perform enough sanitization on the data it receives in terms of HTML entities. Named HTML entities are invalid in XML. You can only use numbered XML entities. However the Google XML class uses the PHP function "htmlentities" to sanitize the values. This is VERY INCOMPLETE and introduces even more errors. This function only sanitizes half a dozen entities and in many cases does so, by using named entities which is invalid in XML. Therefore my recommendation is that you open googlecheckout/library/google_xml_builder.php and replace all the calls to htmlentities with calls to html_convert_entities (a custom function which I paste bellow). also, in the end of the file (google_xml_builder.php), just before the last "}" add the following code: /** * Sanitizes all Text to make sure we output a valid utf8 text * This is better than htmlentities because htmlentities only encodes * a few characters whereas we need to encode ALL of them */ /* html_convert_entities($string) -- convert named HTML entities to * XML-compatible numeric entities. */ function html_convert_entities($s) { $sOut = preg_replace_callback("/&([a-zA-Z][a-zA-Z0-9]+);/", array( &$this, 'convert_entity'), htmlentities($s), -1); return utf8_encode($sOut); } /* Swap HTML named entity with its numeric equivalent. If the entity isn't * in the lookup table, this function returns a blank, which destroys the * character in the output - this is probably the desired behaviour when * producing XML. */ function convert_entity($matches) { static $table = array('quot' => '"', 'amp' => '&', 'lt' => '<', 'gt' => '>', 'OElig' => 'Œ', 'oelig' => 'œ', 'Scaron' => 'Š', 'scaron' => 'š', 'Yuml' => 'Ÿ', 'circ' => 'ˆ', 'tilde' => '˜', 'ensp' => ' ', 'emsp' => ' ', 'thinsp' => ' ', 'zwnj' => '', 'zwj' => '', 'lrm' => '', 'rlm' => '', 'ndash' => '–', 'mdash' => '—', 'lsquo' => '‘', 'rsquo' => '’', 'sbquo' => '‚', 'ldquo' => '“', 'rdquo' => '”', 'bdquo' => '„', 'dagger' => '†', 'Dagger' => '‡', 'permil' => '‰', 'lsaquo' => '‹', 'rsaquo' => '›', 'euro' => '€', 'fnof' => 'ƒ', 'Alpha' => 'Α', 'Beta' => 'Β', 'Gamma' => 'Γ', 'Delta' => 'Δ', 'Epsilon' => 'Ε', 'Zeta' => 'Ζ', 'Eta' => 'Η', 'Theta' => 'Θ', 'Iota' => 'Ι', 'Kappa' => 'Κ', 'Lambda' => 'Λ', 'Mu' => 'Μ', 'Nu' => 'Ν', 'Xi' => 'Ξ', 'Omicron' => 'Ο', 'Pi' => 'Π', 'Rho' => 'Ρ', 'Sigma' => 'Σ', 'Tau' => 'Τ', 'Upsilon' => 'Υ', 'Phi' => 'Φ', 'Chi' => 'Χ', 'Psi' => 'Ψ', 'Omega' => 'Ω', 'alpha' => 'α', 'beta' => 'β', 'gamma' => 'γ', 'delta' => 'δ', 'epsilon' => 'ε', 'zeta' => 'ζ', 'eta' => 'η', 'theta' => 'θ', 'iota' => 'ι', 'kappa' => 'κ', 'lambda' => 'λ', 'mu' => 'μ', 'nu' => 'ν', 'xi' => 'ξ', 'omicron' => 'ο', 'pi' => 'π', 'rho' => 'ρ', 'sigmaf' => 'ς', 'sigma' => 'σ', 'tau' => 'τ', 'upsilon' => 'υ', 'phi' => 'φ', 'chi' => 'χ', 'psi' => 'ψ', 'omega' => 'ω', 'thetasym' => 'ϑ', 'upsih' => 'ϒ', 'piv' => 'ϖ', 'bull' => '•', 'hellip' => '…', 'prime' => '′', 'Prime' => '″', 'oline' => '‾', 'frasl' => '⁄', 'weierp' => '℘', 'image' => 'ℑ', 'real' => 'ℜ', 'trade' => '™', 'alefsym' => 'ℵ', 'larr' => '←', 'uarr' => '↑', 'rarr' => '→', 'darr' => '↓', 'harr' => '↔', 'crarr' => '↵', 'lArr' => '⇐', 'uArr' => '⇑', 'rArr' => '⇒', 'dArr' => '⇓', 'hArr' => '⇔', 'forall' => '∀', 'part' => '∂', 'exist' => '∃', 'empty' => '∅', 'nabla' => '∇', 'isin' => '∈', 'notin' => '∉', 'ni' => '∋', 'prod' => '∏', 'sum' => '∑', 'minus' => '−', 'lowast' => '∗', 'radic' => '√', 'prop' => '∝', 'infin' => '∞', 'ang' => '∠', 'and' => '∧', 'or' => '∨', 'cap' => '∩', 'cup' => '∪', 'int' => '∫', 'there4' => '∴', 'sim' => '∼', 'cong' => '≅', 'asymp' => '≈', 'ne' => '≠', 'equiv' => '≡', 'le' => '≤', 'ge' => '≥', 'sub' => '⊂', 'sup' => '⊃', 'nsub' => '⊄', 'sube' => '⊆', 'supe' => '⊇', 'oplus' => '⊕', 'otimes' => '⊗', 'perp' => '⊥', 'sdot' => '⋅', 'lceil' => '⌈', 'rceil' => '⌉', 'lfloor' => '⌊', 'rfloor' => '⌋', 'lang' => '〈', 'rang' => '〉', 'loz' => '◊', 'spades' => '♠', 'clubs' => '♣', 'hearts' => '♥', 'diams' => '♦', 'nbsp' => ' ', 'iexcl' => '¡', 'cent' => '¢', 'pound' => '£', 'curren' => '¤', 'yen' => '¥', 'brvbar' => '¦', 'sect' => '§', 'uml' => '¨', 'copy' => '©', 'ordf' => 'ª', 'laquo' => '«', 'not' => '¬', 'shy' => '', 'reg' => '®', 'macr' => '¯', 'deg' => '°', 'plusmn' => '±', 'sup2' => '²', 'sup3' => '³', 'acute' => '´', 'micro' => 'µ', 'para' => '¶', 'middot' => '·', 'cedil' => '¸', 'sup1' => '¹', 'ordm' => 'º', 'raquo' => '»', 'frac14' => '¼', 'frac12' => '½', 'frac34' => '¾', 'iquest' => '¿', 'Agrave' => 'À', 'Aacute' => 'Á', 'Acirc' => 'Â', 'Atilde' => 'Ã', 'Auml' => 'Ä', 'Aring' => 'Å', 'AElig' => 'Æ', 'Ccedil' => 'Ç', 'Egrave' => 'È', 'Eacute' => 'É', 'Ecirc' => 'Ê', 'Euml' => 'Ë', 'Igrave' => 'Ì', 'Iacute' => 'Í', 'Icirc' => 'Î', 'Iuml' => 'Ï', 'ETH' => 'Ð', 'Ntilde' => 'Ñ', 'Ograve' => 'Ò', 'Oacute' => 'Ó', 'Ocirc' => 'Ô', 'Otilde' => 'Õ', 'Ouml' => 'Ö', 'times' => '×', 'Oslash' => 'Ø', 'Ugrave' => 'Ù', 'Uacute' => 'Ú', 'Ucirc' => 'Û', 'Uuml' => 'Ü', 'Yacute' => 'Ý', 'THORN' => 'Þ', 'szlig' => 'ß', 'agrave' => 'à', 'aacute' => 'á', 'acirc' => 'â', 'atilde' => 'ã', 'auml' => 'ä', 'aring' => 'å', 'aelig' => 'æ', 'ccedil' => 'ç', 'egrave' => 'è', 'eacute' => 'é', 'ecirc' => 'ê', 'euml' => 'ë', 'igrave' => 'ì', 'iacute' => 'í', 'icirc' => 'î', 'iuml' => 'ï', 'eth' => 'ð', 'ntilde' => 'ñ', 'ograve' => 'ò', 'oacute' => 'ó', 'ocirc' => 'ô', 'otilde' => 'õ', 'ouml' => 'ö', 'divide' => '÷', 'oslash' => 'ø', 'ugrave' => 'ù', 'uacute' => 'ú', 'ucirc' => 'û', 'uuml' => 'ü', 'yacute' => 'ý', 'thorn' => 'þ', 'yuml' => 'ÿ' ); // Entity not found? Destroy it. if (isset($table[$matches[1]])) { return $table[$matches[1]]; } else { return ''; } } I have submitted a bug entry under the google project for the osc contribution. Edited October 13, 2009 by pramilo Quote Link to comment Share on other sites More sharing options...
lone gunman Posted October 15, 2009 Share Posted October 15, 2009 i just installed google check out and now i get this error... Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/briansla/public_html/lorisleather.com/includes/classes/order.php on line 295 on checkout_shipping.php. heres the catalog/admin/order.php file <?php /* $Id: orders.php,v 1.112 2003/06/29 22:50:52 hpdl Exp $ $Id: orders.php,v 1.2.1 2007/09/27 22:50:52 Ropu - added Google Checkout (v1.4.5) $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); //* ** GOOGLE CHECKOUT **/ define('GC_STATE_NEW', 100); define('GC_STATE_PROCESSING', 101); define('GC_STATE_SHIPPED', 102); define('GC_STATE_REFUNDED', 103); define('GC_STATE_SHIPPED_REFUNDED', 104); define('GC_STATE_CANCELED', 105); function google_checkout_state_change($check_status, $status, $oID, $cust_notify, $notify_comments) { global $db,$messageStack, $orders_statuses; define('API_CALLBACK_ERROR_LOG', DIR_FS_CATALOG. "/googlecheckout/logs/response_error.log"); define('API_CALLBACK_MESSAGE_LOG', DIR_FS_CATALOG . "/googlecheckout/logs/response_message.log"); include_once(DIR_FS_CATALOG.'/includes/modules/payment/googlecheckout.php'); include_once(DIR_FS_CATALOG.'/googlecheckout/library/googlerequest.php'); $googlepayment = new googlecheckout(); $Grequest = new GoogleRequest($googlepayment->merchantid, $googlepayment->merchantkey, MODULE_PAYMENT_GOOGLECHECKOUT_MODE== 'https://sandbox.google.com/checkout/' ?"sandbox":"production", DEFAULT_CURRENCY); $Grequest->SetLogFiles(API_CALLBACK_ERROR_LOG, API_CALLBACK_MESSAGE_LOG); $google_answer = tep_db_fetch_array(tep_db_query("SELECT go.google_order_number, go.order_amount, o.customers_email_address, gc.buyer_id, o.customers_id FROM " . $googlepayment->table_order . " go inner join " . TABLE_ORDERS . " o on go.orders_id = o.orders_id inner join " . $googlepayment->table_name . " gc on gc.customers_id = o.customers_id WHERE go.orders_id = '" . (int)$oID ."' group by o.customers_id order by o.orders_id desc")); $google_order = $google_answer['google_order_number']; $amount = $google_answer['order_amount']; // If status update is from Google New -> Google Processing on the Admin UI // this invokes the processing-order and charge-order commands // 1->Google New, 2-> Google Processing if($check_status['orders_status'] == GC_STATE_NEW && $status == GC_STATE_PROCESSING && $google_order != '') { list($curl_status,) = $Grequest->SendChargeOrder($google_order, $amount); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_CHARGE_ORDER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_CHARGE_ORDER, 'success'); } list($curl_status,) = $Grequest->SendProcessOrder($google_order); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_PROCESS_ORDER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_PROCESS_ORDER, 'success'); } } // If status update is from Google Processing or Google Refunded -> Google Shipped on the Admin UI // this invokes the deliver-order and archive-order commands // 2->Google Processing or Google Refunded, 3-> Google Shipped (refunded) else if(($check_status['orders_status'] == GC_STATE_PROCESSING || $check_status['orders_status'] == GC_STATE_REFUNDED) && ($status == GC_STATE_SHIPPED || $status == GC_STATE_SHIPPED_REFUNDED ) && $google_order != '') { $carrier = $tracking_no = ""; // Add tracking Data if(isset($_POST['carrier_select']) && ($_POST['carrier_select'] != 'select') && isset($_POST['tracking_number']) && !empty($_POST['tracking_number'])) { $carrier = $_POST['carrier_select']; $tracking_no = $_POST['tracking_number']; $comments = GOOGLECHECKOUT_STATE_STRING_TRACKING ."\n" . GOOGLECHECKOUT_STATE_STRING_TRACKING_CARRIER . $_POST['carrier_select'] ."\n" . GOOGLECHECKOUT_STATE_STRING_TRACKING_NUMBER . $_POST['tracking_number'] . ""; tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input(($check_status['orders_status']==GC_STATE_REFUNDED ?GC_STATE_SHIPPED_REFUNDED:GC_STATE_SHIPPED)) . "', now(), '" . tep_db_input($cust_notify) . "', '" . tep_db_input($comments) . "')"); } list($curl_status,) = $Grequest->SendDeliverOrder($google_order, $carrier, $tracking_no, ($cust_notify==1)?"true":"false"); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_DELIVER_ORDER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_DELIVER_ORDER, 'success'); } list($curl_status,) = $Grequest->SendArchiveOrder($google_order); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_ARCHIVE_ORDER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_ARCHIVE_ORDER, 'success'); } } // If status update is to Google Canceled on the Admin UI // this invokes the cancel-order and archive-order commands else if($check_status['orders_status'] != GC_STATE_CANCELED && $status == GC_STATE_CANCELED && $google_order != '') { if($check_status['orders_status'] != GC_STATE_NEW){ list($curl_status,) = $Grequest->SendRefundOrder($google_order, 0, GOOGLECHECKOUT_STATE_STRING_ORDER_CANCELED ); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_REFUND_ORDER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_REFUND_ORDER, 'success'); } } else { // Tell google witch is the OSC's internal order Number list($curl_status,) = $Grequest->SendMerchantOrderNumber($google_order, $oID); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_MERCHANT_ORDER_NUMBER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_MERCHANT_ORDER_NUMBER, 'success'); } } // Is the order is not archive, I do it if($check_status['orders_status'] != GC_STATE_SHIPPED && $check_status['orders_status'] != GC_STATE_SHIPPED_REFUNDED){ list($curl_status,) = $Grequest->SendArchiveOrder($google_order); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_ARCHIVE_ORDER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_ARCHIVE_ORDER, 'success'); } } // Cancel the order list($curl_status,) = $Grequest->SendCancelOrder($google_order, GOOGLECHECKOUT_STATE_STRING_ORDER_CANCELED, $notify_comments); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_CANCEL_ORDER, 'error'); } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_CANCEL_ORDER, 'success'); } } else if($google_order != '' && $check_status['orders_status'] != $status){ $statuses = array(); foreach($orders_statuses as $status_array){ $statuses[$status_array['id']] = $status_array['text']; } $messageStack->add_session( sprintf(GOOGLECHECKOUT_ERR_INVALID_STATE_TRANSITION, $statuses[$check_status['orders_status']], $statuses[$status], $statuses[$check_status['orders_status']]), 'error'); } // Send Buyer's message if($cust_notify==1 && isset($notify_comments) && !empty($notify_comments)) { $cust_notify_ok = '0'; if(!((strlen(htmlentities(strip_tags($notify_comments))) > GOOGLE_MESSAGE_LENGTH) && MODULE_PAYMENT_GOOGLECHECKOUT_USE_CART_MESSAGING=='True')){ list($curl_status,) = $Grequest->sendBuyerMessage($google_order, $notify_comments, "true"); if($curl_status != 200) { $messageStack->add_session(GOOGLECHECKOUT_ERR_SEND_MESSAGE_ORDER, 'error'); $cust_notify_ok = '0'; } else { $messageStack->add_session(GOOGLECHECKOUT_SUCCESS_SEND_MESSAGE_ORDER, 'success'); $cust_notify_ok = '1'; } if(strlen(htmlentities(strip_tags($notify_comments))) > GOOGLE_MESSAGE_LENGTH) { $messageStack->add_session( sprintf(GOOGLECHECKOUT_WARNING_CHUNK_MESSAGE, GOOGLE_MESSAGE_LENGTH), 'warning'); } } // Cust notified return $cust_notify_ok; } // Cust notified return '0'; } // ** END GOOGLE CHECKOUT ** require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $orders_statuses = array(); $orders_status_array = array(); $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']); $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name']; } $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'update_order': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $status = tep_db_prepare_input($HTTP_POST_VARS['status']); $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); $order_updated = false; $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $check_status = tep_db_fetch_array($check_status_query); if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); // ** GOOGLE CHECKOUT ** chdir("./.."); require_once(DIR_WS_LANGUAGES . $language . '/modules/payment/googlecheckout.php'); $payment_value= MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_TITLE; $num_rows = tep_db_num_rows(tep_db_query("select google_order_number from google_orders where orders_id= ". (int)$oID)); if($num_rows != 0) { $customer_notified = google_checkout_state_change($check_status, $status, $oID, (@$_POST['notify']=='on'?1:0), (@$_POST['notify_comments']=='on'?$comments:'')); } $customer_notified = isset($customer_notified)?$customer_notified:'0'; // ** END GOOGLE CHECKOUT ** if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) { $notify_comments = ''; if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on') && tep_not_null($comments)) { $notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $comments . "\n\n"; } // ** GOOGLE CHECKOUT ** $force_email = false; if($num_rows != 0 && (strlen(htmlentities(strip_tags($notify_comments))) > GOOGLE_MESSAGE_LENGTH && MODULE_PAYMENT_GOOGLECHECKOUT_USE_CART_MESSAGING == 'True')) { $force_email = true; $messageStack->add_session(GOOGLECHECKOUT_WARNING_SYSTEM_EMAIL_SENT, 'warning'); } if($num_rows == 0 || $force_email) { //send emails, not a google order or configured to use both messaging systems $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; //send extra emails } } tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')"); $order_updated = true; } if ($order_updated == true) { $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } else { $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning'); } tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit')); break; case 'deleteconfirm': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); tep_remove_order($oID, $HTTP_POST_VARS['restock']); tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')))); break; } } if (($action == 'edit') && isset($HTTP_GET_VARS['oID'])) { $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $order_exists = true; if (!tep_db_num_rows($orders_query)) { $order_exists = false; $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error'); } } include(DIR_WS_CLASSES . 'order.php'); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (($action == 'edit') && ($order_exists == true)) { $order = new order($oID); ?> <tr> <td width="100%"><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_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td class="pageHeading" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><?php echo tep_draw_separator(); ?></td> </tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" valign="top"><b><?php echo ENTRY_CUSTOMER; ?></b></td> <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_TELEPHONE_NUMBER; ?></b></td> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></td> <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" valign="top"><b><?php echo ENTRY_SHIPPING_ADDRESS; ?></b></td> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" valign="top"><b><?php echo ENTRY_BILLING_ADDRESS; ?></b></td> <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, '', '<br>'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> <?php if (tep_not_null($order->info['cc_type']) || tep_not_null($order->info['cc_owner']) || tep_not_null($order->info['cc_number'])) { ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_TYPE; ?></td> <td class="main"><?php echo $order->info['cc_type']; ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_OWNER; ?></td> <td class="main"><?php echo $order->info['cc_owner']; ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td> <td class="main"><?php echo $order->info['cc_number']; ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_EXPIRES; ?></td> <td class="main"><?php echo $order->info['cc_expires']; ?></td> </tr> <?php } ?> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> </tr> <?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) { for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n"; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2"> <?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><table border="1" cellspacing="0" cellpadding="5"> <tr> <td class="smallText" align="center"><b><?php echo TABLE_HEADING_DATE_ADDED; ?></b></td> <td class="smallText" align="center"><b><?php echo TABLE_HEADING_CUSTOMER_NOTIFIED; ?></b></td> <td class="smallText" align="center"><b><?php echo TABLE_HEADING_STATUS; ?></b></td> <td class="smallText" align="center"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> <?php $orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added"); if (tep_db_num_rows($orders_history_query)) { while ($orders_history = tep_db_fetch_array($orders_history_query)) { echo ' <tr>' . "\n" . ' <td class="smallText" align="center">' . tep_datetime_short($orders_history['date_added']) . '</td>' . "\n" . ' <td class="smallText" align="center">'; if ($orders_history['customer_notified'] == '1') { echo tep_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n"; } else { echo tep_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n"; } echo ' <td class="smallText">' . $orders_status_array[$orders_history['orders_status_id']] . '</td>' . "\n" . ' <td class="smallText">' . nl2br(tep_db_output($orders_history['comments'])) . ' </td>' . "\n" . ' </tr>' . "\n"; } } else { echo ' <tr>' . "\n" . ' <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> <tr> <td class="main"><br><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr><?php echo tep_draw_form('status', FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=update_order'); ?> <td class="main"><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_STATUS; ?></b> <?php echo tep_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']); ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_NOTIFY_CUSTOMER; ?></b> <?php echo tep_draw_checkbox_field('notify', '', true); ?></td> <td class="main"><b><?php echo ENTRY_NOTIFY_COMMENTS; ?></b> <?php echo tep_draw_checkbox_field('notify_comments', '', true); ?></td> </tr> </table></td> <td valign="top"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></td> <!-- googlecheckout Tracking Number --> <?php // orders_status == STATE_PROCESSING -> Processing before delivery if(strpos($order->info['payment_method'], 'Google')!= -1 && $order->info['orders_status'] == GC_STATE_PROCESSING){ echo '<td><table border="0" cellpadding="3" cellspacing="0" width="100%"> <tbody> <tr> <td style="border-top: 2px solid rgb(255, 255, 255); border-right: 2px solid rgb(255, 255, 255);" nowrap="nowrap" colspan="2"> <b>Shipping Information</b> </td> </tr> <tr> <td nowrap="nowrap" valign="middle" width="1%"> <font size="2"> <b>Tracking:</b> </font> </td> <td style="border-right: 2px solid rgb(255, 255, 255); border-bottom: 2px solid rgb(255, 255, 255);" nowrap="nowrap"> <input name="tracking_number" style="color: rgb(0, 0, 0);" id="trackingBox" size="20" type="text"> </td> </tr> <tr> <td nowrap="nowrap" valign="middle" width="1%"> <font size="2"> <b>Carrier:</b> </font> </td> <td style="border-right: 2px solid rgb(255, 255, 255);" nowrap="nowrap"> <select name="carrier_select" style="color: rgb(0, 0, 0);" id="carrierSelect"> <option value="select" selected="selected"> Select ... </option> <option value="USPS"> USPS </option> <option value="DHL"> DHL </option> <option value="UPS"> UPS </option> <option value="Other"> Other </option> <option value="FedEx"> FedEx </option> </select> </td> </tr> </tbody> </table></td>'; } ?> <!-- end googlecheckout Tracking Number --> </tr> </table></td> </form></tr> <tr> <td colspan="2" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> </tr> <?php } else { ?> <tr> <td width="100%"><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_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('orders', FILENAME_ORDERS, '', 'get'); ?> <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('oID', '', 'size="12"') . tep_draw_hidden_field('action', 'edit'); ?></td> </form></tr> <tr><?php echo tep_draw_form('status', FILENAME_ORDERS, '', 'get'); ?> <td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onChange="this.form.submit();"'); ?></td> </form></tr> </table></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php if (isset($HTTP_GET_VARS['cID'])) { $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; } elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { $status = tep_db_prepare_input($HTTP_GET_VARS['status']); $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } $orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows); $orders_query = tep_db_query($orders_query_raw); while ($orders = tep_db_fetch_array($orders_query)) { if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID']) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']))) && !isset($oInfo)) { $oInfo = new objectInfo($orders); } if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td> <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td> <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td> <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td> <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td> <td class="smallText" align="right"><?php echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?></td> </tr> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>'); $contents = array('form' => tep_draw_form('orders', FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br><br><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'); $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($oInfo) && is_object($oInfo)) { $heading[] = array('text' => '<b>[' . $oInfo->orders_id . '] ' . tep_datetime_short($oInfo->date_purchased) . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased)); if (tep_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . tep_date_short($oInfo->last_modified)); $contents[] = array('text' => '<br>' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> <?php } ?> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
cmjennings21 Posted October 22, 2009 Share Posted October 22, 2009 I've just installed the Google checkout. When I goto shopping_cart.php I get the error cannot redeclare class ot_subtotal{include modules order total/ot_subtotal.php line 13. I can't find where this is declared initally, does anyone have any clues how to fix it? Quote Link to comment Share on other sites More sharing options...
cmjennings21 Posted October 22, 2009 Share Posted October 22, 2009 I've just installed the Google checkout. When I goto shopping_cart.php I get the error cannot redeclare class ot_subtotal{include modules order total/ot_subtotal.php line 13. I can't find where this is declared initally, does anyone have any clues how to fix it? Found the problem and it was caused by the shipping Estimator contribution I have istalled. this is what I did to resolve what i recommend is to patch the order_total.php class, and change while (list(, $value) = each($this->modules)) { include(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value); include(DIR_WS_MODULES . 'order_total/' . $value); $class = substr($value, 0, strrpos($value, '.')); $GLOBALS[$class] = new $class; } to while (list(, $value) = each($this->modules)) { include_once(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value); include_once(DIR_WS_MODULES . 'order_total/' . $value); $class = substr($value, 0, strrpos($value, '.')); $GLOBALS[$class] = new $class; } this should avoid the error... Thanks to Ropu Quote Link to comment Share on other sites More sharing options...
natashome Posted October 26, 2009 Share Posted October 26, 2009 Hi I have installed the latest official GC from their website and i have 4 problems/questions: 1. I added the account in the admin area but on the shopping cart when i click the button nothing happens although the button is active (blue) 2. I would like to have the GC in the Checkout Payment page rather than the shopping cart page 3. Is this working with Amazon payments as well? 4. Is this working with UPS XML as well? Thank you Quote Link to comment Share on other sites More sharing options...
MrE03 Posted October 27, 2009 Share Posted October 27, 2009 i installed everything fine, however when it shows the checkout, the shipping is not working with the shipping calculations based on my ups xml or other shipping modules i have integrated with it. I had created the shipping calculations with the generator and replaced the coding in there with the generated one and still the problem exists. Quote Link to comment Share on other sites More sharing options...
MrE03 Posted October 27, 2009 Share Posted October 27, 2009 so it appears i have gotten the shipping quotes to show up, however they are incorrect. for example, on the oscommerce site, ups ground will say $13.97, but on google checkout shipping it will say $6.89 Quote Link to comment Share on other sites More sharing options...
web-project Posted November 4, 2009 Share Posted November 4, 2009 does anyone know when the google checkout module will start support: gift-message and buyer messages? <buyer-messages> <gift-message to="Road Runner" from="Wile E. Coyote" max-chars="200"> Enjoy these Acme corporation gifts. Sincerely yours, W.E.C. </gift-message> <delivery-instructions max-chars="100"/> </buyer-messages> more details about at URL: http://code.google.com/apis/checkout/developer-old/Google_Checkout_Beta_Advanced_Buyer_Messaging.html Quote Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
designgroop Posted November 12, 2009 Share Posted November 12, 2009 (edited) OSCommerce / Google Checkout Account Mismatch I would love some help clarifying Google Checkout usage for existing customers. We want to offer GC but if a user uses a company or relative's Google Checkout account for purchase, it does not record this under their existing account. Instead, it creates a new account. I tried this first with 1.5, and it showed no new order to the logged in customer. I took it back to 1.4.5, installed that, and now it logs the customer into a newly created account under the email they used to purchase through GC. I thought that this module should be able to record the order under the logged in customer's details? Am I wrong? I'm sure I've seen this in the 1.4.0 changelog. Please can I have some advice on this, it's imperative that this should work this way (like Paypal). *Please Help* :blink: In response to natashome: 2. I would like to have the GC in the Checkout Payment page rather than the shopping cart page You can do this by including the same Google code from the login or shopping cart page, but it would need to be below the form that contains the other payment modules and the 'continue' button. R. Edited November 12, 2009 by bluewebco Quote Link to comment Share on other sites More sharing options...
Kratos93 Posted November 19, 2009 Share Posted November 19, 2009 i installed everything fine, however when it shows the checkout, the shipping is not working with the shipping calculations based on my ups xml or other shipping modules i have integrated with it. I had created the shipping calculations with the generator and replaced the coding in there with the generated one and still the problem exists. Sorry, I can't help you. I went to download GC and followed instructions for installations from here: http://code.google.com/p/google-checkout-oscommerce/wiki/Installation_1_5_0#Modified_osCommerce Using A, I managed to delete all other modules. But following B caused no problems except that I cannot see the GC added to the available modules? Any tips? Quote Link to comment Share on other sites More sharing options...
MrE03 Posted November 19, 2009 Share Posted November 19, 2009 actuall when i downloaded from the code.google link i managed to get it working properly except for usps shipping calculation to show up. All the shipping methods (fedex, ups) show but usps. I cant seem to figure out why the usps is not showing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.