Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

Are you guys toying with me?

 

From checkout_process.php, lines 123-155:

 

//MVS - added insert for new orders_shipping table
	 $shipping_array = $shipping['vendor'];
  foreach ($shipping_array as $vendors_id => $shipping_data) {
 $vendors_query = tep_db_query("select vendors_name
								from " . TABLE_VENDORS . "
								where vendors_id = '" . (int)$vendors_id . "'"
							  );
 $vendors_name = 'Unknown';
 if ($vendors = tep_db_fetch_array($vendors_query)) {
   $vendors_name = $vendors['vendors_name'];
 }
			 $shipping_method_array = explode ('_', $shipping_data['id']);
			 if ($shipping_method_array[0] == 'fedex1') {
					 $shipping_method = 'Federal Express';
					 } elseif ($shipping_method_array[0] == 'upsxml') {
					 $shipping_method = 'UPS';
					 } elseif ($shipping_method_array[0] == 'usps') {
					 $shipping_method = 'USPS';
					 } else {
				 $shipping_method = $shipping_method_array[0];
				 }
 $sql_data_array = array('orders_id' => $insert_id,
						 'vendors_id' => $vendors_id,
						 'shipping_module' => $shipping_method,
						 'shipping_method' => $shipping_data['title'],
						 'shipping_cost' => $shipping_data['cost'],
						 'shipping_tax' =>  $shipping_data['ship_tax'],
						 'vendors_name' => $vendors_name,
						 'vendor_order_sent' => 'no'
						);
 tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array);
  }
//MVS End

Edited by djmonkey1

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

@ blucollarguy and djmonkey1

 

 

Hello guys,

 

thank you for your thoughts about my problem.

 

For now I've come to this workaround:

 

 

in "checkout_shipping.php" I've included this lines of code:

 

below:

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

 

/************************************************************/

 

if ($order->delivery['country_id'] != '14') { // --------> check if customer comes not from Austria (country-code 14)

 

// ------> came to it after reading this http://www.oscommerce.com/forums/index.php?showtopic=182945

 

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { //now go through the whole order

 

 

//and check if there are product(s) in "$order" of vendor who has only modul-tabel/austria-only enabled

 

If ($order->products[$i]['vendors_id'] == '1'){

 

//if so redirect customer back to "shopping_cart.php" and inform him to delete the product(s) from cart not to be shipped to his country

 

 

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode('Sorry, some product(s) can not be shipped to your country. Please remove etc, etc......'), 'SSL'));

 

}

}

}

 

/************************************************************/

 

That's the workaround for now.

 

But unfortunately the customer has to do it manually.

 

Now I want to make it more comfortable for the customer.

 

Question: Is it possible to remove product(s) from $order in "checkout_shipping.php" so that it would work like this:

 

--------------------------------------

 

Example No. 1

 

if ($order->delivery['country_id'] != '14') {

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

 

If ($order->products[$i]['vendors_id'] == '1') {

 

HERE GOES THE CODE FOR REMOVING PRODUCTS FROM "$ORDER"

 

}

 

}

}

 

Plus a message (in the box of the vendor who is not an option) that the produc(s) can not be shipped in the customer's country.

 

 

Even better would be this (because the "country code-condition" would be avoided):

 

----------------------------------------

 

Example No. 2

 

IF there are product(s) of a vendor who is not an option

 

REMOVE PRODUCTS FROM "$ORDER"

 

--------------------------------------------

 

Unfortunately my PHP-knowledge reaches not that far (but I know the concepts of object oriented programming quite well)

 

 

So it would be great if someone has a solution to my problem.

 

Thanks

 

Mike

Link to comment
Share on other sites

Are you guys toying with me?

 

From checkout_process.php, lines 123-155:

 

//MVS - added insert for new orders_shipping table
	 $shipping_array = $shipping['vendor'];
  foreach ($shipping_array as $vendors_id => $shipping_data) {
 $vendors_query = tep_db_query("select vendors_name
								from " . TABLE_VENDORS . "
								where vendors_id = '" . (int)$vendors_id . "'"
							  );
 $vendors_name = 'Unknown';
 if ($vendors = tep_db_fetch_array($vendors_query)) {
   $vendors_name = $vendors['vendors_name'];
 }
			 $shipping_method_array = explode ('_', $shipping_data['id']);
			 if ($shipping_method_array[0] == 'fedex1') {
					 $shipping_method = 'Federal Express';
					 } elseif ($shipping_method_array[0] == 'upsxml') {
					 $shipping_method = 'UPS';
					 } elseif ($shipping_method_array[0] == 'usps') {
					 $shipping_method = 'USPS';
					 } else {
				 $shipping_method = $shipping_method_array[0];
				 }
 $sql_data_array = array('orders_id' => $insert_id,
						 'vendors_id' => $vendors_id,
						 'shipping_module' => $shipping_method,
						 'shipping_method' => $shipping_data['title'],
						 'shipping_cost' => $shipping_data['cost'],
						 'shipping_tax' =>  $shipping_data['ship_tax'],
						 'vendors_name' => $vendors_name,
						 'vendor_order_sent' => 'no'
						);
 tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array);
  }
//MVS End

 

Nope, not at all. LOL I don't remember writing that like that. I wonder why I did?

 

I guess that would be considered a bit of a bug! Sorry dj. I'm gonna have to think of a way of changing all of that.

 

Craig :blush:

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

@ blucollarguy and djmonkey1

Hello guys,

 

thank you for your thoughts about my problem.

 

For now I've come to this workaround:

in "checkout_shipping.php" I've included this lines of code:

 

below:

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

 

/************************************************************/

 

if ($order->delivery['country_id'] != '14') { // --------> check if customer comes not from Austria (country-code 14)

 

// ------> came to it after reading this http://www.oscommerce.com/forums/index.php?showtopic=182945

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { //now go through the whole order

 

 

//and check if there are product(s) in "$order" of vendor who has only modul-tabel/austria-only enabled

 

If ($order->products[$i]['vendors_id'] == '1'){

 

//if so redirect customer back to "shopping_cart.php" and inform him to delete the product(s) from cart not to be shipped to his country

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode('Sorry, some product(s) can not be shipped to your country. Please remove etc, etc......'), 'SSL'));

 

}

}

}

 

/************************************************************/

 

That's the workaround for now.

 

But unfortunately the customer has to do it manually.

 

Now I want to make it more comfortable for the customer.

 

Question: Is it possible to remove product(s) from $order in "checkout_shipping.php" so that it would work like this:

 

--------------------------------------

 

Example No. 1

 

if ($order->delivery['country_id'] != '14') {

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

 

If ($order->products[$i]['vendors_id'] == '1') {

 

HERE GOES THE CODE FOR REMOVING PRODUCTS FROM "$ORDER"

 

}

 

}

}

 

Plus a message (in the box of the vendor who is not an option) that the produc(s) can not be shipped in the customer's country.

 

 

Even better would be this (because the "country code-condition" would be avoided):

 

----------------------------------------

 

Example No. 2

 

IF there are product(s) of a vendor who is not an option

 

REMOVE PRODUCTS FROM "$ORDER"

 

--------------------------------------------

 

Unfortunately my PHP-knowledge reaches not that far (but I know the concepts of object oriented programming quite well)

