Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

BlueCollarGuy,

 

I have been waiting sooooo loooong for this. I have had MVS on my live store in one form or another for several months, maybe a year. And while it does work, it is VERY limited. Last I heard Tahuti and MoonLitSun were working on privately, but I haven't heard anything from either of them in several months and really thought they had given up on the project. I can't tell you how happy I am that you're working on this.

 

I have two test stores in addition to my live store and I'm going to download and install your code and see waht happens. I'm no coder, but I'll do whatever I can to help this project move forward.

 

Thanks

Rick Knight

Take a look at the code Chemo put up and see what you get. Hopefully things will move quickly from here. Jim's work seems to have created a bit of a breakthrough so hopefully we will have more progress soon. Stay tuned! 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 missed a file when I was putting the ZIP together. The whole thing is now available at the contribution test page. If you already have the previous package, you only need to install catalog/includes/classes/shipping.php. All the other files are unchanged.

 

As to known issues, Craig has already found bugs if no shipping modules are installed. I have a fix for this in mind; just need time to code it.

 

Any and all other bugs and fixes, please post details here.

 

Regards

Jim

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

Link to comment
Share on other sites

BlueCollarGuy, Moonlitsun,

 

Thanks for the replies. I stopped following this several months ago, I guess I have a lot of reading ahead of me!

 

Take a look at the code Chemo put up and see what you get. Hopefully things will move quickly from here. Jim's work seems to have created a bit of a breakthrough so hopefully we will have more progress soon. Stay tuned! Craig :)

Chemo,

 

I downloaded and installed this today and, of course, ran into problems. I have a very heavily modded site and my test sites are also equally heavily modded so I tried to pull the new code from the files in the contribution and I'm sure I made a typo somewhere. I'm going to try again tonight and tomorrow, but I have a couple of questions, should I remove the earlier MVS contribution? And second, more of a request, is it possible to put together a real short "here's what needs to be copied" document?

Link to comment
Share on other sites

You should definitely remove the old MVS contribution. We've gone in a completely different direction with this one.

 

Sorry for the lack of directions, but I have to go pay the bills right now, and I just don't have the time. You should be able to find the modified code by searching for "multiship" in each of the files. I don't really recommend trying to get this to work with a modified site right now, as the interactions may cause additional bugs that will be harder to find. I've already found that there is a problem with the UPS XML module, caused by non-standard code in that module. I do intend to fix things like this for the final release, but right now we are just trying to get the basic mod to run.

 

Regards

Jim

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

Link to comment
Share on other sites

Just reviewing this thread and looks like its going to be a great contrb. It may be a little more than I need.

 

I'm came across this whilst looking for something that would allow me to specify one or more shipping options per product (not necessarily per vendor). Is this the only contrib that will do this or are there other similar completed contribs?

 

Many thanks,

Anthony

Link to comment
Share on other sites

There are at least three other contributions that claim to do what you want. I have tried all of these and was unable to get them to work correctly. If you read back through this thread, several people have posted requests for help with these. You might find that one works well enough for what you need.

 

Regards

Jim

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

Link to comment
Share on other sites

OK first bug report.

 

When i visit the categories page in admin I get the following error.

Warning: constant(): Couldn't find constant MODULE_SHIPPING_QUOTESHIPPING_STATUS in c:\phpdev\www\clients\penlan\admin\categories.php on line 976

 

Ignore the line number its way out, it should be around line 352 in your original file.

 

Also where should I look to get this working with zones?

Link to comment
Share on other sites

The code at that location is a hack. There is an osC function somewhere that does this correctly, I need to find it and fix this.

 

Are you using this code in an unmodified 2.2 MS2? If there are other mods in your code, strange interactions may very well occur. That's what it looks like happened here.

 

As to Zones, that will be handled at the Vendor/Shipper level, along with handling charges and a bunch of other similar items. This has not yet ben coded; we're still in the early stages of this. Please read this thread for things that have been already suggested, then post here if you have some concerns that haven't already been addressed. We are still looking at the final requirements. This is a big project that makes fundamental changes to the way osCommerce handles shipping, and we're still learning what some of these changes need to be.

 

Regards

Jim

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

Link to comment
Share on other sites

Jim,

 

I'm getting this error when I go to checkout...

 

"PHP Fatal error: Cannot redeclare class table in /usr/local/httpd/catalog/includes/modules/shipping/table.php on line 13".

 

Line 13 in ~/table.php reads...

 

"class table {"

 

I've used grep to find another instance of "class table {" but there isn't one so I don't know why I'm getting this error. Could it be bug 2?

 

Thanks

Rick Knight

Link to comment
Share on other sites

Looks like you may be missing a file somewhere. This happens when the old Shipping class is used. That class has been replaced with includes/functions/shipping.php, at least until I get time to rewrite the Shipping class. Which page do you get the error on? That's probably the one that needs to be changed.

 

Regards

Jim

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

