Guest Posted October 9, 2008 Posted October 9, 2008 I have been having a problem with google chekcout for several months. I havent been able to get any help on the official google checkout forum, or in the contributions section of this forum. I have now had FOUR freelancers work on tyhe problem, which has cost a fortune....and I've run out of people to ask. I've literally spent months on this problem. So....in a last ditch attempt to solve the problem I'm posting the question to the general forum in the hope that some kind sole will take pity. We have installed the google checkout module 5 or 6 times from scratch, and we are pretty sure that it is installed correctly. The ultimate problem we are having is that google checkout doesnt calculate any shipping costs. It just displays £1 (the default). When I check the integration console by logging into my merchant account, the error is b>Fatal error</b>: Cannot redeclare class zones in <b>/home/tractorm/public_html/includes/modules/shipping/rmfirst.php</b> on line <b>9</b><br /> I initially thought this was down to a problem with the shipping methods we used...so, I uninstalled every one of them, and just added the most basic zone shipping method and re run the shipping method generator. The error simply changes to reflect the zones.php shipping method and a different line number. So basically, whichever shipping method is used, it says "Cannot redeclare class SHIPPINGMETHOD" in home/tractorm/public_html/includes/modules/shipping/shippingmethodfilename.php Does anyone have any ideas what could be causing this? If someone who is experienced with OSC and knows PHP I'm sure this could be solved....but I just dont know where to look. Any help would be greatfully appreciated.
user99999999 Posted October 9, 2008 Posted October 9, 2008 OSC already has a zones class includes/modules/shipping/zones.php. So you have to remove that one or rename the one in rmfirst.php. Also check the language directory includes/languages/english/modules/shipping/ and make sure they are language def files and not the class file uploaded in there.
Guest Posted October 10, 2008 Posted October 10, 2008 OSC already has a zones class includes/modules/shipping/zones.php. So you have to remove that one or rename the one in rmfirst.php. Also check the language directory includes/languages/english/modules/shipping/ and make sure they are language def files and not the class file uploaded in there. The zones shipping module included with OSC is the one I used for testing. I totally removed all shipping modules except for zones...puerly to test if the problem would still occur. It did.....but the error message reflected zones.php rather than rmfirst.php I have 5 shipping methods enabled, and I have disabled them one by one, and each time the error changes to the name of the shipping method... be it airmail.php, zones.php rmstandard.php etc etc Its as if something is dynamically trying to declare a class twice..... I dont know php so I'm cluthching at straws. Do you have any other ideas?
user99999999 Posted October 10, 2008 Posted October 10, 2008 Open all the files in the languages directory in your editor they should all be language defines. its common to accidentally upload the class file in the language directory to cause this problem. The shipping modules all get loaded even if disabled and you cant have duplicate class name. It seems from the error that rmfirst.php still has the class name zones which will be fine but you have to delete OSC zones.php class zones { var $code, $title, $description, $enabled, $num_zones; // class constructor function zones() { $this->code = 'zones'; $this->title = MODULE_SHIPPING_ZONES_TEXT_TITLE;
Guest Posted October 10, 2008 Posted October 10, 2008 Open all the files in the languages directory in your editor they should all be language defines. its common to accidentally upload the class file in the language directory to cause this problem. The shipping modules all get loaded even if disabled and you cant have duplicate class name. It seems from the error that rmfirst.php still has the class name zones which will be fine but you have to delete OSC zones.php class zones { var $code, $title, $description, $enabled, $num_zones; // class constructor function zones() { $this->code = 'zones'; $this->title = MODULE_SHIPPING_ZONES_TEXT_TITLE; I dont think zones.php is related to the problem. I have never used zones as a shipping module....I only enabled it as a test when this problem happened. If I enabled zones.php as a shipping method the error mentiones zones.php. If I enable airmail, the error says airmail.php Which ever shipping method I enable the error just changes to reflect the name of the method.
Guest Posted October 10, 2008 Posted October 10, 2008 OK your the expert. If I was an expert I would have fixed it after 2 months of trying. I have actually uninstalled all the shipping modules. By uninstall I mean removed the class and language files. I have then added them back in one by one. As you as I add the first one the error reappears. If the first module I add is airmail, the error says that I cant redeclare airmail....or zones, or rmfisrt....whichever I reinstall. I have even uninstalled all the extra shipping modules and just left the stock osc ones....still the error appears.
Brian-Bear Posted October 10, 2008 Posted October 10, 2008 If the big G will not help you find a solution, why even pander to them, use another gateway.
user99999999 Posted October 10, 2008 Posted October 10, 2008 Check the top bugfix listed here about moving one line. http://www.oscommerce.com/community/contributions,4556
Guest Posted October 11, 2008 Posted October 11, 2008 Check the top bugfix listed here about moving one line.http://www.oscommerce.com/community/contributions,4556 Thankyou, that certainly sounds like a similiar error. I have made the change, and the error in the integration console now says the following; <br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/tractorm/public_html/googlecheckout/shipping_methods.php:63) in <b>/home/tractorm/public_html/googlecheckout/library/googleresponse.php</b> on line <b>135</b><br /> <?xml version="1.0" encoding="utf-8"?> <merchant-calculation-results xmlns="http://checkout.google.com/schema/2"> <results> <result shipping-name="Royal Mail 1st Class Standard: Delivery Weight : 0 Kg's (Ships normally within 1 to 3 days)" address-id="347482596452662"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> <result shipping-name="Royal Mail 1st Class Recorded: Delivery Weight : 0 Kg's (Insured upto &pound;32.00, ships within 1 to 3 days)" address-id="347482596452662"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> <result shipping-name="Royal Mail 2nd Class Recorded: Delivery Weight : 0 Kg's (Insured upto &pound;32.00, ships within 3 to 5 days)" address-id="347482596452662"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> <result shipping-name="Royal Mail Standard Parcels: Delivery Weight : 0 Kg's (Insured upto &pound;500.00, ships within 3 to 5 days)" address-id="347482596452662"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> <result shipping-name="Royal Mail 1st Class Standard: Delivery Weight : 0 Kg's (Ships normally within 1 to 3 days)" address-id="868031384330867"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> <result shipping-name="Royal Mail 1st Class Recorded: Delivery Weight : 0 Kg's (Insured upto &pound;32.00, ships within 1 to 3 days)" address-id="868031384330867"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> <result shipping-name="Royal Mail 2nd Class Recorded: Delivery Weight : 0 Kg's (Insured upto &pound;32.00, ships within 3 to 5 days)" address-id="868031384330867"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> <result shipping-name="Royal Mail Standard Parcels: Delivery Weight : 0 Kg's (Insured upto &pound;500.00, ships within 3 to 5 days)" address-id="868031384330867"> <shipping-rate currency="GBP">9999.09</shipping-rate> <shippable>false</shippable> </result> </results> </merchant-calculation-results> I cant make head nor tale of it!
L!mit Posted October 11, 2008 Posted October 11, 2008 Thankyou, that certainly sounds like a similiar error. I have made the change, and the error in the integration console now says the following; <br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/tractorm/public_html/googlecheckout/shipping_methods.php:63) in <b>/home/tractorm/public_html/googlecheckout/library/googleresponse.php</b> on line <b>135</b><br /> Check for white spaces in your code around those lines... occasionally they can kick out headers already sent errors.
Guest Posted October 11, 2008 Posted October 11, 2008 Check for white spaces in your code around those lines... occasionally they can kick out headers already sent errors. Thanks a lot. That certainly did the trick...now my only problem is that google checkout says "ourstore does not deliver to this address via Google Checkout
user99999999 Posted October 13, 2008 Posted October 13, 2008 I use a different google checkout so I don't know how to configure the shipping restrictions. I am in US and google would not allow international address until I modified with world-area tag. Try searching how to configure shipping-restrictions UK. $data .= ' <shipping-restrictions>' . $eol; $data .= ' <allowed-areas>' . $eol; $data .= ' <world-area/>' . $eol; $data .= ' </allowed-areas>' . $eol; $data .= ' </shipping-restrictions>' . $eol;
Recommended Posts
Archived
This topic is now archived and is closed to further replies.