So it would be great if someone has a solution to my problem.

 

Thanks

 

Mike

 

I'll add this request to the list, I'm sure others could get some use out it Mike, thanks for sharing your workaround.

 

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

Nope, not at all. LOL I don't remember writing that like that. I wonder why I did?

 

I guess that would be considered a bit of a bug! Sorry dj. I'm gonna have to think of a way of changing all of that.

 

Craig :blush:

 

Ha- I'm glad it's there! At least we figured out I'm not crazy.

 

Wouldn't it be simpler to just use the title of the module from the language file?

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

I have a vendor that charges extra for shipping via USPS in addition to their regular handling fee.

 

As MVS only uses the handling fee set in Vendors Admin, after a few hours of trial and error, I finally figured out how to have usps.php add BOTH the handling fee from the Manage Vendors in Admin AND the handling fee set in the MVS shipping module set in manage vendors.

 

This way, each vendor can have a set handling fee for all shipping methods, plus an additional handling fee for USPS shipping added on.

 

Sure it would be easy to add this to other shipping modules as well...

 

 

 

in USPS.php find

$handling_charge = $vendors_data['handling_charge']

 

and replace with

 

// begin mod for extra handling fee
  $vendors_handling_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_USPS_HANDLING_" . $vendors_id . "'");
  $vendors_handling_data = tep_db_fetch_array($vendors_handling_query);

  $handling_charge = $vendors_data['handling_charge'] + $vendors_handling_data['configuration_value'];
// end mod for extra handling fee

 

hope this of use to others with the same situation.

To those whoe wrote this code, congrats for the excellent work, sure has been a Godsend for me!

Jim Bullen - President

The Cigar Hut Group of Companies

 

 

Installed add-ons: (that now need to be upgraded to OSC CE Phoenix)

PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more!

Link to comment
Share on other sites

I have a vendor that charges extra for shipping via USPS in addition to their regular handling fee.

 

As MVS only uses the handling fee set in Vendors Admin, after a few hours of trial and error, I finally figured out how to have usps.php add BOTH the handling fee from the Manage Vendors in Admin AND the handling fee set in the MVS shipping module set in manage vendors.

 

This way, each vendor can have a set handling fee for all shipping methods, plus an additional handling fee for USPS shipping added on.

 

Sure it would be easy to add this to other shipping modules as well...

in USPS.php find

$handling_charge = $vendors_data['handling_charge']

 

and replace with

 

// begin mod for extra handling fee
  $vendors_handling_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_USPS_HANDLING_" . $vendors_id . "'");
  $vendors_handling_data = tep_db_fetch_array($vendors_handling_query);

  $handling_charge = $vendors_data['handling_charge'] + $vendors_handling_data['configuration_value'];
// end mod for extra handling fee

 

hope this of use to others with the same situation.

To those whoe wrote this code, congrats for the excellent work, sure has been a Godsend for me!

Which USPS file are you using? Obviously you have it retrieving quotes, which is more that I can say for myself. Please send me a copy of your USPS file so I can see what's different. You can email from my profile.

 

And thanks for sharing your mod, we all appreciate it, that should probably be there anyway, 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

Ha- I'm glad it's there! At least we figured out I'm not crazy.

 

Wouldn't it be simpler to just use the title of the module from the language file?

 

Yeah, it seems like that would be the proper way of handling it, I will update that for the next release.

 

And thanks for your persistence, 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

Yeah, it seems like that would be the proper way of handling it, I will update that for the next release.

 

And thanks for your persistence, Craig :)

 

Actually, it might come in handy for me. I just may keep it...

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Ok I've been at this for 8 hours now. I have read all posts in this section dating back to June 5, 2005!!! :blink: and I have seen only one mention and zero replies to a similar error that I am now facing.

Well, actually three errors

1) Error: 'document.checkout_address.shipping.0' is null or not an object

Code: 0

2) No matter what I select as the shipping method (or which shipping module I install) I get kicked back to the checkout_shipping.php page with some interesting effects. For instance, if the UPSXML module is installed it kicks back with double the items (weight is unchanged :huh: ) and with the UPS HTML mod it kicks back with ONLY the ground choice showing.

3) Nothing is selected at all when the checkout_shipping.php is initially requested even though it should be the cheapest method selected, no?

 

These errors only happen with MVS enabled so where do I start looking?

 

 

PS Thanks and extreme gratitude to ALL who have worked so hard to get this where it is so far!

Link to comment
Share on other sites

Ok I've been at this for 8 hours now. I have read all posts in this section dating back to June 5, 2005!!! :blink: and I have seen only one mention and zero replies to a similar error that I am now facing.

Well, actually three errors

1) Error: 'document.checkout_address.shipping.0' is null or not an object

Code: 0

2) No matter what I select as the shipping method (or which shipping module I install) I get kicked back to the checkout_shipping.php page with some interesting effects. For instance, if the UPSXML module is installed it kicks back with double the items (weight is unchanged :huh: ) and with the UPS HTML mod it kicks back with ONLY the ground choice showing.

3) Nothing is selected at all when the checkout_shipping.php is initially requested even though it should be the cheapest method selected, no?

 

These errors only happen with MVS enabled so where do I start looking?

PS Thanks and extreme gratitude to ALL who have worked so hard to get this where it is so far!

HMMMMM!

 

Is this a Windows server? Just wondering because of that first error message you describe. It sounds like you need to re-do the install in the catalog side. Do you have any other mods installed that effect the checkout process at all? Do you have a vendor assigned to EVERY product that is in the cart? And a shipping method installed for all vendors who have a product in the cart? Without any of these some strange errors can come up. Try setting up your vendors with one of the simpler shipping modules first, item or flat, and see what you get.

 

Ultimately though, I think you need to double check your catalog side edits, it really sounds like something is messed up there.

 

Good luck, and stick with it, MVS really does work very nicely, Craig :) :thumbsup:

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

HMMMMM!

 

Is this a Windows server? Just wondering because of that first error message you describe. It sounds like you need to re-do the install in the catalog side. Do you have any other mods installed that effect the checkout process at all? Do you have a vendor assigned to EVERY product that is in the cart? And a shipping method installed for all vendors who have a product in the cart? Without any of these some strange errors can come up. Try setting up your vendors with one of the simpler shipping modules first, item or flat, and see what you get.

 

Ultimately though, I think you need to double check your catalog side edits, it really sounds like something is messed up there.

 

Good luck, and stick with it, MVS really does work very nicely, Craig :) :thumbsup:

No, it's on a Linux/Apache server (my dedicated server at that) and yes , I have them set. I will will do a diif comp and see what I can find. Just wanted to get some direction as to where I should start looking since this is only happening when MVS is enabled. Otherwise it works as it should.

Link to comment
Share on other sites