Link to comment
Share on other sites

Looks like you may be missing a file somewhere. This happens when the old Shipping class is used. That class has been replaced with includes/functions/shipping.php, at least until I get time to rewrite the Shipping class. Which page do you get the error on? That's probably the one that needs to be changed.

Jim,

 

I was getting the error on "catalog/checkout_shipping.php", but I found the error earlier this morning. I had an extra

require(DIR_WS_CLASSES . 'shipping.php');

in my "catalog/checkout_shipping.php.

 

Now I get the checkout dialog, but without the shipping method box, just the title "Shipping Method" and then the comments box. If I continue with checkout, everything works except there is no charge for shipping. In my shopping cart I can get shipping estimates, so I know my shipping modules are being read at some point. In my server error log I get this error everytime I access checkout_shipping...

 

PHP Warning:  Invalid argument supplied for foreach() in /usr/local/httpd/catalog/checkout_shipping.php on line 372
Line 372 is equivalent to line 257 in your checkout_shipping.php and contains...
// Loop through the quotes for each shipping method
 foreach ($shipping_weight as $shipping_method => $weight) {

I know, I do have other contribs installed, but I get this error with either your checkout_shipping.php or with mine. That doesn't seem to make any difference.

 

Thanks,

Rick Knight

Link to comment
Share on other sites

Comment out all references to

require(DIR_WS_CLASSES . 'shipping.php');
This code is not currently being used. I have plans to resurrect it, but that will not happen until I get the time for some major coding.

 

As to the rest, you have indeed found a bug. I modified includes/classes/shopping_cart.php, then forgot to put it in the distribution. Of course this (minor) change is key to making the whole thing work. I'll go post this to the Contributions section as Version 0.2.2 in a minute.

 

Thanks for the clear bug report. It was just what we needed.

 

Regards

Jim

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

Link to comment
Share on other sites

Jim,

 

I think I found another one. I added the new file, catalog/includes/shopping_cart.php, and ran into another problem. When go to checkout I get a blank screen and this error in my server error.log...

PHP Fatal error:  Call to undefined function: in_cart_mixed() in /usr/local/httpd/catalog/includes/verify_shopping_cart.php on line 38

When I try to access the shopping cart I get a blank box and this error in my error.log...

PHP Fatal error:  Call to undefined function: in_cart_mixed() in /usr/local/httpd/catalog/includes/classes/order.php on line 305

I've verified that function in_cart_mixed is not defined on my system, but I can't tell just where it's being called.

 

Thanks,

Rick Knight

Link to comment
Share on other sites

I just checked; that function is nowhere in my code base. It was probably something added to shopping_cart.php by one of your other mods. You'll need to patch the two versions together.

 

Regards

Jim

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

Link to comment
Share on other sites

Jim,

 

I found the undefined function. It was one of my other contribs, not sure how I overlooked it.

 

Using your catalog/includes/classes/shopping_cart.php and adding a couple of functions I needed for other mods, I was able to get it working. I was able to go all the way through checkout! Now I need to get it to work starting with my code and adding in the Multiship bits.

 

Also, I have not been able to get the array to work correctly in catalog/admin/categories.php. I know it's the way I'm trying to add your new code. When I add new product to my catalog, I get the new shipping method list box, but the shipping method I choose is not inserted into the products table, instead I get the word "Array" no matter what method I've chosen when adding the product. If I manually add the ship method to the table with phpMyAdmin, checkout works fine. I'm not entirely sure what the code in my admin/categories is doing, so I'm not sure just how to make the changes and what I have tried to do hasn't worked. Here's the code, if anyone can take a look and make suggestions?

 

Your code...

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_ship_method, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '" . tep_db_input($product['products_ship_method']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");

My code...

            tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_vendor_sku, products_ship_method, products_image"
             . $new_fields_mo_pics
             . ", products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id"
             . $new_fields
             . ")
             values ('" . $product['products_quantity'] . "', '" . $product['products_model'] . "', '" . $product['products_vendor_sku'] . "', '" . $product['products_ship_method'] . "', '" . $product['products_image']
             . "', '" . $product['products_bimage'] . "',  '" . $product['products_subimage1'] . "',  '" . $product['products_bsubimage1'] . "',  '" . $product['products_subimage2'] . "',  '" . $product['products_bsubimage2'] . "',  '" . $product['products_subimage3'] . "',  '" . $product['products_bsubimage3'] . "',  '" . $product['products_subimage4'] . "',  '" . $product['products_bsubimage4'] . "',  '" . $product['products_subimage5'] . "',  '" . $product['products_bsubimage5'] . "',  '" . $product['products_subimage6'] . "',  '" . $product['products_bsubimage6']
             . "', '" . $product['products_price'] . "', '" . $product['products_cost'] . "', now(), '" . $product['products_date_available'] . "', '" . $product['products_weight'] . "', '0', '" . $product['products_tax_class_id'] . "', '" . $product['manufacturers_id']
             . "', '" . $product['products_price_list']  . "', '" . $product['products_price_rebate'] . "', '" . $product['products_quantity_order_min'] . "', '" . $product['products_quantity_order_units']
             . "', '" . $product['products_discount1'] . "', '" . $product['products_discount2'] . "', '" . $product['products_discount3'] . "', '" . $product['products_discount4'] . "', '" . $product['products_discount1_qty'] . "', '" . $product['products_discount2_qty'] . "', '" . $product['products_discount3_qty'] . "', '" . $product['products_discount4_qty']
             . "', '" . $product['product_is_free'] . "', '" . $product['product_is_call'] . "', '" . $product['product_is_showroom_only'] . "', '" . $product['products_priced_by_attribute'] . "', '" . $product['products_quantity_mixed'] . "', '" . $product['products_discount_percentage'] . "', '" . $product['products_price_excluded']
            . "')");

Also, I added

define('TEXT_PRODUCTS', 'Products: '):

to catalog/includes/languages/english.php

 

Thanks,

Rick Knight

Link to comment
Share on other sites

Jim,

 

I found the undefined function. It was one of my other contribs, not sure how I overlooked it.

 

Using your catalog/includes/classes/shopping_cart.php and adding a couple of functions I needed for other mods, I was able to get it working. I was able to go all the way through checkout! Now I need to get it to work starting with my code and adding in the Multiship bits.

 

Also, I have not been able to get the array to work correctly in catalog/admin/categories.php. I know it's the way I'm trying to add your new code. When I add new product to my catalog, I get the new shipping method list box, but the shipping method I choose is not inserted into the products table, instead I get the word "Array" no matter what method I've chosen when adding the product. If I manually add the ship method to the table with phpMyAdmin, checkout works fine. I'm not entirely sure what the code in my admin/categories is doing, so I'm not sure just how to make the changes and what I have tried to do hasn't worked. Here's the code, if anyone can take a look and make suggestions?

 

Your code...

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_ship_method, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '" . tep_db_input($product['products_ship_method']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");

My code...

            tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_vendor_sku, products_ship_method, products_image"
             . $new_fields_mo_pics
             . ", products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id"
             . $new_fields
             . ")
             values ('" . $product['products_quantity'] . "', '" . $product['products_model'] . "', '" . $product['products_vendor_sku'] . "', '" . $product['products_ship_method'] . "', '" . $product['products_image']
             . "', '" . $product['products_bimage'] . "',  '" . $product['products_subimage1'] . "',  '" . $product['products_bsubimage1'] . "',  '" . $product['products_subimage2'] . "',  '" . $product['products_bsubimage2'] . "',  '" . $product['products_subimage3'] . "',  '" . $product['products_bsubimage3'] . "',  '" . $product['products_subimage4'] . "',  '" . $product['products_bsubimage4'] . "',  '" . $product['products_subimage5'] . "',  '" . $product['products_bsubimage5'] . "',  '" . $product['products_subimage6'] . "',  '" . $product['products_bsubimage6']
             . "', '" . $product['products_price'] . "', '" . $product['products_cost'] . "', now(), '" . $product['products_date_available'] . "', '" . $product['products_weight'] . "', '0', '" . $product['products_tax_class_id'] . "', '" . $product['manufacturers_id']
             . "', '" . $product['products_price_list']  . "', '" . $product['products_price_rebate'] . "', '" . $product['products_quantity_order_min'] . "', '" . $product['products_quantity_order_units']
             . "', '" . $product['products_discount1'] . "', '" . $product['products_discount2'] . "', '" . $product['products_discount3'] . "', '" . $product['products_discount4'] . "', '" . $product['products_discount1_qty'] . "', '" . $product['products_discount2_qty'] . "', '" . $product['products_discount3_qty'] . "', '" . $product['products_discount4_qty']
             . "', '" . $product['product_is_free'] . "', '" . $product['product_is_call'] . "', '" . $product['product_is_showroom_only'] . "', '" . $product['products_priced_by_attribute'] . "', '" . $product['products_quantity_mixed'] . "', '" . $product['products_discount_percentage'] . "', '" . $product['products_price_excluded']
            . "')");

Also, I added

define('TEXT_PRODUCTS', 'Products: '):

to catalog/includes/languages/english.php

 

Thanks,

Rick Knight

 

Rick, Craig here, the obvious that I see(not necessarily the issue, but a possibility) to begin with, is the missing "tep_db_input", but I assume you are able to add products without this particular line anyway. It seems you have another line probably missing elsewhere. A definition somewhere else. For instance,

'products_ship_method' => tep_db_prepare_input($HTTP_POST_VARS['products_ship_method']),

or perhaps a db call elsewhere, around line 642 of Jim's original script:

// multiship - added p.products_ship_method
     $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_ship_method, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

You are not getting the variable to input properly, you know that, and since you are not getting errors, double check all your syntax and spelling, remembering that php sees each variable name very precisely. If you can't find it, email it to me and I will see if I can find it when I get a chance. Good luck, 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

Jim,

 

I've been able to successfully merge your shopping_cart.php with mine and I've corrected all the "undefined function" errors. I'm now able to access my cart with either your files or mine, but now I've run into another problem...

I'm getting this in my error.log...

PHP Fatal error:  Unsupported operand types in /usr/local/httpd/catalog/includes/classes/shipping.php on line 71
This is the code the error is referring to...
        if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) {
         $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT;
       } else {
         $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);
       }

