Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

Hello. We have a store running with MVS, but we're getting this error on occassion during checkout.

 

Warning: Invalid argument supplied for foreach() in /home/objectfe/public_html/store/includes/modules/vendor_shipping.php on line 101

 

I'm told it's an "instatiating" error that occurs on some severs it occurs and on some servers it doesn't.

 

There are a few options I've dreamed up to deal with this - a message replacing the error to refresh would be the most expedient, but of it is indeed our host and server config, perhaps there is a solid shared hosting solution where someone is running MVS - and this error doesn't occur.

 

Any recommendations?

 

Thanks.

Link to comment
Share on other sites

Hello. We have a store running with MVS, but we're getting this error on occassion during checkout.

 

Warning: Invalid argument supplied for foreach() in /home/objectfe/public_html/store/includes/modules/vendor_shipping.php on line 101

 

I'm told it's an "instatiating" error that occurs on some severs it occurs and on some servers it doesn't.

 

There are a few options I've dreamed up to deal with this - a message replacing the error to refresh would be the most expedient, but of it is indeed our host and server config, perhaps there is a solid shared hosting solution where someone is running MVS - and this error doesn't occur.

 

Any recommendations?

 

Thanks.

I can't see this happening for any case except when the shopping cart is empty, and you should not be able to check out in that case. Can you give us any indication when it happens? Only with one vendor, or only with two in the order, or something else? I'd prefer to keep this from ever happening.

 

If you want recommendations, I'm running several; stores on the same hosting service that osCommerce uses (see the bottom right corner of this page.) I've never seen this error on any of my sites. Then again, my code is heavily modified, so maybe I'm just not seeing the right circumstances for this to happen.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I installed the files uploaded today.. got rind of my old error but unfortunatly gave me a new one in the usps module

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_SHIPPING_USPS_RATES_ZONE_1 in /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/store/catalog/includes/modules/vendors_shipping/usps.php on line 113

 

any ideas?

Link to comment
Share on other sites

I installed the files uploaded today.. got rind of my old error but unfortunatly gave me a new one in the usps module

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_SHIPPING_USPS_RATES_ZONE_1 in /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/store/catalog/includes/modules/vendors_shipping/usps.php on line 113

 

any ideas?

Not sure how that's possible. line 113:

	 if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_USPS_RATES_ZONE_' . $vendors_id) > 0) ) {

Unless your module installation got messed up, this can't really happen. That constant get's created during installation of the module. Can you check your database directly? This warning doesn't actually hurt anything, but it shouldn't happen. The zone should have been added during module installation.

 

Try removing it and installing again, and see what you get.

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

yea i can check the database directly what am i looking for?

Try to find this:

MODULE_SHIPPING_USPS_RATES_ZONE_1

in the "configuration_key" feild. That will tell you wether or not it was added. If it is not there, then this would point back to some problem with your server, as you were having problems with adding data before.

 

Maybe, it is time to contact your host about the MySQL server.

 

Post what you find in the database.

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

Not sure how that's possible. line 113:

	 if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_USPS_RATES_ZONE_' . $vendors_id) > 0) ) {

Unless your module installation got messed up, this can't really happen. That constant get's created during installation of the module. Can you check your database directly? This warning doesn't actually hurt anything, but it shouldn't happen. The zone should have been added during module installation.

 

Try removing it and installing again, and see what you get.

 

Craig :)

 

is there a sql that i am suppose to run with the usps package? i cant find it in the lastest package.. or is this a field thats suppose to be installed when you install os commerce?

Link to comment
Share on other sites

is there a sql that i am suppose to run with the usps package? i cant find it in the lastest package.. or is this a field thats suppose to be installed when you install os commerce?

No, when you install the module in the "vendor manager" that feild will be created in table, "vendor_configuration". If it isn't there, there was a problem during installation. I have that exact file on my test server and am not getting that message, so I am confident the problem lies somewhere in your server. Did you try "removing" the module and then reinstalling it? Something is strange about your server, it's not playing nice at all.

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

No, when you install the module in the "vendor manager" that feild will be created in table, "vendor_configuration". If it isn't there, there was a problem during installation. I have that exact file on my test server and am not getting that message, so I am confident the problem lies somewhere in your server. Did you try "removing" the module and then reinstalling it? Something is strange about your server, it's not playing nice at all.

 

Craig :)

 

doing a fresh install again for some reason i ended up with 2 use vendor shipping and 2 of each of the email fields not sure if that was the problem but it just stinks of corruption

 

and as soon as i get this running i am making 5 backups on each of my pc's lol

Edited by dkalasz
Link to comment
Share on other sites

hmm got the usps module "working" but i still have the one warning i posted earlier and a few more now AFTER i click to proceed to payment selection

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_SHIPPING_USPS_RATES_ZONE_1 in /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/catalog/includes/modules/vendors_shipping/usps.php on line 113

 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/catalog/includes/modules/vendors_shipping/usps.php:113) in /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/catalog/includes/functions/general.php on line 33

 

 

and it freezes here doesnt let it go through to select payment.

Link to comment
Share on other sites

hmm got the usps module "working" but i still have the one warning i posted earlier and a few more now AFTER i click to proceed to payment selection

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_SHIPPING_USPS_RATES_ZONE_1 in /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/catalog/includes/modules/vendors_shipping/usps.php on line 113

 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/catalog/includes/modules/vendors_shipping/usps.php:113) in /mnt/web_l/d49/s31/b0277664/www/gewgawonline.com/catalog/includes/functions/general.php on line 33