Does anyone have this working with easy populate? I trying using the "easy populate with vendors auto email" but this doesnt seem to pull the vendors info into the spreadsheet :( Anyone had any luck doing this?

In MVS_Options, (can be downloaded from the SourceForge site -- MVS_Options download you should find an updated version of EasyPopulate. Sorry this could not be included in RC4 but the files are too big for quick uploads at the contribution pages. It has been added, but must be approved before it will be availble there.

 

Good luck, Craig :)

 

I use this version and many of my clients use this version.

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 MVS_Options, (can be downloaded from the SourceForge site -- MVS_Options download you should find an updated version of EasyPopulate. Sorry this could not be included in RC4 but the files are too big for quick uploads at the contribution pages. It has been added, but must be approved before it will be availble there.

 

Good luck, Craig :)

 

I use this version and many of my clients use this version.

 

 

 

Dear blucollarguy,

 

I'm new to the forums and osComm so please forgive my ignorance. I see that you have went to great lengths to solve the mystery behind the multiple vender and shipping issues. I would very much appreciate your advice and direction as to how to have my web developer integrate the contributions that I need.

 

First let me intruduce myself...My name is Jim and I'm the owner an online retail store. http://www.poolsupplypros.com/default.php We are within weeks of finally launching the site and need to get off on the right foot.

 

This is my situation and what I need:

I have several venders in different parts of the country (Different Zips) that drop ship my products. My products vary in size from items that weigth 1lb (UPSable) to items that are 600lbs (common carrrier/freight line). When the customer goes through the checkout process, I need the following to be calculated:

 

- UPS calculations for products & Common Carrier calculations for products (BAX Global?)

- Some items that will have a flat rate shipping fee

- Some items that will be free shipping

- There will be many orders that will have several items coming from different venders...all with different weights. Some will go UPS & others will go truckline. (Tricky!!)

- During the checkout process, I will also need to somehow let customers (that live in Hawaii and Alaska) know that they will need to contact us for a shipping quote.

 

All of this may sound a bit crazy, but I'm stressing out about how all of this is going to be resolved. I just want it to be right the first time out of the gate.

 

I would really appreciate any help that you could provide. I will pass any information that you may have to my developer.

 

Many Thanks!! :)

Sincerly,

 

Jim

Jim Davis

Link to comment
Share on other sites

<snip>

- UPS calculations for products & Common Carrier calculations for products (BAX Global?)

- Some items that will have a flat rate shipping fee

- Some items that will be free shipping

- There will be many orders that will have several items coming from different venders...all with different weights. Some will go UPS & others will go truckline. (Tricky!!)

- During the checkout process, I will also need to somehow let customers (that live in Hawaii and Alaska) know that they will need to contact us for a shipping quote.

<snip>

Jim

I'll take a shot at this for you. All of what you describe can be done by MVS. You might want to point your developer here for more information, unless he understands all of this right away.

 

First, is your store version 2.2 MS2? That default.php looks like MS1. If it is MS1, you will need to upgrade to use MVS. Unless you have a very good developer who is willing to tackle a fairly massive mod, in which case I'd like the chance to look at his code. If your store is new, I would recommend upgrading to MS2 now, as there are relatively few Contributions available for MS1.

 

Assuming MS2, you will need to set an MVS Vendor for each combination of shipping method and vendor. For example, if you have a vendor that ships smaller items by UPS and heavy ones by truck, you will need to set up two MVS Vendors to cover that. Flat rate is no problem, just use the Flat module. Free is easily done by using the Flat module and setting cost to zero. For Alaska and Hawaii, you should be able to use the Zone settings to exclude them. I would set a custom module for those zones with your instructions on shipping. You could easily modify one of the simple modules, such as Flat, to do this.

 

I have modified the Bax Global module to work with MVS, but I haven't gotten around to posting it here yet. If you need it before I get up the ambition to post it, email me and I'll send you a copy. My email is in my profile.

 

Regards

Jim

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

Link to comment
Share on other sites

Dear blucollarguy,

 

........

 

 

All of this may sound a bit crazy, but I'm stressing out about how all of this is going to be resolved. I just want it to be right the first time out of the gate.

 

I would really appreciate any help that you could provide. I will pass any information that you may have to my developer.

 

Many Thanks!! :)

Sincerly,

 

Jim

Well, Jim has answere your question quite well. And his concern seems to be well founded. Looking around your site, it does have the look of MS1, which would pose a significant problem for you. MVS is base on MS2 and really isn't capable(as is) of being ported into an MS1 store, I have personally had difficulty installing MVS on early CSV versions of MS2. There don't seem to be many other choices that are capable of this type of product handling either, which was why I started this mess! LOL

And fortunately for me and all osCommerce users, once Jim came on board with me, we got it done.

 

So, MVS does exactly what you are describing and I recommend upgrading to MS2 if you are currently using MS1, and point your developer here to read up on the developement of MVS. It is quite stable, with a few bugs to chase down as I have not had the time finish the next release yet.

 

Good luck, and let us know how things go, 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

Cool Thanks

Did you find what you needed Dave?

 

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'll take a shot at this for you. All of what you describe can be done by MVS. You might want to point your developer here for more information, unless he understands all of this right away.

 

First, is your store version 2.2 MS2? That default.php looks like MS1. If it is MS1, you will need to upgrade to use MVS. Unless you have a very good developer who is willing to tackle a fairly massive mod, in which case I'd like the chance to look at his code. If your store is new, I would recommend upgrading to MS2 now, as there are relatively few Contributions available for MS1.

 

Assuming MS2, you will need to set an MVS Vendor for each combination of shipping method and vendor. For example, if you have a vendor that ships smaller items by UPS and heavy ones by truck, you will need to set up two MVS Vendors to cover that. Flat rate is no problem, just use the Flat module. Free is easily done by using the Flat module and setting cost to zero. For Alaska and Hawaii, you should be able to use the Zone settings to exclude them. I would set a custom module for those zones with your instructions on shipping. You could easily modify one of the simple modules, such as Flat, to do this.

 

I have modified the Bax Global module to work with MVS, but I haven't gotten around to posting it here yet. If you need it before I get up the ambition to post it, email me and I'll send you a copy. My email is in my profile.

 

Regards

Jim

 

Thanks Jim! I will get this to my developer and have her do the upgrades. I'll let you know how it goes.

 

Jim :D

Jim Davis

Link to comment
Share on other sites

I'll take a shot at this for you. All of what you describe can be done by MVS. You might want to point your developer here for more information, unless he understands all of this right away.

 

First, is your store version 2.2 MS2? That default.php looks like MS1. If it is MS1, you will need to upgrade to use MVS. Unless you have a very good developer who is willing to tackle a fairly massive mod, in which case I'd like the chance to look at his code. If your store is new, I would recommend upgrading to MS2 now, as there are relatively few Contributions available for MS1.

 

Assuming MS2, you will need to set an MVS Vendor for each combination of shipping method and vendor. For example, if you have a vendor that ships smaller items by UPS and heavy ones by truck, you will need to set up two MVS Vendors to cover that. Flat rate is no problem, just use the Flat module. Free is easily done by using the Flat module and setting cost to zero. For Alaska and Hawaii, you should be able to use the Zone settings to exclude them. I would set a custom module for those zones with your instructions on shipping. You could easily modify one of the simple modules, such as Flat, to do this.

 

I have modified the Bax Global module to work with MVS, but I haven't gotten around to posting it here yet. If you need it before I get up the ambition to post it, email me and I'll send you a copy. My email is in my profile.

 

Regards

Jim

 

Hi Jim,

 

In regards to your curiosity about the code on my site, please contact me offline through our website.http://www.poolsupplypros.com/default.php

 