I can't see a problem with the code but, but I'm not a coder. If you have time, could you take a look?

 

Thanks,

Rick Knight

Link to comment
Share on other sites

includes/classes/shipping.php should not even be called. Look through your code for

require(DIR_WS_CLASSES . 'shipping.php');

and comment it out. It should be in the top section of the page where you are getting the errors.

 

I'm going to try to rewrite this class as soon as I get the time. I've got an idea that might solve all the problems we've been having with it -- if it works. Until then, this class is not usable. The functions in includes/functions/shipping.php are a temporary replacement for this class.

 

BTW, osCommerce is not sending me email when somebody posts to this thread, so if I don't answer that doesn't mean that I'm ignoring you. I'll try to check in daily for updates.

 

Regards

Jim

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

Link to comment
Share on other sites

includes/classes/shipping.php should not even be called. Look through your code for
require(DIR_WS_CLASSES . 'shipping.php');

and comment it out. It should be in the top section of the page where you are getting the errors.

Jim,

 

All instances of that have been removed or commented out. Something in my code is calling it but I can't pin it down. Is there a way to trace what the code is doing? So that I can see where it's being called?

 

Thanks,

Rick Knight

Link to comment
Share on other sites

Jim,

 

All instances of that have been removed or commented out. Something in my code is calling it but I can't pin it down. Is there a way to trace what the code is doing? So that I can see where it's being called?

 

