Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS with Dimensions Support v 6.54.1 Install Issue


rsthornton

Recommended Posts

I've installed  USPS with Dimensions Support v 6.54.1 and I'm receiving the following error in the Admin section when I go to the "Install Module" page.  The file is there, any ideas?

 

Warning: require_once(DIR_WS_CLASSESxml.php): failed to open stream: No such file or directory in /catalog/includes/modules/shipping/usps.php on line 11

Fatal error: require_once(): Failed opening required 'DIR_WS_CLASSESxml.php' (include_path='.:/usr/local/php5_6/lib/php') in /catalog/includes/modules/shipping/usps.php on line 11

Link to comment
Share on other sites

Thank you, that doesn't seem to be working, I also added the following (in blue) to the Admin/module.php

 

if (tep_not_null($action)) {
    switch ($action) {
      case 'save':
        foreach ($_POST['configuration'] as $key => $value) {
          tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
        }
          if( is_array( $value ) ){
        $value = implode( ", ", $value);
            $value = preg_replace ("/, --none--/", "", $value);
          }

        tep_redirect(tep_href_link('modules.php', 'set=' . $set . '&module=' . $_GET['module']));
        break;
      case 'install':
      case 'remove':

 

Link to comment
Share on other sites

42 minutes ago, rsthornton said:

that doesn't seem to be working

Please include more details.  It's not working in that

1.  It is giving the same error?

2.  A different error? 

3.  No error, but not doing something it should be doing?  If so, what is it not doing but should be?

The change I suggested should at least get rid of that exact error.  It may reveal a new problem, but we'll have trouble helping you without more details of what that problem is. 

Always back up before making changes.

Link to comment
Share on other sites

1 hour ago, rsthornton said:

if (tep_not_null($action)) {
    switch ($action) {
      case 'save':
        foreach ($_POST['configuration'] as $key => $value) {
          tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
        }

change:

tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");

to:

tep_db_query("update configuration set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");

M

Link to comment
Share on other sites

Sorry ecartz: I receive basically the exact same error.

Warning: require_once(/includes/classes/xml.php): failed to open stream: No such file or directory in /catalog/includes/modules/shipping/usps.php on line 11

Fatal error: require_once(): Failed opening required '/includes/classes/xml.php' (include_path='.:/usr/local/php5_6/lib/php') in /catalog/includes/modules/shipping/usps.php on line 11

 

 

Artcolnc: Thank you, but, That didn't change anything either.

Edited by rsthornton
Link to comment
Share on other sites

That may look similar, but it's telling you something different.  Try

require_once('includes/classes/xml.php');

Or maybe

require_once(DIR_FS_CATALOG . 'includes/classes/xml.php');

Also verify that there is indeed an xml.php file in includes/classes/

Always back up before making changes.

Link to comment
Share on other sites

Thank you very much, require_once('includes/classes/xml.php'); is the one that fixed that issue.

 

Now I'm receiving this error, any thoughts about why it will not acknowledge the address?

Shipping is currently not available for the selected shipping address. Please select or create a new shipping address to use with your purchase.

I have also noticed that the options I have selected are unchecked and did not save, also the size and fee fields are now empty and some say "Array" in them

Edited by rsthornton
Link to comment
Share on other sites

Shipping is currently not available for the selected shipping address. Please select or create a new shipping address to use with your purchase.: RESOLVED, had to switch "Allow Orders Not Matching Defined Shipping Zones" to "True" in Configuration - Shipping/Packaging

   

I have also noticed that the options I have selected are unchecked and did not save, also the size and fee fields are now empty and some say "Array" in them: Still Not Saving

Edited by rsthornton
Link to comment
Share on other sites

I have also noticed that the options I have selected are unchecked and did not save, also the size and fee fields are now empty and some say "Array" in them: Resolved settings not saving, had code in the Admin/module.php file in the wrong location.

 

Now Saving, but not showing up as an option in the cart. Any ideas for this issue?

Link to comment
Share on other sites

This is all I see in the Shipping Options of the cart, no shipping options.

Delivery To You

Delivery Method

This is currently the only shipping method available to use on this order.

 

In my settings I have selected the domestic services to be offered as Priority Mail  & USPS Retail Ground, neither of these show up and when I click "Continue to Checkout" it stays on the shipping page.

 

 

Link to comment
Share on other sites

There is no longer an option in admin -> Configuration -> Shipping/Packaging to input a postal code, could this be causing my issue?  If so, what happen to the field in Phoenix and how can it be placed back in the settings?

Edited by rsthornton
Link to comment
Share on other sites

If you need it,

 INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Postal Code', 'SHIPPING_ORIGIN_ZIP', 'NONE', 'Enter the Postal Code (ZIP) of the Store to be used in shipping quotes.', '7', '2', now());

But you might want to verify that the contribution uses SHIPPING_ORIGIN_ZIP first. 

Always back up before making changes.

Link to comment
Share on other sites

Replace all the occurrences of TABLE_WHATEVER with whatever.  E.g.

" . TABLE_CONFIGURATION . " 

would become

configuration

Note that the quotation marks and periods have disappeared in that section. 

This needs done for anything that says TABLE_ in any of the three files (includes/modules/shipping/uspsds.php, includes/classes/packing.php, and includes/classes/xml.php).  It's currently not needed in the admin files, although it would be harmless to do it there as well.  That's part of why I'm not trying to separate the uspsds.php file into things that are called by admin (e.g. the install function) and things that are called in catalog (e.g. the quote function).  Go ahead and change all of them. 

As a general rule, TABLE_WHATEVER gets replaced with whatever (lower case, no TABLE_ at the beginning).  There may be an exception to that, so watch out for lines that say something like

define('TABLE_WHATEVER', 'not_quite_whatever');

and replace occurrences of " . TABLE_WHATEVER . " with not_quite_whatever instead.  The standard osCommerce ones are at https://github.com/gburton/CE-Phoenix/blob/41601da342152b010247083c1a70101aa2468d84/includes/database_tables.php

Also check if any of the DIR_WS entries that have been removed appear in this code.  See https://github.com/gburton/CE-Phoenix/commit/65a7fdc942d043dc442f800c54885b9fb8c54d91#diff-cbf96a696abf49d99741d4219fed49a7 for the list of removed values (those with a red background). 

Have you tried uninstalling and reinstalling the module?  You'd have to reenter the configuration but that might fix certain kinds of issues. 

Inside the module, there are some commented out print_r statements.  Try uncommenting them and running a test order.  This will probably break things more, but it may give useful output.  You may want to change them to something like

print_r([ $request, $xmlResponse ]);

to add the request into the debugging output.  Note the added square brackets. 

Try to figure out what is giving the no shipping methods message and trace back to why it is giving that message. 

Edited by ecartz
Add troubleshooting option

Always back up before making changes.

Link to comment
Share on other sites

  • 5 months later...

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...