Thanks! :thumbsup:

 

Jim

Jim Davis

Link to comment
Share on other sites

Using UPSXML, suddenly "Ground" is showing up as "Ground, " complete with the comma and space at the end (same thing with 2nd Day Air, Next Day Air, Worldwide Express, etc). It appears this way on checkout_shipping and checkout_confirmation and is being written this way in the database. This isn't a big deal but it's silly. I didn't change anything to cause this that I know of, and the regular UPS module still works exactly the same.

 

???

update: I re-uploaded the language definition file and the comma disappeared for domestic methods temporarily, but then came back again.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Which USPS file are you using? Obviously you have it retrieving quotes, which is more that I can say for myself. Please send me a copy of your USPS file so I can see what's different. You can email from my profile.

 

And thanks for sharing your mod, we all appreciate it, that should probably be there anyway, Craig :)

 

I sent you an email, but here is my MVS usps.php file for others to see

(Works great for US quotes but doesn't work for international shipments at all, anybody have luck with that?

 

 

<?php

/*

$Id: usps.php,v 1.47 2003/04/08 23:23:42 dgw_ Exp $

++++ modified as USPS Methods 2.5 08/02/03 by Brad Waite and Fritz Clapp ++++

 

Modified for MVS by Rick Knight

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright (c) 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class usps {

var $code, $title, $description, $icon, $enabled, $countries;

 

// class constructor

function usps() {

global $order;

// Added MVS

// $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id'];

// End ADD

 

$this->code = 'usps';

$this->title = MODULE_SHIPPING_USPS_TEXT_TITLE;

$this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION;

$this->icon = DIR_WS_ICONS . 'shipping_usps.gif';

$this->delivery_country_id = $order->delivery['country']['id'];

$this->delivery_zone_id = $order->delivery['zone_id'];

// Removed MVS

/*

$this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER;

$this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS;

$this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);

 

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_USPS_ZONE > 0) ) {

$check_flag = false;

$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");

while ($check = tep_db_fetch_array($check_query)) {

if ($check['zone_id'] < 1) {

$check_flag = true;

break;

} elseif ($check['zone_id'] == $order->delivery['zone_id']) {

$check_flag = true;

break;

}

}

 

if ($check_flag == false) {

$this->enabled = false;

}

}

End of Remove

*/

$this->types = array('Express' => 'Express Mail',

'First Class' => 'First-Class Mail',

'Priority' => 'Priority Mail',

'Parcel' => 'Parcel Post');

 

$this->intl_types = array('GXG Document' => 'Global Express Guaranteed Document Service',

'GXG Non-Document' => 'Global Express Guaranteed Non-Document Service',

'Express' => 'Global Express Mail (EMS)',

// 'Priority Lg' => 'Global Priority Mail - Flat-rate Envelope (large)',

'Priority Lg' => 'Global Priority Mail - Flat-rate Envelope (Large)',

// 'Priority Sm' => 'Global Priority Mail - Flat-rate Envelope (small)',

'Priority Sm' => 'Global Priority Mail - Flat-rate Envelope (Small)',

// 'Priority Var' => 'Global Priority Mail - Variable Weight Envelope (single)',

'Priority Var' => 'Global Priority Mail - Variable Weight Envelope (Single)',

// 'Airmail Letter' => 'Airmail Letter Post',

'Airmail Letter' => 'Airmail Letter-post',

'Airmail Parcel' => 'Airmail Parcel Post',

// 'Surface Letter' => 'Economy (Surface) Letter Post',

'Surface Letter' => 'Economy (Surface) Letter-post',

'Surface Post' => 'Economy (Surface) Parcel Post');

 

$this->countries = $this->country_list();

}

 

// MVS ADD

function sort_order($vendors_id='1') {

$sort_order = constant ('MODULE_SHIPPING_USPS_SORT_ORDER_' . $vendors_id);

if (isset ($sort_order)) { $this->sort_order = $sort_order;

} else {

$this->sort_order = '0';

}

return $this->sort_order;

}

 

function tax_class($vendors_id='1') {

$this->tax_class = constant('MODULE_SHIPPING_USPS_TAX_CLASS_' . $vendors_id);

return $this->tax_class;

}

 

function enabled($vendors_id='1') {

$this->enabled = false;

$status = @constant('MODULE_SHIPPING_USPS_STATUS_' . $vendors_id);

if (isset ($status) && $status != '') {

$this->enabled = (($status == 'True') ? true : false);

}

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

$check_flag = false;

$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id");

while ($check = tep_db_fetch_array($check_query)) {

if ($check['zone_id'] < 1) {

$check_flag = true;

break;

}

elseif ($check['zone_id'] == $this->delivery_zone_id) {

$check_flag = true;

break;

}

}

 

if ($check_flag == false) {

$this->enabled = false;

}//if

}//if

return $this->enabled;

}

 

function zones($vendors_id='1') {

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

$check_flag = false;

$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_zone_id . "' order by zone_id");

while ($check = tep_db_fetch_array($check_query)) {

if ($check['zone_id'] < 1) {

$check_flag = true;

break;

} elseif ($check['zone_id'] == $this->delivery_zone_id) {

$check_flag = true;

break;

} //if

}//while

 

if ($check_flag == false) {

$this->enabled = false;

}//if

}//if

return $this->enabled;

}//function

// EOADD MVS

 

// class methods

// Changed MVS

// function quote($method = '') {

function quote($method = '', $module = '', $vendors_id = '1') {

// EOCHANGE

 

// BOF: UPS USPS

global $HTTP_POST_VARS, $shipping_weight, $order, $cart, $shipping_num_boxes;

 

if ( tep_not_null($method) && (isset($this->types[$method]) || in_array($method, $this->intl_types)) ) {

$this->_setService($method);

}

 

$this->_setMachinable('False');

$this->_setContainer('None');

$this->_setSize('REGULAR');

 

// usps doesnt accept zero weight

$shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight);

$shipping_pounds = floor ($shipping_weight);

$shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight)));

$this->_setWeight($shipping_pounds, $shipping_ounces);

// BOF: UPS USPS

 