Thanks,

Rick Knight

Jim,

 

I found what is/was calling shipping.php, catalog/includes/modules/shipping_estimator.php and catalog/checkout_paypalipn.php. I'm notusing that paypalipn module and I can live without the shipping estimator if needed.

 

I also found the other error I was having with shopping_cart.php. I missed this when I merged your code with my shopping_cart.php...

$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight, products_ship_method " . $new_fields . " from " . TABLE_PRODUCTS . " where products_id='" . (int)$products_id . "'");

Now, back to the ship_methods array in catalog/admin/categories.php.

 

Thanks,

Rick Knight

Link to comment
Share on other sites

If you want to use the shipping estimator, that could be modified to work with this code. I have no idea why Paypal would need to use the shipping class; it should be getting that information passed to it from the checkout page.

 

Regards

Jim

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

Link to comment
Share on other sites

I've been playing with this on one of my offline stores and trying to get shipping FROM multiple zip codes to work and I think I've come up with a workable solution. I'm not totally sure where your'e going with this mod, but I hope it's in a similar direction.

 

What I've been trying to do, and just this morning succeeded at, was getting my shipping modules, ups and usps, to allow me to "hard code" the origin zip code and then install the module multiple times. The trick turned out to be modifying the class, the install and remove functions and a couple of other functions and then saving the modified module with a new, unique name. Then modifying the appropriate language file and saving it with the same name (in the languages directory). This creates a new shipping module which can then be installed in admin, modules, shipping. This may be a bit crude, but it does seem to work in conjunction with this Multi Vendor Shipping module. What would be great would be to have a single shipping module look at the vendors database to get it's zip code, but that is beyond me.

 

