Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Offical Google Checkout module for osCommerce Support Thread


Silverado05

Recommended Posts

I've found similar errors in the forums, but not specifically this one. Any help would be appreciated.

 

I think I may need to upgrade to a dedicated server, or it's this: catalog//includes

 

I'm using osCommerce Online Merchant v2.2 RC2a

 

I have a shared linux server/host plan at Godaddy. I had Oscommerce up and running with Paypal payments only. No Problems. Then, upon installing Amazon Payments into Oscommerce, I was getting an error URL file-access is disabled in the server configuration. Uninstalled Amazon, all good. I then tried to install Google payments instead, same error. I placed a pnp5.ini file with allow_url_fopen = On and allow_url_include = On, and It now generates an error failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in, instead of the other error.

 

So while the site and Paypal work fine, both an Amazon install and a google install cAUSE THE SAME ERror.

 

The same error appears at the bottom of an otherwise fine Login page. And as a replacement for the shopping_cart.php

 

PHP5.ini has

allow_url_fopen = On

allow_url_include = On

 

and is only in the root

 

The full error contains a double / catalog//includes

 

error replacement for the shopping_cart.php :

 

Warning: require_once(http://www.me.com/catalog//includes/languages/english/modules/payment/googlecheckout.php) [function.require-once]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/content/h/o/d/hodja451/html/catalog/includes/modules/payment/googlecheckout.php on line 50

 

Fatal error: require_once() [function.require]: Failed opening required 'http://www.me.com/catalog//includes/languages/english/modules/payment/googlecheckout.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/h/o/d/hodja451/html/catalog/includes/modules/payment/googlecheckout.php on line 50

 

At bottom of login page, the error is gone. I don't know, how, but I was playing with permissions.

 

I got the Google module from google's own google checkout page.

 

That's everything I think is pertinent.

 

Thanks,

Walter

Edited by hodja451

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for your time, h2oHOH.

 

While I uploaded /catalog/googlecheckout/tools, it seemed to me that the root/tools directory was for the automatic install. As I was doing an install to a heavily formatted site, I left the tools folder local. Was the root/tools folder required to be uploaded before hitting the install button on the Admin console.

 

Re:not sure about Amazon?

 

I only mentioned it in case it rings a bell.

 

I am going to double check the code, and more specifically, files. There were 2 files I uploaded because it seemed right, but they were not in the instructions. One was the admin console file, I will check what the other one was while checking the install.

 

Would you say the double / catalog//includes is not unusual in an error message, and nothing to worry about?

 

Thanks,

Walter

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

Was the root/tools folder required

Yes think so, not sure about how using the automated deployment app. I used Install B, but readMe says in: tools/golden/oscommerce-2.2rc2a/readMe

DO NOT EDIT ANY FILES IN THIS DIRECTORY.

This directory contains a partial copy of:

 

osCommerce Online Merchant v2.2 Release Candidate 2a

 

Specifically, this directory contains a copy of any file from the osCommerce

installation that is directly modified in the Google Checkout Plugin. We

keep a clean copy around so we can use diff/merge/patch tools to automate

the installation process.

not unusual in an error message

worryNot...., error: require_once() - there is a required directory that's missing: most likely DIR_FS_CATALOG so check your install

Link to comment
Share on other sites

Rechecking....The instructions said to add at an occupied line, so I flipped a coin, (is that a problem?)

 

From

google-checkout-oscommerce

 

Installation_1_5_0

 

Modified osCommerce

 

3. Manually edit the following files from your system as instructed below:

 

2b. <osc-directory>/catalog/admin/modules.php (LINE 15)

 

Add:

 

require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules1.php');

 

 

But line 15 is occupied:

 

13 require('includes/application_top.php');

14

15 $set = (isset($HTTP_GET_VARS['set']) ? $HTTP_GET_VARS['set'] : '');

16

17 if (tep_not_null($set)) {

 

 

Does it matter if I place it before or after line 15? I have it at line 14 (above).

 

Similarly, and I'm pretty sure this one doesn't matter, on Orders.php they also say to add at line 15, which is already occupied.

 

13 require('includes/application_top.php');

14

15 require(DIR_WS_CLASSES . 'currencies.php');

16 $currencies = new currencies();

 

So I went with:

 

13 require('includes/application_top.php');

14

15 require(DIR_WS_CLASSES . 'currencies.php');

16 comment

17 require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/orders1.php');

18 comment

19 $currencies = new currencies();

 

Is this okay?

 

Walter

 

PS: from GoDaddy

 

you are currently able to set allow_url_fopen = On and allow_url_include = On in your php5.ini file and you do not require a dedicated server for what you are doing.

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

error: require_once() - there is a required directory that's missing: most likely DIR_FS_CATALOG so check your install

 

Too weird. I double checked catalog/configure.php and found my local copy, which contains:

 

define('DIR_FS_CATALOG', 'C:/xampp/htdocs/catalog/');

 

I thought this was my entire problem and restored the online version, which contains:

 

define('DIR_FS_CATALOG', 'http://www.me.com/catalog/');

 

No difference. (How can that be? I would think everything would have been fubar.)

 

catalog/includes/configure.php was good.

 

Does "there is a required directory that's missing: most likely DIR_FS_CATALOG so check your install" simply mean make sure you have a catalog/configure.php and make sure it includes define('DIR_FS_CATALOG', 'http://www.me.com/catalog/'); and make sure http://www.me.com/catalog/ exists? Or is there another thing to check?

 

 

Thank You,

Thank You,

Thank You,

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

Rechecking....

Yours look ok, compare with below

/catalog/admin/modules.php (LINE 15)

  require('includes/application_top.php');

 // *** BEGIN GOOGLE CHECKOUT ***
require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules1.php');
// *** END GOOGLE CHECKOUT ***

$set = (isset($HTTP_GET_VARS['set']) ? $HTTP_GET_VARS['set'] : '');

 

/catalog/admin/orders.php (LINE 15)

   require('includes/application_top.php');

 // *** BEGIN GOOGLE CHECKOUT ***
require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/orders1.php');
// *** END GOOGLE CHECKOUT ***

 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

 

If you need to compare the code you can use the files in the google-checkout-oscommerce-v1.5 download, A and B installs are very similar

 

Can you post your catalog and admin configure.php just the:

 

define('DIR_FS_CATALOG', ' path ');

Link to comment
Share on other sites

is there another thing to check?

Backup your two configure.php files.

 

then try this in both configure.php files for: DIR_FS_CATALOG

define('DIR_FS_CATALOG', '/home/content/h/o/d/hodja451/html/catalog/');

Link to comment
Share on other sites

/catalog/configure.php

 

 

define('DIR_FS_CATALOG', 'http://www.me.com/catalog/');

 

 

But...

/catalog/admin/configure.php

 

Does not exist. It's not in the original oscommerce-2.2rc2a zip either.

 

Will try above now.

 

thanks

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

catalog/includes/configure.php

catalog/admin/includes/configure.php

 

Ha! You thought I was smart, jokes on you!!

 

 

catalog/includes/configure.php

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

// define('DIR_FS_CATALOG', 'http://www.me.com/catalog/');

define('DIR_FS_CATALOG', '/home/content/h/o/d/hodja451/html/catalog/');

 

 

catalog/admin/includes/configure.php

 

(edited out local reference)

 

Online was already set to

 

define('DIR_FS_CATALOG', '/home/content/h/o/d/hodja451/html/catalog/');

Edited by hodja451

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

I just purposly broke the store again, then fixed it again to be certain.

 

It was in fact:

 

then try this in both configure.php files for: DIR_FS_CATALOG

 

define('DIR_FS_CATALOG', '/home/content/h/o/d/hodja451/html/catalog/');

 

 

It was switching catalog/includes/configure.php that did the trick.

 

This would explain why Amazon didn't work either.

 

So 100 thanks, and thanks in advance for fixing my Amazon install, which is next on the list.

 

Walter

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

Damn, I'm back.

 

So, I'm setting up the shipping. Pre-Google: I have a fully functional site. I only ship USPS, I have the USPS module installed, I have a USPS account. When you checkout, you can choose First Class or Priority and it tells you an accurate price for each. It is awesome, adds the weights and quotes accurately every time.

 

I add Google, and decide to go with Merchant Calculated Shipping because this merchant seems to calculate his own shipping well, thank you anyway Google.

 

In the Google Checkout Module Dashboard, logic dictates I uncheck Enable Carrier Calculated Shipping and in Carrier Calculated Shipping Configuration, I set the defaults to 0 to disable the method entirely. Now I see no checkbox for Enable Merchant Calculated Shipping, so I guess default is enabled if Carrier Calculated Shipping is off.

 

I place an order and try to pay the sandbox and the Shipping & Handling dropdown has the options with $0 while it thinks, then the options disappear and in the ship to box, above my google-filled address, it says You do not currently have any valid shipping methods. I saw on another thread someone said, "enable one", but I see no checkbox for Enable Merchant Calculated Shipping. I found it interesting that it has the 2 proper methods for the carrier (as I deleted the rest from the file as advised in instructions) in the drop down with $0, yet it doesn't revert to the default, which is filled in on the Google Checkout Module Dashboard.

 

I would like advise on where to look to fix that. The rest is FYI, what else works or doesn't.

 

I re-check Enable Carrier Calculated Shipping and in Carrier Calculated Shipping Configuration, I set the defaults to 100. I pay, my method is valid, but it reverts to defaults as though it can't contact the server. Repeatedly over the last few hours. Also, in Carrier Calculated Shipping Configuration, there is no First Class choice, my primary method.

 

Any help is greatly appreciated,

Walter

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

I see now Carrier Calculated Shipping does not include First-Class USPS. I traced the missing code down in carrier_calculated_methods.php, there is a comment line in the array where first class should be. I was going to add it to the array, but the documentation lists the valid methods and it is missing there as well, with a warning not to create others. I could find no mention, even in these forums, of anyone even mentioning that you can't use USPS First class with Carrier Calculated Shipping.

 

Seems odd.

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

I was going to add it to the array

From what I understand first class mail is for personal correspondence, bills, reports and not products or merchandise. This is most likely why it's left out of GC. I've yet to explore all the differnt shipping modules/merchant calculated/carrier calculated methods...if you find a solution post your results, you also may find additional info at shipping modules.... or maybe someone else will know?

Link to comment
Share on other sites

First Class is definitely for products or merchandise.

 

From USPS:

 

Postcards, letters, large envelopes (flats) and small packages can be sent using First-Class Mail®. This service, along with Priority Mail and Express Mail, is ideal for sending personal correspondence, handwritten or typewritten letters, and bills or statements of account. It may also be used for advertisements and lightweight merchandise.

 

Also, First Class appears as an option in the Merchant Calculated Shipping Configuration, although I can not get Merchant Calculated Shipping to work at all.

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

I took the First Class line from merchant_calculated_methods.php and inserted into carrier_calculated_methods.php, and as promised, the sandbox rejected the entire thing because it has an invalid shipping method.

My experience relates to osCommerce Online Merchant v2.2 RC2

Link to comment
Share on other sites

Good morning,

 

I am having an odd problem concerning Google and the shipping methods.

 

My store is based in the UK and set up as such.

 

All shipping methods are calculated correctly, for domestic and international orders, for most of the time.

 

If someone logs into GoogleCheckout with a domestic shipping address, the shipping is calculated correctly.

 

If someone logs into GoogleCheckout with an international shipping address, the shipping is calculated correctly.

 

However, if someone has both a domestic and international shipping addresses stored in their GoogleCheckout account, or add another type of address during the checkout process, I start getting problems. The shipping methods will correctly switch over, but all be calculated at £1.

 

I then get the following error showing up in the GoogleCheckout Integration Console.

 

 

<br />
<b>Fatal error</b>:  Cannot redeclare class rmfirst in <b>/home/electro9/public_html/store/includes/modules/shipping/rmfirst.php</b> on line <b>33</b><br />

 

I do not believe it is anything specific to do rmfirst shipping module, as it will do it on other ones depending on the order in which they are defined in the shipping-methods file.

 

Here is my shipping_methods.php file for reference.

 

<?php
/**
 * 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 upto GBP39. 1-3 days)',
                                          ),
                                   'international_types' =>
                                     array(
                                          ),
                                       ),
                       'rmsecond' => array(
                                   'domestic_types' =>
                                     array(
                                         'rmsecond' => '(No Tracking. Use at own risk. 3-5 days)',
                                          ),
                                   'international_types' =>
                                     array(
                                          ),
                                       ),
                       'rmsecondrec' => array(
                                   'domestic_types' =>
                                     array(
                                         'rmsecondrec' => '(Insured upto GBP39. 3-5 days)',
                                          ),
                                   'international_types' =>
                                     array(
                                          ),
                                       ),
                       'rmspecial' => array(
                                   'domestic_types' =>
                                     array(
                                         'rmspecial' => '(Insured upto GBP500. Nextday)',
                                          ),
                                   'international_types' =>
                                     array(
                                          ),
                                       ),
                       'rmstandardparcel' => array(
                                   'domestic_types' =>
                                     array(
                                         'rmstandardparcel' => '(Insured upto GBP39. 3-5 days)',
                                          ),
                                   'international_types' =>
                                     array(
                                          ),
                                       ),
                     'citylink' => array(
                                   'domestic_types' =>
                                     array(
                                         'citylink' => '(Insured upto GBP50. 2-4 days)',
                                          ),
                                   'international_types' =>
                                     array(
                                          ),
                                       ),
                     'parcelforce48' => array(
                                   'domestic_types' =>
                                     array(
                                         'parcelforce' => '(Insured upto GBP150. 2-3 days)',
                                          ),
                                   'international_types' =>
                                     array(
                                          ),
                                       ),
                        'rmairmail' => array(
                                   'domestic_types' =>
                                     array(
                                          ),
                                   'international_types' =>
                                     array(
                                         'rmairmail' => 'Airmail Internation'
                                          ),
                                       ),
                                 );
$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 Parcel',
                                        'parcelforce48' => 'Parcel Force 48',
                                        'citylink' => 'CityLink/Courrier',
                                        'rmairmail' => 'Airmail Internation',
                                       );

 

Many thanks in advance for your help.

Link to comment
Share on other sites

I want to limit shipping to the continental US. Can anyone with coding knowledge guide me on where to put CONTINENTAL_48? From my reading it looks like it is supposed to be added in the code below from googleshipping.php.

 

 

   * GC tag: {@link [url="http://code.google.com/apis/checkout/developer/index.html#tag_us-country-area"]http://code.google.com/apis/checkout/devel...us-country-area[/url] <us-country-area>}
    *
    * @param string $country_area the area to allow, one of "CONTINENTAL",
    * "FULL_50_STATES" or "ALL"
    *
    */
   function SetAllowedCountryArea($country_area) {
     switch ($country_area) {
       case "CONTINENTAL_48":
       case "FULL_50_STATES":
       case "ALL":
         $this->allowed_country_area = $country_area;
         $this->allowed_restrictions = true;
       break;
       default:
         $this->allowed_country_area = "";
       break;

Link to comment
Share on other sites

<b>Fatal error</b>: Cannot redeclare class rmfirst in <b>/home/electro9/public_html/store/includes/modules/shipping/rmfirst.php</b>

 

What the error is telling you is that you have 2 identical classes in home/electro9/public_html/store/includes/modules/shipping/rmfirst.php. You can only have one. Look in the rmfirst file and delete one of them. If its not there, you have to find it.

Edited by speed777
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...