and it freezes here doesnt let it go through to select payment.

In includes/modules/vendor_shipping/usps.php, find all instances of MODULE_SHIPPING_USPS_RATES_ZONE_ and replace them with MODULE_SHIPPING_USPS_ZONE_. There's one on Line 113, Line 115, Line 140, and another on Line 144.

 

Bugs. There's no end to them.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

In includes/modules/vendor_shipping/usps.php, find all instances of MODULE_SHIPPING_USPS_RATES_ZONE_ and replace them with MODULE_SHIPPING_USPS_ZONE_. There's one on Line 113, Line 115, Line 140, and another on Line 144.

 

Bugs. There's no end to them.

 

Regards

Jim

I know! Stomp stomp stomp. Yet, it is all worth it in the end!

Link to comment
Share on other sites

its me again!! i did those changes and now it is sending me into an infinite loop opening hundreds of untitled windows in my browser <useing firefox so it opens tabs> if i disable the usps module all goes smoothly..

Link to comment
Share on other sites

That's an error that was fixed in the Febr. 6 rollup version. If you are using an older version of MVS you may be missing a lot of bugfixes. You can fix this one by replacing every instance of $this->products with $these_products, or you can replace the file with the one from the Rollup version.

 

Regards

Jim

 

this is back in the latest release btw along with the other string i you had me replace seems this file was reverted to an old one. I got it fixed but just figured you should know..

Link to comment
Share on other sites

this is back in the latest release btw along with the other string i you had me replace seems this file was reverted to an old one. I got it fixed but just figured you should know..

MVS V1.0 doesn't have the file that was causing the issue at all anymore. All code from "vendor_order_data.php" has been moved into "classes/order.php" in order to meet backwards compatibity. Using "$this->" in the class is proper because it creates the "object" with the code, PHP4 was handling this fine, but 5 is a bit more sensitive, so the code cannot be "included", it must be in the class structure.

 

You should not get any errors concerning this with MVS V1.0. Let me know if you did. That would suggest much more serious.

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

In includes/modules/vendor_shipping/usps.php, find all instances of MODULE_SHIPPING_USPS_RATES_ZONE_ and replace them with MODULE_SHIPPING_USPS_ZONE_. There's one on Line 113, Line 115, Line 140, and another on Line 144.

 

Bugs. There's no end to them.

 

Regards

Jim

And how the $@*& did I end up with that in there? I will update that. I see MVS V1.1 already!

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

MVS V1.0 doesn't have the file that was causing the issue at all anymore. All code from "vendor_order_data.php" has been moved into "classes/order.php" in order to meet backwards compatibity. Using "$this->" in the class is proper because it creates the "object" with the code, PHP4 was handling this fine, but 5 is a bit more sensitive, so the code cannot be "included", it must be in the class structure.

 

You should not get any errors concerning this with MVS V1.0. Let me know if you did. That would suggest much more serious.

 

Craig :)

 

yea i did get the error and fixed it by changeing the stuff you had me change earlier

 

no ideas why i end up in an endless loop with the usps mod ? that ones bugging me

Link to comment
Share on other sites

yea i did get the error and fixed it by changeing the stuff you had me change earlier

 

no ideas why i end up in an endless loop with the usps mod ? that ones bugging me

The loop is another strange one. Did you make sure all bogus entries for the USPS module are out of the db? I would suggest going in manually and deleting every entry that includes "MODULE_USPS" and then go back to the admin and try installing it again. Maybe something from the wrong code Jim found is still in the db and is messing something up.

 

I haven't had any of these issues on any of my tests. Damn! Which file did you modify to get rid of the "$this->" errors? "$this->" is referenced by the "object", "$order". This is standard PHP class structure, so it should not be a problem.

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

i had to edit

vendor_order_data and vendor_order_info still trying to figure the usps thing database looked ok but i'll try deleteing and reinstalling the module

Ok, I'm the idiot, I have been looking in the admin side. This is from the catalog side right?

Yeah, MVSV1.1 is shaping up already.

 

Let me know what you get after the re-install.

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

Ok, I'm the idiot, I have been looking in the admin side. This is from the catalog side right?

Yeah, MVSV1.1 is shaping up already.

 

Let me know what you get after the re-install.

 

Craig :)

 

still a loop in the usps module /

Link to comment
Share on other sites

oh and yes catalog side

Hmmm... You can go to the new MVS V1.0 Demo Site and check it out. "Buy" a DVD movie and create an account and checkout, you will see the USPS module giving quotes. The other 2 categories are from 2 other Vendors, you can see what MVS does with the various modules using the system.

 

I will keep researching the looping issue, but I have not been able to replicate the issue.

 

Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

Hmmm... You can go to the new MVS V1.0 Demo Site and check it out. "Buy" a DVD movie and create an account and checkout, you will see the USPS module giving quotes. The other 2 categories are from 2 other Vendors, you can see what MVS does with the various modules using the system.

 

I will keep researching the looping issue, but I have not been able to replicate the issue.

 

Craig :)

 

hmm heh how close are we till 1.1 is comeing out :P i suspect i have a wierd problem somewhere that installing the updated code might fix hell who knows what my fat fingers might have done to the code when my mind wasnt looking /

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