Here's one of modified shipping modules and it's language file... (my changes are marked with "Changes for Tampa shipping origin - RWK)

<?php
/*
$Id: ups.php,v 1.54 2003/04/08 23:23:42 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

/*
revised by Fritz Clapp as UPS Choice 1.8 2003/08/02
 filters service types to those selected in admin and saved in 
 configuration table with key MODULE_SHIPPING_UPSTAMPA_TYPES;
 suggests STD service as default for Canada;
 modified error message refers to failure to get quote;

*/

// Changed for Tampa shipping origin - RWK
//  class ups {
 class upstampa {
   var $code, $title, $descrption, $icon, $enabled, $types;

// class constructor
// Changed for Tampa shipping origin - RWK
//    function ups() {
   function upstampa() {
     global $order;
  
// Changed for Tampa shipping origin RWK
//      $this->code = 'ups';
//      $this->title = MODULE_SHIPPING_UPS_TEXT_TITLE;
//      $this->description = MODULE_SHIPPING_UPS_TEXT_DESCRIPTION;
//      $this->sort_order = MODULE_SHIPPING_UPS_SORT_ORDER;
//      $this->icon = DIR_WS_ICONS . 'shipping_ups.gif';
//      $this->tax_class = MODULE_SHIPPING_UPS_TAX_CLASS;
//      $this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true : false);
     
  $this->code = 'upstampa';
     $this->title = MODULE_SHIPPING_UPSTAMPA_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_UPSTAMPA_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_UPSTAMPA_SORT_ORDER;
     $this->icon = DIR_WS_ICONS . 'shipping_ups.gif';
     $this->tax_class = MODULE_SHIPPING_UPSTAMPA_TAX_CLASS;
     $this->enabled = ((MODULE_SHIPPING_UPSTAMPA_STATUS == 'True') ? true : false);

// Changed for Tampa shipping origin RWK
//      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_UPS_ZONE > 0) ) {
     if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_UPSTAMPA_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_UPSTAMPA_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;
       }
     }

     $this->types = array('1DM' => 'Next Day Air Early AM',
                          '1DML' => 'Next Day Air Early AM Letter',
                          '1DA' => 'Next Day Air',
                          '1DAL' => 'Next Day Air Letter',
                          '1DAPI' => 'Next Day Air Intra (Puerto Rico)',
                          '1DP' => 'Next Day Air Saver',
                          '1DPL' => 'Next Day Air Saver Letter',
                          '2DM' => '2nd Day Air AM',
                          '2DML' => '2nd Day Air AM Letter',
                          '2DA' => '2nd Day Air',
                          '2DAL' => '2nd Day Air Letter',
                          '3DS' => '3 Day Select',
                          'GND' => 'Ground',
                          'GNDCOM' => 'Ground Commercial',
                          'GNDRES' => 'Ground Residential',
                          'STD' => 'Canada Standard',
                          'XPR' => 'Worldwide Express',
                          'XPRL' => 'worldwide Express Letter',
                          'XDM' => 'Worldwide Express Plus',
                          'XDML' => 'Worldwide Express Plus Letter',
                          'XPD' => 'Worldwide Expedited');
   }

// class methods
   function quote($method = '') {
     global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes;

     if ( (tep_not_null($method)) && (isset($this->types[$method])) ) {
       $prod = $method;
// BOF: UPS USPS
     } else if ($order->delivery['country']['iso_code_2'] == 'CA') {
    $prod = 'STD';
// EOF: UPS USPS
     } else {
       $prod = 'GNDRES';
     }

     if ($method) $this->_upsAction('3'); // return a single quote

     $this->_upsProduct($prod);

     $country_name = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
// Changed for Tampa shipping origin - RWK
//      $this->_upsOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);
//      $this->_upsDest($order->delivery['postcode'], $order->delivery['country']['iso_code_2']);
//      $this->_upsRate(MODULE_SHIPPING_UPSPICKUP);
//      $this->_upsContainer(MODULE_SHIPPING_UPS_PACKAGE);
//      $this->_upsWeight($shipping_weight);
//      $this->_upsRescom(MODULE_SHIPPING_UPS_RES);
     $this->_upsOrigin(SHIPPING_ORIGIN_ZIP_TAMPA, $country_name['countries_iso_code_2']);
     $this->_upsDest($order->delivery['postcode'], $order->delivery['country']['iso_code_2']);
     $this->_upsRate(MODULE_SHIPPING_UPSTAMPA_PICKUP);
     $this->_upsContainer(MODULE_SHIPPING_UPSTAMPA_PACKAGE);
     $this->_upsWeight($shipping_weight);
     $this->_upsRescom(MODULE_SHIPPING_UPSTAMPA_RES);
     $upsQuote = $this->_upsGetQuote();

     if ( (is_array($upsQuote)) && (sizeof($upsQuote) > 0) ) {
       $this->quotes = array('id' => $this->code,
                             'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)');

       $methods = array();
// BOF: UPS USPS
// Changed for Tampa shipping origin - RWK
//  $allowed_methods = explode(", ", MODULE_SHIPPING_UPS_TYPES);
 $allowed_methods = explode(", ", MODULE_SHIPPING_UPSTAMPA_TYPES);
 $std_rcd = false;
// EOF: UPS USPS
       $qsize = sizeof($upsQuote);
       for ($i=0; $i<$qsize; $i++) {
         list($type, $cost) = each($upsQuote[$i]);
// BOF: UPS USPS
   if ($type=='STD') {
    if ($std_rcd) continue;
    else $std_rcd = true;
	 };
   if (!in_array($type, $allowed_methods)) continue;
// EOF: UPS USPS
         $methods[] = array('id' => $type,
                            'title' => $this->types[$type],
// Changed for Tampa shipping origin - RWK
//                             'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
                            'cost' => ($cost + MODULE_SHIPPING_UPSTAMPA_HANDLING) * $shipping_num_boxes);
       }

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

       if ($this->tax_class > 0) {
         $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
       }
     } else {
/* ORIGINAL
       $this->quotes = array('module' => $this->title,
                             'error' => 'An error occured with the UPS shipping calculations.<br>' . $upsQuote . '<br>If you prefer to use UPS as your shipping method, please contact the store owner.');
*/
// BOF: UPS USPS
       $this->quotes = array('module' => $this->title,
                             'error' => 'We are unable to obtain a rate quote for UPS shipping.<br>Please contact the store if no other alternative is shown.');
// EOF: UPS USPS
     }

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

     return $this->quotes;
   }

