Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mysterious MODULE_SHIPPING_INSTALLED


KPGroup

Recommended Posts

I have installed flat rate shipping and 2 copies of the UPSXML shipping module. One of the UPSXML modules (upsxml1.php) is for my US customers, the other one (upsxml.php) is for my Canadian customers.

 

Everything was working fine for several weeks until today. The Canadian UPSXML stopped working. Only the flat rate shipping is displayed when Canadian customers try checking out.

 

I traced the problem back to the database CONFIGURATION table, MODULE_SHIPPING_INSTALLED key. Its value only contains "flat.php;upsxml1.php". The other UPS module (upsxml.php, without a "1") is not there.

 

I added it manually and the shipping module worked perfectly fine again with MODULE_SHIPPING_INSTALLED having a value of "flat.php;upsxml1.php;upsxml.php".

 

I just rechecked now and the module is gone again. And the MODULE_SHIPPING_INSTALLED key reverted back to "flat.php;upsxml1.php".

 

I am baffled. What is going on?

 

Thank you in advance,

 

Karim.

Link to comment
Share on other sites

Couple questions:

 

1. I assume you created a separate file called upsxml1.php and installed it in the modules/shipping directory, correct? If not that is step one.

2. You will need to edit that file as well to change references of upsxml to upsxml1 in there, that way osCommerce knows there are two different ones. You will also need to change the class name so that you don't get cannot redeclare errors.

Link to comment
Share on other sites

I had done that. Both modules were working.

I don't know what happened but one of them stopped working.

 

I will completely remove them and re-install and we'll see what happens.

 

Thanks.

 

 

Couple questions:

 

1. I assume you created a separate file called upsxml1.php and installed it in the modules/shipping directory, correct? If not that is step one.

2. You will need to edit that file as well to change references of upsxml to upsxml1 in there, that way osCommerce knows there are two different ones. You will also need to change the class name so that you don't get cannot redeclare errors.

Link to comment
Share on other sites

  • 10 months later...

I saw this thread while trying to work out why my local shipping method had disappeared from my site, when international ones were all okay. I too noticed the shipping module name had disappeared from MODULE_SHIPPING_INSTALLED. Solution in my case turned out to be embarrassingly easy, once I'd inserted debug statements all over the code: I'd set the Sort Order of the local shipping module to 0 in the Modules..Shipping admin panel.

 

The code in modules.php checks each shipping module in turn and adds it to the installed array if its sort_order > 0. A sort order of 0 results in the module being added to the END of the array. It may be worth having a closer look at this issue sometime - I suspect changing sort orders of shipping modules may occasionally cause them to silently 'disappear' from your site.

 

Hope this helps!

Link to comment
Share on other sites

I saw this thread while trying to work out why my local shipping method had disappeared from my site, when international ones were all okay. I too noticed the shipping module name had disappeared from MODULE_SHIPPING_INSTALLED. Solution in my case turned out to be embarrassingly easy, once I'd inserted debug statements all over the code: I'd set the Sort Order of the local shipping module to 0 in the Modules..Shipping admin panel.

 

The code in modules.php checks each shipping module in turn and adds it to the installed array if its sort_order > 0. A sort order of 0 results in the module being added to the END of the array. It may be worth having a closer look at this issue sometime - I suspect changing sort orders of shipping modules may occasionally cause them to silently 'disappear' from your site.

 

Hope this helps!

 

If I ever meet you don't be surprised if I give you a huge manly hug and offer to buy you lots of alcohol/chocolate/steak depending upon your preference :thumbsup:

 

I've been tearing my hair out wondering why my new (additional) table-based shipping module wouldn't work! It was as simple as this. There really should be a check.....

 

Many thanks,

 

Paul

Link to comment
Share on other sites

If I ever meet you don't be surprised if I give you a huge manly hug and offer to buy you lots of alcohol/chocolate/steak depending upon your preference :thumbsup:

 

I've been tearing my hair out wondering why my new (additional) table-based shipping module wouldn't work! It was as simple as this. There really should be a check.....

 

Many thanks,

 

Paul

You left out cigarettes.

Link to comment
Share on other sites

Chocolate and alcohol sounds good. Smoke the fags yourself, the manly hug ... perhaps after the alcohol, and just before hot & spicy pizza / doner kebab. Thanks, I think I'm sorted now. Glad it helped.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...