if (in_array('Display weight', explode(', ', constant('MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id)))) {

$shiptitle = ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)';

} else {

$shiptitle = '';

}

// EOF: UPS USPS

 

$uspsQuote = $this->_getQuote($vendors_id);

 

if (is_array($uspsQuote)) {

if (isset($uspsQuote['error'])) {

$this->quotes = array('module' => $this->title,

'error' => $uspsQuote['error']);

} else {

 

// Added MVS

$vendors_data_query = tep_db_query("select handling_charge,

handling_per_box,

vendor_country,

vendors_zipcode

from " . TABLE_VENDORS . "

where vendors_id = '" . (int)$vendors_id . "'"

);

$vendors_data = tep_db_fetch_array($vendors_data_query);

$country_name = tep_get_countries($vendors_data['vendor_country'], true);

 

// begin mod for extra handling fee

$vendors_handling_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_USPS_HANDLING_" . $vendors_id . "'");

$vendors_handling_data = tep_db_fetch_array($vendors_handling_query);

 

$handling_charge = $vendors_data['handling_charge'] + $vendors_handling_data['configuration_value'];

// end mod for extra handling fee

$handling_per_box = $vendors_data['handling_per_box'];

if ($handling_charge > $handling_per_box*$shipping_num_boxes) {

$handling = $handling_charge;

} else {

$handling = $handling_per_box*$shipping_num_boxes;

}

// EOADD MVS

 

/* Original

$this->quotes = array('id' => $this->code,

'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)');

*/

// BOF: UPS USPS

$this->quotes = array('id' => $this->code,

'module' => $this->title . $shiptitle);

// EOF: UPS USPS

 

$methods = array();

$size = sizeof($uspsQuote);

for ($i=0; $i<$size; $i++) {

list($type, $cost) = each($uspsQuote[$i]);

 

// BOF: UPS USPS

$title = ((isset($this->types[$type])) ? $this->types[$type] : $type);

if(in_array('Display transit time', explode(', ', constant('MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id)))) $title .= $transittime[$type];

 

/* ORIGINAL

$methods[] = array('id' => $type,

'title' => ((isset($this->types[$type])) ? $this->types[$type] : $type),

'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);

*/

$methods[] = array('id' => $type,

'title' => $title,

'cost' => ($cost + $handling) * $shipping_num_boxes);

}

// EOF: UPS USPS

 

$this->quotes['methods'] = $methods;

// $this->tax_class = constant(MODULE_SHIPPING_USPS_TAX_CLASS_ . $vendors_id);

if ($this->tax_class($vendors_id) > 0) {

$this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']);

}

}

} else {

$this->quotes = array('module' => $this->title,

'error' => MODULE_SHIPPING_USPS_TEXT_ERROR);

}

 

if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);

 

return $this->quotes;

}

 

// MVS Added/Changed

// function check() {

function check($vendors_id = '1') {

//EOMVS

 

if (!isset($this->_check)) {

// MVS Added/Changed

// $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_USPS_STATUS'");

$check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_USPS_STATUS_" . $vendors_id . "'");

// EOMVS

 

$this->_check = tep_db_num_rows($check_query);

}

return $this->_check;

}

 

// MVS Added/Changed

/*

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable USPS Shipping', 'MODULE_SHIPPING_USPS_STATUS', 'True', 'Do you want to offer USPS shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enter the USPS User ID', 'MODULE_SHIPPING_USPS_USERID', 'NONE', 'Enter the USPS USERID assigned to you.', '6', '0', now())");

// BOF: UPS USPS

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enter the USPS Password', 'MODULE_SHIPPING_USPS_PASSWORD', 'NONE', 'See USERID, above.', '6', '0', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Which server to use', 'MODULE_SHIPPING_USPS_SERVER', 'production', 'An account at USPS is needed to use the Production server', '6', '0', 'tep_cfg_select_option(array(\'test\', \'production\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_USPS_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_USPS_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_USPS_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Domestic Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES', 'Express, Priority, First Class, Parcel', 'Select the domestic services to be offered:', '6', '14', 'tep_cfg_select_multioption(array(\'Express\', \'Priority\', \'First Class\', \'Parcel\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Int\'l Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_INTL', 'GXG Document, GXG Non-Document, Express, Priority Lg, Priority Sm, Priority Var, Airmail Letter, Airmail Parcel, Surface Letter, Surface Post', 'Select the international services to be offered:', '6', '15', 'tep_cfg_select_multioption(array(\'GXG Document\', \'GXG Non-Document\', \'Express\', \'Priority Lg\', \'Priority Sm\', \'Priority Var\', \'Airmail Letter\', \'Airmail Parcel\', \'Surface Letter\', \'Surface Post\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('USPS Options', 'MODULE_SHIPPING_USPS_OPTIONS', 'Display weight, Display transit time', 'Select from the following the USPS options.', '6', '16', 'tep_cfg_select_multioption(array(\'Display weight\', \'Display transit time\'), ', now())");

// EOF: UPS USPS

}

*/

function install($vendors_id = '1') {

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Enable USPS Shipping', 'MODULE_SHIPPING_USPS_STATUS_" . $vendors_id . "', 'True', 'Do you want to offer USPS shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Enter the USPS User ID', 'MODULE_SHIPPING_USPS_USERID_" . $vendors_id . "', 'NONE', 'Enter the USPS USERID assigned to you.', '6', '0', now(), '" . $vendors_id . "')");

// BOF: UPS USPS

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Enter the USPS Password', 'MODULE_SHIPPING_USPS_PASSWORD_" . $vendors_id . "', 'NONE', 'See USERID, above.', '6', '0', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Which server to use', 'MODULE_SHIPPING_USPS_SERVER_" . $vendors_id . "', 'production', 'An account at USPS is needed to use the Production server', '6', '0', 'tep_cfg_select_option(array(\'test\', \'production\'), ', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Handling Fee', 'MODULE_SHIPPING_USPS_HANDLING_" . $vendors_id . "', '0', 'Handling fee for this shipping method.', '6', '0', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Tax Class', 'MODULE_SHIPPING_USPS_TAX_CLASS_" . $vendors_id . "', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_USPS_ZONE_" . $vendors_id . "', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Sort Order', 'MODULE_SHIPPING_USPS_SORT_ORDER_" . $vendors_id . "', '0', 'Sort order of display.', '6', '0', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Domestic Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_" . $vendors_id . "', 'Express, Priority, First Class, Parcel', 'Select the domestic services to be offered:', '6', '14', 'tep_cfg_select_multioption(array(\'Express\', \'Priority\', \'First Class\', \'Parcel\'), ', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Int\'l Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_INTL_" . $vendors_id . "', 'GXG Document, GXG Non-Document, Express, Priority Lg, Priority Sm, Priority Var, Airmail Letter, Airmail Parcel, Surface Letter, Surface Post', 'Select the international services to be offered:', '6', '15', 'tep_cfg_select_multioption(array(\'GXG Document\', \'GXG Non-Document\', \'Express\', \'Priority Lg\', \'Priority Sm\', \'Priority Var\', \'Airmail Letter\', \'Airmail Parcel\', \'Surface Letter\', \'Surface Post\'), ', now(), '" . $vendors_id . "')");

tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('USPS Options', 'MODULE_SHIPPING_USPS_OPTIONS_" . $vendors_id . "', 'Display weight, Display transit time', 'Select from the following the USPS options.', '6', '16', 'tep_cfg_select_multioption(array(\'Display weight\', \'Display transit time\'), ', now(), '" . $vendors_id . "')");

// EOF: UPS USPS

}

// EOADD

 

// MVS Added/Changed

/*

function remove() {

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

}

*/

function remove($vendors_id) {

tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')");

}

// EOADD

 

// MVS Added/Changed

/*

function keys() {

// BOF: UPS USPS

// ORIGINAL return array('MODULE_SHIPPING_USPS_STATUS', 'MODULE_SHIPPING_USPS_USERID', 'MODULE_SHIPPING_USPS_PASSWORD', 'MODULE_SHIPPING_USPS_SERVER', 'MODULE_SHIPPING_USPS_HANDLING', 'MODULE_SHIPPING_USPS_TAX_CLASS', 'MODULE_SHIPPING_USPS_ZONE', 'MODULE_SHIPPING_USPS_SORT_ORDER');

return array('MODULE_SHIPPING_USPS_STATUS', 'MODULE_SHIPPING_USPS_USERID', 'MODULE_SHIPPING_USPS_PASSWORD', 'MODULE_SHIPPING_USPS_SERVER', 'MODULE_SHIPPING_USPS_HANDLING', 'MODULE_SHIPPING_USPS_TAX_CLASS', 'MODULE_SHIPPING_USPS_ZONE', 'MODULE_SHIPPING_USPS_SORT_ORDER', 'MODULE_SHIPPING_USPS_OPTIONS', 'MODULE_SHIPPING_USPS_TYPES', 'MODULE_SHIPPING_USPS_TYPES_INTL');

// EOF: UPS USPS

}

*/

function keys($vendors_id) {

// BOF: UPS USPS

// ORIGINAL return array('MODULE_SHIPPING_USPS_STATUS', 'MODULE_SHIPPING_USPS_USERID', 'MODULE_SHIPPING_USPS_PASSWORD', 'MODULE_SHIPPING_USPS_SERVER', 'MODULE_SHIPPING_USPS_HANDLING', 'MODULE_SHIPPING_USPS_TAX_CLASS', 'MODULE_SHIPPING_USPS_ZONE', 'MODULE_SHIPPING_USPS_SORT_ORDER');

return array('MODULE_SHIPPING_USPS_STATUS_' . $vendors_id, 'MODULE_SHIPPING_USPS_USERID_' . $vendors_id, 'MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id, 'MODULE_SHIPPING_USPS_SERVER_' . $vendors_id, 'MODULE_SHIPPING_USPS_HANDLING_' . $vendors_id, 'MODULE_SHIPPING_USPS_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_USPS_ZONE_' . $vendors_id, 'MODULE_SHIPPING_USPS_SORT_ORDER_' . $vendors_id, 'MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id, 'MODULE_SHIPPING_USPS_TYPES_' . $vendors_id, 'MODULE_SHIPPING_USPS_TYPES_INTL_' . $vendors_id);

// EOF: UPS USPS

}

// EOADD MVS

 

function _setService($service) {

$this->service = $service;

}

 

function _setWeight($pounds, $ounces=0) {

$this->pounds = $pounds;

$this->ounces = $ounces;

}

 

function _setContainer($container) {

$this->container = $container;

}

 

function _setSize($size) {

$this->size = $size;

}

 

function _setMachinable($machinable) {

$this->machinable = $machinable;

}

 

function _getQuote($vendors_id) {

// BOF: UPS USPS

global $order, $transittime;

// MVS Added

$vendors_data_query = tep_db_query("select vendor_country,

vendors_zipcode

from " . TABLE_VENDORS . "

where vendors_id = '" . (int)$vendors_id . "'"

);

$vendors_data = tep_db_fetch_array($vendors_data_query);

// MVS End

if(in_array('Display transit time', explode(', ', constant('MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id)))) $transit = TRUE;

// EOF: UPS USPS

 

if ($order->delivery['country']['id'] == /*SHIPPING_ORIGIN_COUNTRY*/ $vendors_data['vendor_country']) {

$request = '<RateRequest USERID="' . constant('MODULE_SHIPPING_USPS_USERID_' . $vendors_id) . '" PASSWORD="' . constant('MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id) . '">';

$services_count = 0;

 

if (isset($this->service)) {

$this->types = array($this->service => $this->types[$this->service]);

}

 

$dest_zip = str_replace(' ', '', $order->delivery['postcode']);

if ($order->delivery['country']['iso_code_2'] == 'US') $dest_zip = substr($dest_zip, 0, 5);

 

reset($this->types);

// BOF: UPS USPS

$allowed_types = explode(", ", constant('MODULE_SHIPPING_USPS_TYPES_' . $vendors_id));

while (list($key, $value) = each($this->types)) {

// BOF: UPS USPS

if ( !in_array($key, $allowed_types) ) continue;

$request .= '<Package ID="' . $services_count . '">' .

'<Service>' . $key . '</Service>' .

'<ZipOrigination>' . /*SHIPPING_ORIGIN_ZIP*/ $vendors_data['vendors_zipcode'] . '</ZipOrigination>' .

'<ZipDestination>' . $dest_zip . '</ZipDestination>' .

'<Pounds>' . $this->pounds . '</Pounds>' .

'<Ounces>' . $this->ounces . '</Ounces>' .

'<Container>' . $this->container . '</Container>' .

'<Size>' . $this->size . '</Size>' .

'<Machinable>' . $this->machinable . '</Machinable>' .

'</Package>';

 

// BOF: UPS USPS

if($transit){

$transitreq = 'USERID="' . constant('MODULE_SHIPPING_USPS_USERID_' . $vendors_id) .

'" PASSWORD="' . constant('MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id) . '">' .

'<OriginZip>' . $vendors_data['vendors_zipcode'] . '</OriginZip>' .

'<DestinationZip>' . $dest_zip . '</DestinationZip>';

 

switch ($key) {

case 'Express': $transreq[$key] = 'API=ExpressMail&XML=' .

urlencode( '<ExpressMailRequest ' . $transitreq . '</ExpressMailRequest>');

break;

case 'Priority': $transreq[$key] = 'API=PriorityMail&XML=' .

urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>');

break;

case 'Parcel': $transreq[$key] = 'API=StandardB&XML=' .

urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>');

break;

default: $transreq[$key] = '';

break;

}

}

// EOF: UPS USPS

 

$services_count++;

}

$request .= '</RateRequest>';

 

$request = 'API=Rate&XML=' . urlencode($request);

} else {

$request = '<IntlRateRequest USERID="' . constant('MODULE_SHIPPING_USPS_USERID_' . $vendors_id) . '" PASSWORD="' . constant('MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id) . '">' .

'<Package ID="0">' .

'<Pounds>' . $this->pounds . '</Pounds>' .

'<Ounces>' . $this->ounces . '</Ounces>' .

'<MailType>Package</MailType>' .

'<Country>' . $this->countries[$order->delivery['country']['iso_code_2']] . '</Country>' .

'</Package>' .

'</IntlRateRequest>';

 

$request = 'API=IntlRate&XML=' . urlencode($request);

}

 

switch (constant('MODULE_SHIPPING_USPS_SERVER_' . $vendors_id)) {

case 'production': $usps_server = 'production.shippingapis.com';

$api_dll = 'shippingapi.dll';

break;

case 'test':

default: $usps_server = 'testing.shippingapis.com';

$api_dll = 'ShippingAPITest.dll';

break;

}

 

$body = '';

 

$http = new httpClient();

if ($http->Connect($usps_server, 80)) {

$http->addHeader('Host', $usps_server);

$http->addHeader('User-Agent', 'osCommerce');

$http->addHeader('Connection', 'Close');

 

if ($http->Get('/' . $api_dll . '?' . $request)) $body = $http->getBody();

// BOF: UPS USPS

// mail('[email protected]','USPS rate quote response',$body,'From: <[email protected]>');

if ($transit && is_array($transreq) && ($order->delivery['country']['id'] == STORE_COUNTRY)) {

while (list($key, $value) = each($transreq)) {

if ($http->Get('/' . $api_dll . '?' . $value)) $transresp[$key] = $http->getBody();

}

}

// EOF: UPS USPS

 

$http->Disconnect();

} else {

return false;

}

 

$response = array();

while (true) {

if ($start = strpos($body, '<Package ID=')) {

$body = substr($body, $start);

$end = strpos($body, '</Package>');

$response[] = substr($body, 0, $end+10);

$body = substr($body, $end+9);

} else {

break;

}

}

 

$rates = array();

if ($order->delivery['country']['id'] == SHIPPING_ORIGIN_COUNTRY) {

if (sizeof($response) == '1') {

if (ereg('<Error>', $response[0])) {

$number = ereg('<Number>(.*)</Number>', $response[0], $regs);

$number = $regs[1];

$description = ereg('<Description>(.*)</Description>', $response[0], $regs);

$description = $regs[1];

 

return array('error' => $number . ' - ' . $description);

}

}

 

$n = sizeof($response);

for ($i=0; $i<$n; $i++) {

if (strpos($response[$i], '<Postage>')) {

$service = ereg('<Service>(.*)</Service>', $response[$i], $regs);

$service = $regs[1];

$postage = ereg('<Postage>(.*)</Postage>', $response[$i], $regs);

$postage = $regs[1];

 

$rates[] = array($service => $postage);

 

// BOF: UPS USPS

if ($transit) {

switch ($service) {

case 'Express': $time = ereg('<MonFriCommitment>(.*)</MonFriCommitment>', $transresp[$service], $tregs);

$time = $tregs[1];

if ($time == '' || $time == 'No Data') {

$time = '1 - 2 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;

} else {

$time = 'Tomorrow by ' . $time;

}

break;

case 'Priority': $time = ereg('<Days>(.*)</Days>', $transresp[$service], $tregs);

$time = $tregs[1];

if ($time == '' || $time == 'No Data') {

$time = '2 - 3 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;

} elseif ($time == '1') {

$time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAY;

} else {

$time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAYS;

}

break;

case 'Parcel': $time = ereg('<Days>(.*)</Days>', $transresp[$service], $tregs);

$time = $tregs[1];

if ($time == '' || $time == 'No Data') {

$time = '4 - 7 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;

} elseif ($time == '1') {

$time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAY;

} else {

$time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAYS;

}

break;

case 'First Class': $time = '2 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;

break;

default: $time = '';

break;

}

if ($time != '') $transittime[$service] = ' (' . $time . ')';

}

// EOF: UPS USPS

}

}

} else {

if (ereg('<Error>', $response[0])) {

$number = ereg('<Number>(.*)</Number>', $response[0], $regs);

$number = $regs[1];

$description = ereg('<Description>(.*)</Description>', $response[0], $regs);

$description = $regs[1];

 

return array('error' => $number . ' - ' . $description);

} else {

$body = $response[0];

$services = array();

while (true) {

if ($start = strpos($body, '<Service ID=')) {

$body = substr($body, $start);

$end = strpos($body, '</Service>');

$services[] = substr($body, 0, $end+10);

$body = substr($body, $end+9);

} else {

break;

}

}

 

// BOF: UPS USPS

$allowed_types = array();

foreach( explode(", ", constant('MODULE_SHIPPING_USPS_TYPES_INTL_' . $vendors_id)) as $value ) $allowed_types[$value] = $this->intl_types[$value];

// EOF: UPS USPS

 

$size = sizeof($services);

for ($i=0, $n=$size; $i<$n; $i++) {

if (strpos($services[$i], '<Postage>')) {

$service = ereg('<SvcDescription>(.*)</SvcDescription>', $services[$i], $regs);

$service = $regs[1];

$postage = ereg('<Postage>(.*)</Postage>', $services[$i], $regs);

$postage = $regs[1];

// BOF: UPS USPS

$time = ereg('<SvcCommitments>(.*)</SvcCommitments>', $services[$i], $tregs);

$time = $tregs[1];

$time = preg_replace('/Weeks$/', MODULE_SHIPPING_USPS_TEXT_WEEKS, $time);

$time = preg_replace('/Days$/', MODULE_SHIPPING_USPS_TEXT_DAYS, $time);

$time = preg_replace('/Day$/', MODULE_SHIPPING_USPS_TEXT_DAY, $time);

 

if( !in_array($service, $allowed_types) ) continue;

// EOF: UPS USPS

if (isset($this->service) && ($service != $this->service) ) {

continue;

}

 

$rates[] = array($service => $postage);

// BOF: UPS USPS

if ($time != '') $transittime[$service] = ' (' . $time . ')';

// EOF: UPS USPS

}

}

}

}

 

return ((sizeof($rates) > 0) ? $rates : false);

}

 

function country_list() {

$list = array('AF' => 'Afghanistan',

'AL' => 'Albania',

'DZ' => 'Algeria',

'AD' => 'Andorra',

'AO' => 'Angola',

'AI' => 'Anguilla',

'AG' => 'Antigua and Barbuda',

'AR' => 'Argentina',

'AM' => 'Armenia',

'AW' => 'Aruba',

'AU' => 'Australia',

'AT' => 'Austria',

'AZ' => 'Azerbaijan',

'BS' => 'Bahamas',

'BH' => 'Bahrain',

'BD' => 'Bangladesh',

'BB' => 'Barbados',

'BY' => 'Belarus',

'BE' => 'Belgium',

'BZ' => 'Belize',

'BJ' => 'Benin',

'BM' => 'Bermuda',

'BT' => 'Bhutan',

'BO' => 'Bolivia',

'BA' => 'Bosnia-Herzegovina',

'BW' => 'Botswana',

'BR' => 'Brazil',

'VG' => 'British Virgin Islands',

'BN' => 'Brunei Darussalam',

'BG' => 'Bulgaria',

'BF' => 'Burkina Faso',

'MM' => 'Burma',

'BI' => 'Burundi',

'KH' => 'Cambodia',

'CM' => 'Cameroon',

'CA' => 'Canada',

'CV' => 'Cape Verde',

'KY' => 'Cayman Islands',

'CF' => 'Central African Republic',

'TD' => 'Chad',

'CL' => 'Chile',

'CN' => 'China',

'CX' => 'Christmas Island (Australia)',

'CC' => 'Cocos Island (Australia)',

'CO' => 'Colombia',

'KM' => 'Comoros',

'CG' => 'Congo (Brazzaville),Republic of the',

'ZR' => 'Congo, Democratic Republic of the',

'CK' => 'Cook Islands (New Zealand)',

'CR' => 'Costa Rica',

'CI' => 'Cote d\'Ivoire (Ivory Coast)',

'HR' => 'Croatia',

'CU' => 'Cuba',

'CY' => 'Cyprus',

'CZ' => 'Czech Republic',

'DK' => 'Denmark',

'DJ' => 'Djibouti',

'DM' => 'Dominica',

'DO' => 'Dominican Republic',

'TP' => 'East Timor (Indonesia)',

'EC' => 'Ecuador',

'EG' => 'Egypt',

'SV' => 'El Salvador',

'GQ' => 'Equatorial Guinea',

'ER' => 'Eritrea',

'EE' => 'Estonia',

'ET' => 'Ethiopia',

'FK' => 'Falkland Islands',

'FO' => 'Faroe Islands',

'FJ' => 'Fiji',

'FI' => 'Finland',

'FR' => 'France',

'GF' => 'French Guiana',

'PF' => 'French Polynesia',

'GA' => 'Gabon',

'GM' => 'Gambia',

'GE' => 'Georgia, Republic of',

'DE' => 'Germany',

'GH' => 'Ghana',

'GI' => 'Gibraltar',

'GB' => 'Great Britain and Northern Ireland',

'GR' => 'Greece',

'GL' => 'Greenland',

'GD' => 'Grenada',

'GP' => 'Guadeloupe',

'GT' => 'Guatemala',

'GN' => 'Guinea',

'GW' => 'Guinea-Bissau',

'GY' => 'Guyana',

'HT' => 'Haiti',

'HN' => 'Honduras',

'HK' => 'Hong Kong',

'HU' => 'Hungary',

'IS' => 'Iceland',

'IN' => 'India',

'ID' => 'Indonesia',

'IR' => 'Iran',

'IQ' => 'Iraq',

'IE' => 'Ireland',

'IL' => 'Israel',

'IT' => 'Italy',

'JM' => 'Jamaica',

'JP' => 'Japan',

'JO' => 'Jordan',

'KZ' => 'Kazakhstan',

'KE' => 'Kenya',

'KI' => 'Kiribati',

'KW' => 'Kuwait',

'KG' => 'Kyrgyzstan',

'LA' => 'Laos',

'LV' => 'Latvia',

'LB' => 'Lebanon',

'LS' => 'Lesotho',

'LR' => 'Liberia',

'LY' => 'Libya',

'LI' => 'Liechtenstein',

'LT' => 'Lithuania',

'LU' => 'Luxembourg',

'MO' => 'Macao',

'MK' => 'Macedonia, Republic of',

'MG' => 'Madagascar',

'MW' => 'Malawi',

'MY' => 'Malaysia',

'MV' => 'Maldives',

'ML' => 'Mali',

'MT' => 'Malta',

'MQ' => 'Martinique',

'MR' => 'Mauritania',

'MU' => 'Mauritius',

'YT' => 'Mayotte (France)',

'MX' => 'Mexico',

'MD' => 'Moldova',

'MC' => 'Monaco (France)',

'MN' => 'Mongolia',

'MS' => 'Montserrat',

'MA' => 'Morocco',

'MZ' => 'Mozambique',

'NA' => 'Namibia',

'NR' => 'Nauru',

'NP' => 'Nepal',

'NL' => 'Netherlands',

'AN' => 'Netherlands Antilles',

'NC' => 'New Caledonia',

'NZ' => 'New Zealand',

'NI' => 'Nicaragua',

'NE' => 'Niger',

'NG' => 'Nigeria',

'KP' => 'North Korea (Korea, Democratic People\'s Republic of)',

'NO' => 'Norway',

'OM' => 'Oman',

'PK' => 'Pakistan',

'PA' => 'Panama',

'PG' => 'Papua New Guinea',

'PY' => 'Paraguay',

'PE' => 'Peru',

'PH' => 'Philippines',

'PN' => 'Pitcairn Island',

'PL' => 'Poland',

'PT' => 'Portugal',

'QA' => 'Qatar',

'RE' => 'Reunion',

'RO' => 'Romania',

'RU' => 'Russia',

'RW' => 'Rwanda',

'SH' => 'Saint Helena',

'KN' => 'Saint Kitts (St. Christopher and Nevis)',

'LC' => 'Saint Lucia',

'PM' => 'Saint Pierre and Miquelon',

'VC' => 'Saint Vincent and the Grenadines',

'SM' => 'San Marino',

'ST' => 'Sao Tome and Principe',

'SA' => 'Saudi Arabia',

'SN' => 'Senegal',

'YU' => 'Serbia-Montenegro',

'SC' => 'Seychelles',

'SL' => 'Sierra Leone',

'SG' => 'Singapore',

'SK' => 'Slovak Republic',

Jim Bullen - President

The Cigar Hut Group of Companies

 

 

Installed add-ons: (that now need to be upgraded to OSC CE Phoenix)

PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more!

Link to comment
Share on other sites

I sent you an email, but here is my MVS usps.php file for others to see

(Works great for US quotes but doesn't work for international shipments at all, anybody have luck with that?)

Actually the code in my post above DOES work for international quotes!!! Whoopee!

 

BUT I found another bug with the "Checkout without shipping selected" issue

 

when multiple items are selected from multiple vendors, all quotes are presented from either UPS or USPS but if you get to the Payment Confirmation Page and then hit your browsers back button to return to checkout_shipping.php, NONE of the shipping quotes are selected.

 

With the fix posted previously in this thread, that would be no problem, BUT I have one vendor who ships ONLY via USPS so that option is pre-selected as there are no other methods available, but for items with 2 shipping methods available, none are selected and customer can then proceed to check out without paying for shipping on the other items as the fix only checks if ANY shipping method has been selected for any package, not that shipping methods for ALL packages selected.

 

The previous fix in checkout_payment.php is

// if no shipping method has been selected, redirect the customer to the shipping method selection page
 if (!tep_session_is_registered('shipping')) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 }
// MVS
// if no shipping method has been selected, redirect the customer to the shipping method selection page
// Added for CCGV compatibility
if ($cart->content_type !== 'virtual') {
if (!isset($shipping[title])) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}
} else {

} //MVS end

 

any ideas on how to write this to check that ALL MVS packages have shipping selected?

Edited by cigarsforless

Jim Bullen - President

The Cigar Hut Group of Companies

 

 

Installed add-ons: (that now need to be upgraded to OSC CE Phoenix)

PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more!

Link to comment
Share on other sites

I've ported the multi-geozone multi-table (mzmt) shipping module to MVS0.94 and posted to the contribution. Any feedback is welcome.

 

Tony.

 

First excuse me for my poor English...I downloaded your adaptation mzmt for MVS and I have a problem. I differentiated 2 types of products with different shipping conditions. For the first type, I have 2 national grids of weight and for the other 21.

 

This is an extract of my page "Delivery Information":

 

 

Shipping Address

 

Please choose from your address book where you would like the items to be delivered to.

 

Shipping Address:

Philippe E

********

76260 Eu

France

 

Shipping Method

Some products will be shipped from different locations. Please choose a shipping method for each group of products below.

 

Products

SWAN A BLACK COLLAR, the couple

 

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

 

MODULE_SHIPPING_ZONES_INVALID_ZONE

 

Products

INCUBATOR OCTAGON 40

 

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

 

MODULE_SHIPPING_ZONES_INVALID_ZONE

 

I filled my geozones well (with the beginning "shp"). I tested modified a little code but I have errors of the type:

Warning: constant(): Couldn't find constant MODULE_SHIPPING_MZMT_GEOZONE__TEXT_TITLE in f:\program files\easyphp1-8\www\fermedebeaumont.com\includes\modules\vendors_shipping\mzmt.php on line 136

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_MZMT_GEOZONE__MODE_1 in f:\program files\easyphp1-8\www\fermedebeaumont.com\includes\modules\vendors_shipping\mzmt.php on line 139

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_MZMT_GEOZONE__TABLE_1_1 in f:\program files\easyphp1-8\www\fermedebeaumont.com\includes\modules\vendors_shipping\mzmt.php on line 153

.....

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