/* Changed for Tampa shipping origin    
function check() {
     if (!isset($this->_check)) {
       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_UPS_STATUS'");
       $this->_check = tep_db_num_rows($check_query);
     }
     return $this->_check;
   }

   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 UPS Shipping', 'MODULE_SHIPPING_UPS_STATUS', 'True', 'Do you want to offer UPS 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 ('UPS Pickup Method', 'MODULE_SHIPPING_UPS_PICKUP', 'CC', 'How do you give packages to UPS? CC - Customer Counter, RDP - Daily Pickup, OTP - One Time Pickup, LC - Letter Center, OCA - On Call Air', '6', '0', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('UPS Packaging?', 'MODULE_SHIPPING_UPS_PACKAGE', 'CP', 'CP - Your Packaging, ULE - UPS Letter, UT - UPS Tube, UBE - UPS Express Box', '6', '0', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Residential Delivery?', 'MODULE_SHIPPING_UPS_RES', 'RES', 'Quote for Residential (RES) or Commercial Delivery (COM)', '6', '0', 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_UPS_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_UPS_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_UPS_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 of display.', 'MODULE_SHIPPING_UPS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '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, set_function, date_added) values ( 'Shipping Methods', 'MODULE_SHIPPING_UPS_TYPES', 'Nxt AM,Nxt AM Ltr,Nxt,Nxt Ltr,Nxt PR,Nxt Save,Nxt Save Ltr,2nd AM,2nd AM Ltr,2nd,2nd Ltr,3 Day Select,Ground,Canada,World Xp,World Xp Ltr, World Xp Plus,World Xp Plus Ltr,World Expedite', 'Select the USPS services to be offered.', '6', '13', 'tep_cfg_select_multioption(array(\'1DM\',\'1DML\', \'1DA\', \'1DAL\', \'1DAPI\', \'1DP\', \'1DPL\', \'2DM\', \'2DML\', \'2DA\', \'2DAL\', \'3DS\',\'GND\', \'STD\', \'XPR\', \'XPRL\', \'XDM\', \'XDML\', \'XPD\'), ', now() )");
// EOF: UPS USPS
   }

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

   function keys() {
// BOF: UPS USPS
     return array('MODULE_SHIPPING_UPS_STATUS', 'MODULE_SHIPPING_UPS_PICKUP', 'MODULE_SHIPPING_UPS_PACKAGE', 'MODULE_SHIPPING_UPS_RES', 'MODULE_SHIPPING_UPS_HANDLING', 'MODULE_SHIPPING_UPS_TAX_CLASS', 'MODULE_SHIPPING_UPS_ZONE', 'MODULE_SHIPPING_UPS_SORT_ORDER', 'MODULE_SHIPPING_UPS_TYPES');
// EOF: UPS USPS
End of Changes for Tampa shipping origin */    

function check() {
     if (!isset($this->_check)) {
       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_UPSTAMPA_STATUS'");
       $this->_check = tep_db_num_rows($check_query);
     }
     return $this->_check;
   }

   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 UPS Shipping', 'MODULE_SHIPPING_UPSTAMPA_STATUS', 'True', 'Do you want to offer UPS 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 ('UPS Pickup Method', 'MODULE_SHIPPING_UPSTAMPA_PICKUP', 'CC', 'How do you give packages to UPS? CC - Customer Counter, RDP - Daily Pickup, OTP - One Time Pickup, LC - Letter Center, OCA - On Call Air', '6', '0', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('UPS Packaging?', 'MODULE_SHIPPING_UPSTAMPA_PACKAGE', 'CP', 'CP - Your Packaging, ULE - UPS Letter, UT - UPS Tube, UBE - UPS Express Box', '6', '0', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Residential Delivery?', 'MODULE_SHIPPING_UPSTAMPA_RES', 'RES', 'Quote for Residential (RES) or Commercial Delivery (COM)', '6', '0', 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_UPSTAMPA_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_UPSTAMPA_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_UPSTAMPA_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 of display.', 'MODULE_SHIPPING_UPSTAMPA_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '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, set_function, date_added) values ( 'Shipping Methods', 'MODULE_SHIPPING_UPSTAMPA_TYPES', 'Nxt AM,Nxt AM Ltr,Nxt,Nxt Ltr,Nxt PR,Nxt Save,Nxt Save Ltr,2nd AM,2nd AM Ltr,2nd,2nd Ltr,3 Day Select,Ground,Canada,World Xp,World Xp Ltr, World Xp Plus,World Xp Plus Ltr,World Expedite', 'Select the USPS services to be offered.', '6', '13', 'tep_cfg_select_multioption(array(\'1DM\',\'1DML\', \'1DA\', \'1DAL\', \'1DAPI\', \'1DP\', \'1DPL\', \'2DM\', \'2DML\', \'2DA\', \'2DAL\', \'3DS\',\'GND\', \'STD\', \'XPR\', \'XPRL\', \'XDM\', \'XDML\', \'XPD\'), ', now() )");
// EOF: UPS USPS
   }

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

   function keys() {
// BOF: UPS USPS
     return array('MODULE_SHIPPING_UPSTAMPA_STATUS', 'MODULE_SHIPPING_UPSTAMPA_PICKUP', 'MODULE_SHIPPING_UPSTAMPA_PACKAGE', 'MODULE_SHIPPING_UPSTAMPA_RES', 'MODULE_SHIPPING_UPSTAMPA_HANDLING', 'MODULE_SHIPPING_UPSTAMPA_TAX_CLASS', 'MODULE_SHIPPING_UPSTAMPA_ZONE', 'MODULE_SHIPPING_UPSTAMPA_SORT_ORDER', 'MODULE_SHIPPING_UPSTAMPA_TYPES');
// EOF: UPS USPS
   }

   function _upsProduct($prod){
     $this->_upsProductCode = $prod;
   }

   function _upsOrigin($postal, $country){
     $this->_upsOriginPostalCode = $postal;
     $this->_upsOriginCountryCode = $country;
   }

   function _upsDest($postal, $country){
     $postal = str_replace(' ', '', $postal);

     if ($country == 'US') {
       $this->_upsDestPostalCode = substr($postal, 0, 5);
     } else {
       $this->_upsDestPostalCode = $postal;
     }

     $this->_upsDestCountryCode = $country;
   }

   function _upsRate($foo) {
     switch ($foo) {
       case 'RDP':
         $this->_upsRateCode = 'Regular+Daily+Pickup';
         break;
       case 'OCA':
         $this->_upsRateCode = 'On+Call+Air';
         break;
       case 'OTP':
         $this->_upsRateCode = 'One+Time+Pickup';
         break;
       case 'LC':
         $this->_upsRateCode = 'Letter+Center';
         break;
       case 'CC':
         $this->_upsRateCode = 'Customer+Counter';
         break;
     }
   }

   function _upsContainer($foo) {
     switch ($foo) {
       case 'CP': // Customer Packaging
         $this->_upsContainerCode = '00';
         break;
       case 'ULE': // UPS Letter Envelope
         $this->_upsContainerCode = '01';
         break;
       case 'UT': // UPS Tube
         $this->_upsContainerCode = '03';
         break;
       case 'UEB': // UPS Express Box
         $this->_upsContainerCode = '21';
         break;
       case 'UW25': // UPS Worldwide 25 kilo
         $this->_upsContainerCode = '24';
         break;
       case 'UW10': // UPS Worldwide 10 kilo
         $this->_upsContainerCode = '25';
         break;
     }
   }

   function _upsWeight($foo) {
     $this->_upsPackageWeight = $foo;
   }

   function _upsRescom($foo) {
     switch ($foo) {
       case 'RES': // Residential Address
         $this->_upsResComCode = '1';
         break;
       case 'COM': // Commercial Address
         $this->_upsResComCode = '2';
         break;
     }
   }

   function _upsAction($action) {
     /* 3 - Single Quote
        4 - All Available Quotes */

     $this->_upsActionCode = $action;
   }

   function _upsGetQuote() {
     if (!isset($this->_upsActionCode)) $this->_upsActionCode = '4';

     $request = join('&', array('accept_UPS_license_agreement=yes',
                                '10_action=' . $this->_upsActionCode,
                                '13_product=' . $this->_upsProductCode,
                                '14_origCountry=' . $this->_upsOriginCountryCode,
                                '15_origPostal=' . $this->_upsOriginPostalCode,
                                '19_destPostal=' . $this->_upsDestPostalCode,
                                '22_destCountry=' . $this->_upsDestCountryCode,
                                '23_weight=' . $this->_upsPackageWeight,
                                '47_rate_chart=' . $this->_upsRateCode,
                                '48_container=' . $this->_upsContainerCode,
                                '49_residential=' . $this->_upsResComCode));
     $http = new httpClient();
     if ($http->Connect('www.ups.com', 80)) {
       $http->addHeader('Host', 'www.ups.com');
       $http->addHeader('User-Agent', 'osCommerce');
       $http->addHeader('Connection', 'Close');

       if ($http->Get('/using/services/rave/qcostcgi.cgi?' . $request)) $body = $http->getBody();

       $http->Disconnect();
     } else {
       return 'error';
     }

// BOF: UPS USPS
/*
TAMPA by checking out in the catalog; try a variety of shipping destinations to be sure
your customers will be properly served.  If you are not getting any quotes, try enabling
more alternatives in admin. Make sure your store's postal code is set in Admin ->
Configuration -> Shipping/Packaging, since you won't get any quotes unless there is
a origin that UPS recognizes.

If you STILL don't get any quotes, here is a way to find out exactly what UPS is sending
back in response to rate quote request.  At line 278, you will find this statement in a
comment block: 

   mail('[email protected]','UPS response',$body,'From: <[email protected]>');
*/
// EOF: UPS USPS

     $body_array = explode("\n", $body);

     $returnval = array();
     $errorret = 'error'; // only return error if NO rates returned

     $n = sizeof($body_array);
     for ($i=0; $i<$n; $i++) {
       $result = explode('%', $body_array[$i]);
       $errcode = substr($result[0], -1);
       switch ($errcode) {
         case 3:
           if (is_array($returnval)) $returnval[] = array($result[1] => $result[8]);
           break;
         case 4:
           if (is_array($returnval)) $returnval[] = array($result[1] => $result[8]);
           break;
         case 5:
           $errorret = $result[1];
           break;
         case 6:
           if (is_array($returnval)) $returnval[] = array($result[3] => $result[10]);
           break;
       }
     }
     if (empty($returnval)) $returnval = $errorret;

     return $returnval;
   }
 }
?>

I moved the origin zipcode to this file...

<?php
/*
 $Id: ups.php,v 1.5 2002/11/19 01:48:08 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('MODULE_SHIPPING_UPSTAMPA_TEXT_TITLE', 'United Parcel Service - Tampa');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_DESCRIPTION', 'United Parcel Service - Tampa');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_GND', 'UPS Ground');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_1DM', 'Next Day Air Early AM');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_1DA', 'Next Day Air');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_1DP', 'Next Day Air Saver');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_2DM', '2nd Day Air Early AM');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_3DS', '3 Day Select');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_STD', 'Canada Standard');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_XPR', 'Worldwide Express');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_XDM', 'Worldwide Express Plus');
define('MODULE_SHIPPING_UPSTAMPA_TEXT_OPT_XPD', 'Worldwide Expedited');
define('SHIPPING_ORIGIN_ZIP_TAMPA', '33610');
?>

Now, I just need to solve a problem I have with the shipping_method array in catalog/admin/categories.php.

 

Thanks,

Rick Knight

Link to comment
Share on other sites

Your on track Rick. Exactly what we will be doing once we resolve a few other issues. If you have not yet installed Vendor Auto Email, you should look into, we will be using that as the basis for the Vendor management, and that will be where we get the "origin zip" and other ship info. Good work so far, 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

Your on track Rick. Exactly what we will be doing once we resolve a few other issues. If you have not yet installed Vendor Auto Email, you should look into, we will be using that as the basis for the Vendor management, and that will be where we get the "origin zip" and other ship info. Good work so far, Craig :)

Craig, I just pm'd you but I'll post here also.

 

I found the problem. In my catalog/admin/categories.php I have this...

/* Re-Post all POST'ed variables */
     reset($HTTP_POST_VARS);
     while (list($key, $value) = each($HTTP_POST_VARS)) {
       if (!is_array($HTTP_POST_VARS[$key])) {
         echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
       } else {
         while (list($k, $v) = each($value)) {
           echo tep_draw_hidden_field($key . '[' . $k . ']', htmlspecialchars(stripslashes($v)));
         }
       }
     }
     $languages = tep_get_languages();
     for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
       echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));
       echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));
       echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));
     }

The /catalog/admin/categories.php from this mod has this...

/* Re-Post all POST'ed variables */
     reset($HTTP_POST_VARS);
     while (list($key, $value) = each($HTTP_POST_VARS)) {
       if (!is_array($HTTP_POST_VARS[$key])) {
         echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
       }
     }
     $languages = tep_get_languages();
     for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
       echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));
       echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));
       echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));
     }

Apparently the }else{ statement kills the shipping methods array. I'm goin to look at a stock OSC install and see if the else statement is there or not, but for now, this gets everything in this new Multi Vendor Shipping contrib working for me on my very heavily modded site. I'm going to be doing a bunch of off-line testing and if things keep on working, I'll move this to my live site this weekend.

 

I'll also take a look at the Auto Vendor email contrib. Right now I'm using the Enhanced Vendors contrib and it works except that it doesn't tie to the products DB very well. I was going to fix that, but I'll look at the one mentioned first.

 

Thanks,

Rick Knight

Link to comment
Share on other sites

Hi Rick

 

I would urge you to wait on moving this to your live site. We have been discussing the future of this mod, and it looks like a (nearly) complete rewrite is in the works. We are going to make this a lot easier to set up and use. The result will be a lot better, but it means a lot of new code. We won't be able to support this version at all.

 

If you do decide to use this version, I would advise that you keep a complete backup of your current store. If you decide to update to the new version, it will be a lot easier to go back and start over with the new modifications.

 

Regards

Jim

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

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