Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

Hi,

    Thanks for this wonderful contribution, I have been looking for something like this for some time now. I have installed both the catalog and the admin sides without any fatal errors. However I do have one problem, I have succesfully created two vendors but when I try to "manage" the shipping options there is no option to install any of the modules, a picture is worth a thousand words so I included a few screenshots. I also do not see the UPS module.

 

Thanks for the help,

Marc

 

vendor_manager.gif

That is from my error noted a post or 2 above yours. The UPSXML module is looking for "xmldocument.php". IF you are giong to use the upsxml module, Look in the "MVS_Options" folder included in the package, you will find the original UPSXML contribution, copy xmldocument.php to BOTH respective directories, there are 2 to be copied. The other fix is to simply remove upsxml.php from the catalog/includes/modules/vendors_shipping/ DIRECTORY. I will have this problem fixed with the next release.

That should get you going, 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

Perhaps you can help me with this.. I want to be able to limit teh UPS (XML) module to 50 boxes as that's the limit. If the order's (from a particular location that is, not total order) over 50 boxes, set the module as disabled.

 

I've got it disabling itself based on the TOTAL order weight, but with MVS what would be the best way to go about this to check the number of boxes per location? below are the changes I'm using currently to check the cart's total weight. I generally use a 10% tare weight so that's how I got the number it's checking against.

 

Find in "includes/modules/vendors_shipping/upsxml.php":

 ? ?var $code, $title, $description, $icon, $enabled, $types, $boxcount;

And REPLACE with:

 ? ?var $code, $title, $description, $icon, $enabled, $types, $boxcount, $enabled_weight;

Find in "includes/modules/vendors_shipping/upsxml.php":

 ? ? ? ?$this->timeintransit = '0';
? ? ? ?$this->today = date("Ymd");
// ? ? ? ?$this->host = ((constant('MODULE_SHIPPING_UPSXML_RATES_TEST_MODE_' . $vendors_id) == 'Test') ? 'wwwcie.ups.com' : 'wwwcie.ups.com');

And BELOW that add:

$this->enabled_weight = $cart->show_weight();

Find in "includes/modules/vendors_shipping/upsxml.php":

 ? ? ?return $this->enabled;
? ?}

? ?function zones($vendors_id='1') {

And ABOVE that add:

 ? ? ?// Limit to 7500lbs (6818lbs before 10% tare).
? ? ?// Should be limited to 50 boxes, rather than to a weight limit.
? ? ?if ($this->enabled_weight > 6818) {
? ? ? ?$this->enabled = false;
? ? ?}

Not doing exactly what I want, but is disabling the module on very large orders. Only problem being, it's using the total cart's weight to determine it, rather than on a per-vendor basis and by number of boxes. it's good for now, but would be nice to get it to calculate the number of boxes and use that to determine whether or not to disable it on a per-vendor basis.

 

This can be applied to other modules as well and I may very well need to do that, but UPS was the one that was either timing out on really large orders or giving an error about being over 50 boxes.

 

Thanks,

James

Edited by Majiks
Link to comment
Share on other sites

Try changing the Enabled method in upsxml.php to this:

    function enabled($vendors_id='1') {
     global $shipping_num_boxes;
     $this->enabled = false;
     $status = constant('MODULE_SHIPPING_UPSXML_RATES_STATUS_' . $vendors_id);
     if (isset ($status) && $status != '' && $shipping_num_boxes <= 50) {
       $this->enabled = (($status == 'True') ? true : false);
     }
     return $this->enabled;
   }

This should work when the module is called to get a quote. There may be unintentional effects when the module is used for other purposes (such as in the Admin.) Please test this to make certain it doesn't break other functionality.

 

Regards

Jim

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

Link to comment
Share on other sites

Try changing the Enabled method in upsxml.php to this:

 ? ?function enabled($vendors_id='1') {
? ? ?global $shipping_num_boxes;
? ? ?$this->enabled = false;
? ? ?$status = constant('MODULE_SHIPPING_UPSXML_RATES_STATUS_' . $vendors_id);
? ? ?if (isset ($status) && $status != '' && $shipping_num_boxes <= 50) {
? ? ? ?$this->enabled = (($status == 'True') ? true : false);
? ? ?}
? ? ?return $this->enabled;
? ?}

This should work when the module is called to get a quote. There may be unintentional effects when the module is used for other purposes (such as in the Admin.) Please test this to make certain it doesn't break other functionality.

 

Regards

Jim

That appears to be working fine. It was late when I was trying to do it last night and I apaprently forgot to declare the global for $shipping_num_boxes so it was undefined. 8-)

 

Will have to add this to my FedEx module as well now and make it an option in the Admin panel. That's easy enough to do though. :)

 

Thanks,

James

Edited by Majiks
Link to comment
Share on other sites

Hello All,

 

I just did the admin and other install for MVS. I am getting an error when I try to open admin using index.php:

 

vendor_configuration does not exist:

 

select configuration_key as cfgKey, configuration_value as cfgValue from vendor_configuration

 

 

I checked to make sure each file was located in the correct folder. I am also trying to use easypopulate with this app.

 

Steve

 

That appears to be working fine.? It was late when I was trying to do it last night and I apaprently forgot to declare the global for $shipping_num_boxes so it was undefined. 8-)

 

Will have to add this to my FedEx module as well now and make it an option in the Admin panel.? That's easy enough to do though. :)

 

Thanks,

James

Edited by metricbikes
Link to comment
Share on other sites

Alright, I've added an Amin-side option for maximum boxes in the UPS(XML) module which can be set or left to 0 to disable checking. I've tested this and is working no problems so far. This can obviously be done the same way for other modules.

 

Find in "includes/modules/vendors_shipping/upsxml.php":

 ? ?function enabled($vendors_id='1') {
? ? ?$this->enabled = false;
? ? ?$status = @constant('MODULE_SHIPPING_UPSXML_RATES_STATUS_' . $vendors_id);
? ? ?if (isset ($status) && $status != '') {
? ? ? ?$this->enabled = (($status == 'True') ? true : false);
? ? ?}

And REPLACE with:

 ? ?function enabled($vendors_id='1') {
? ? ?global $shipping_num_boxes;
? ? ?$this->enabled = false;
? ? ?$status = @constant('MODULE_SHIPPING_UPSXML_RATES_STATUS_' . $vendors_id);
? ? ?$max_boxes = @constant('MODULE_SHIPPING_UPSXML_RATES_MAX_BOXES_' . $vendors_id);
? ? ?if (isset($status) && $status != '' && (!isset($max_boxes) OR (isset($max_boxes) && (($max_boxes != 0 && $shipping_num_boxes <= $max_boxes) OR $max_boxes == 0)))) {
? ? ? ?$this->enabled = (($status == 'True') ? true : false);
? ? ?}

Find in "includes/modules/vendors_shipping/upsxml.php":

 ? ? ?tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, vendors_id) values ('Shipping Delay', 'SHIPPING_DAYS_DELAY_" . $vendors_id . "', '1', 'How many days from when an order is placed to when you ship it (Decimals are allowed). Arrival date estimations are based on this value.', '6', '21', NULL, now(), NULL, NULL, '" . $vendors_id . "')");

And BELOW that add:

 ? ? ?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 ('Maximum Number of Boxes', 'MODULE_SHIPPING_UPSXML_RATES_MAX_BOXES_" . $vendors_id . "', '0', 'Maximum number of boxes before disabling module. ?Set to 0 to disable checking.', '6', '22', now(), '" . $vendors_id . "')");

Find in "includes/modules/vendors_shipping/upsxml.php":

 ? ? ? ? ? ? ? ? ? 'MODULE_SHIPPING_UPSXML_TYPES_' . $vendors_id,
? ? ? ? ? ? ? ? ? 'SHIPPING_DAYS_DELAY_' . $vendors_id
                 );

And REPLACE with:

 ? ? ? ? ? ? ? ? ? 'MODULE_SHIPPING_UPSXML_TYPES_' . $vendors_id,
? ? ? ? ? ? ? ? ? 'SHIPPING_DAYS_DELAY_' . $vendors_id,
? ? ? ? ? ? ? ? ? 'MODULE_SHIPPING_UPSXML_RATES_MAX_BOXES_' . $vendors_id
                 );

~James

Edited by Majiks
Link to comment
Share on other sites

I am just new to the MVS but it seems to be exactly what I want to test for the production release. I am noticing that the admin install and catalog install already have the changes mentioned in the files to edit section of these docs. Someone has already done the hard work - thanks. Is this correct?

Link to comment
Share on other sites

I am just new to the MVS but it seems to be exactly what I want to test for the production release. I am noticing that the admin install and catalog install already have the changes mentioned in the files to edit section of these docs. Someone has already done the hard work - thanks. Is this correct?

Yes Steve, that is right. We already have the breakdown of each edit for each file. And also YES, the hard work has already been done, thats why we released the package. This is a very capable mod, I'm sure once you get it installed you will get some very valuable use out of it, as we do.

 

Good Luck with the install, Craig :)

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

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

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

Hello Craig!

 

Thanks for the reply.

 

The problem I seem to be having is with the easypopulate side of the equation. Is there a sample file with required fields that easypopulate can model after? Is there a easypopulate.php file that can already work with MVS?

 

I am getting this error even after I add new columns in my easypopulate spreadsheet.

 

1054 - Unknown column 'p.products_qty_blocks' in 'field list'

 

SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_price as v_products_price, p.products_qty_blocks as v_products_qty_blocks, p.products_weight as v_products_weight, p.products_date_added as v_date_avail, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, p.distributors_id as v_distributors_id, subc.categories_id as v_categories_id FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND p.products_model = '101745' AND ptoc.categories_id = subc.categories_id

 

 

Steve

 

[

quote=blucollarguy,May 14 2005, 01:36 PM]

Yes Steve, that is right. We already have the breakdown of each edit for each file. And also YES, the hard work has already been done, thats why we released the package. This is a very capable mod, I'm sure once you get it installed you will get some very valuable use out of it, as we do.

 

Good Luck with the install, Craig :)

Edited by metricbikes
Link to comment
Share on other sites

Hello All,

 

I am past the mental lapse (instructions are a terrible thing to waste!). Now I am struggling with easypopulate. Where are the categories needed for this mod using easypopulate spreadsheets?

 

Steve

 

 

Hello Craig!

 

Thanks for the reply.

 

The problem I seem to be having is with the easypopulate side of the equation. Is there a sample file with required fields that easypopulate can model after? Is there a easypopulate.php file that can already work with MVS?

 

I am getting this error even after I add new columns in my easypopulate spreadsheet.

 

1054 - Unknown column 'p.products_qty_blocks' in 'field list'

 

SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_price as v_products_price, p.products_qty_blocks as v_products_qty_blocks, p.products_weight as v_products_weight, p.products_date_added as v_date_avail, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, p.distributors_id as v_distributors_id, subc.categories_id as v_categories_id FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND p.products_model = '101745' AND ptoc.categories_id = subc.categories_id

Steve

 

[

quote=blucollarguy,May 14 2005, 01:36 PM]

Yes Steve, that is right. We already have the breakdown of each edit for each file. And also YES, the hard work has already been done, thats why we released the package. This is a very capable mod, I'm sure once you get it installed you will get some very valuable use out of it, as we do.

 

Good Luck with the install, Craig :)

Link to comment
Share on other sites

In ythe distribution, look under MVS_Options/Easypopulate-with-vendor_support/EP_v2_74_MS2. There is a sample output file and readme. If there are issues with this data please let us know.

 

You might also want to look at the mvs.sql file in the main distribution. That covers all of the new database fields for MVS. You may only need to look at the changes to the products table. I'm not actually using easypopulate, so I could be way wrong on this.

 

Regards

Jim

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

Link to comment
Share on other sites

Hello All,

 

I am past the mental lapse (instructions are a terrible thing to waste!). Now I am struggling with easypopulate. Where are the categories needed for this mod using easypopulate spreadsheets?

 

Steve

 

Steve, are you working with the version of EP that was included with the last release of MVS? In the directory "MVS_options", you will find a version that should work with MVS as it is. The error you are getting is probably from one of the many options being enabled that you do not have installed. Check on that issue as well.

 

Let me know if you keep having trouble, 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

Hello Craig,

 

I am getting an unusual error when I go to open the store front:

 

Fatal error: Cannot redeclare tep_set_banner_status() (previously declared in /home/metricbi/public_html/ecommerce/os/catalog/includes/functions/general.php:748) in /home/metricbi/public_html/ecommerce/os/catalog/includes/functions/banner.php on line 15

 

There seems to be a conflict between banner.php and the declaration within the general.php in the mod.

 

Steve

Link to comment
Share on other sites

Hello Craig,

 

I am getting an unusual error when I go to open the store front:

 

Fatal error: Cannot redeclare tep_set_banner_status() (previously declared in /home/metricbi/public_html/ecommerce/os/catalog/includes/functions/general.php:748) in /home/metricbi/public_html/ecommerce/os/catalog/includes/functions/banner.php on line 15

 

There seems to be a conflict between banner.php and the declaration within the general.php in the mod.

 

Steve

Double check that you edited the correct "general.php" file. The one being edited is the one in the admin side of the osC catalog, not catalog side. If not that, then my next guess would be that during your edits in that file(general.php) that you missed a closing bracket ( } ) somewhere. Double check your edits. But, even that is strange since nothing we do with MVS should have any effect on the banner code, but a missing closing bracket could be messing up something else.

 

Good luck Steve, Craig :)

Edited by blucollarguy

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

Hello Craig,

 

Hopefully this is the last issue so I can get the mod online. Here is an error that I am having when I open my store front:

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS): failed to open stream: No such file or directory in /home/metricbi/public_html/ecommerce/os/catalog/index.php on line 296

 

I think this is based on not having closed brackets as you stated.

 

Steve

Link to comment
Share on other sites

Hello Craig,

 

Hopefully this is the last issue so I can get the mod online. Here is an error that I am having when I open my store front:

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS): failed to open stream: No such file or directory in /home/metricbi/public_html/ecommerce/os/catalog/index.php on line 296

 

I think this is based on not having closed brackets as you stated.

 

Steve

This one should be easy. In catalog/includes/filenames.php check that you have this:

define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php';

Apparrently that is not in the file you are using but is being "included" in you "index.php" file.

 

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

Hello Craig,

 

This is a great mod since we do some drop shipping and can just email the order to the vendor. One more question:

 

what is the correct version of easypopulate.php to support the MVS mod? I used the one included but still not getting the vendor related columns. I noticed a contrib that has vendor_mod_populate (or something similar) but still haven't found the version with vendor specific info.

 

What version should be use for the full mod (vendor emails, etc..) Thanks for the great mod and excellent support!

 

Steve

Link to comment
Share on other sites

Hello Craig,

 

One problem I did have when I used the vendor_mod_easypopulate.php which I renamed to easypopulate.php, is that you cannot download a txt file to modify. It gave me this error:

 

download stream at dltype=full from our server.

 

Steve

Link to comment
Share on other sites

Hello Craig,

 

One problem I did have when I used the vendor_mod_easypopulate.php which I renamed to easypopulate.php, is that you cannot download a txt file to modify. It gave me this error:

 

download stream at dltype=full from our server.

 

Steve

Keep in mind that I did not create a seperate link for the Vendor-version download, it is coded into the link:

Download Complete tab-delimited .txt file to edit

 

The line you state as an error is a reference to the type of download you have requested, but I'm not sure why you are not getting the file. I use this version on my own store and it should work. Check that you have made the various configuration changes in the file: lines 20 through 134 need to be adjusted for your store, maybe you had not done that yet. That's the only thing I can think of.

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

Hello Craig,

 

This is probably a simple question but the 'shipping' option seems to overide the vendor preference shipping. For example, I set the vendor shipping to per item $5.00 but the oscommerce 'shipping' tab within admin is set for per item $2.50. This seems to over-ride the vendor preferences. Is there an on off configuration that give precedence to the vendor and not admin shipping?

 

I did get the easypopulate working.

 

Thanks.

Steve

 

Keep in mind that I did not create a seperate link for the Vendor-version download, it is coded into the link:

Download Complete tab-delimited .txt file to edit

 

The line you state as an error is a reference to the type of download you have requested, but I'm not sure why you are not getting the file. I use this version on my own store and it should work. Check that you have made the various configuration changes in the file: lines 20 through 134 need to be adjusted for your store, maybe you had not done that yet. That's the only thing I can think of.

Good luck, Craig :)

Link to comment
Share on other sites

Hello Craig,

 

I found the issue. I had reloaded some fresh php files and it disabled vendor shipping. Thanks again.

 

Steve

 

Hello Craig,

 

This is probably a simple question but the 'shipping' option seems to overide the vendor preference shipping. For example, I set the vendor shipping to per item $5.00 but the oscommerce 'shipping' tab within admin is set for per item $2.50. This seems to over-ride the vendor preferences. Is there an on off configuration that give precedence to the vendor and not admin shipping?

 

I did get the easypopulate working.

 

Thanks.

Steve

Link to comment
Share on other sites

Hello Craig,

 

I am using the vendor shipping but getting this error:

 

Warning: Division by zero in /catalog/includes/classes/vendor_shipping.php on line 93

 

Warning: Division by zero in /catalog/includes/classes/vendor_shipping.php on line 94

 

when I set a per item shipping cost (for example $1.00) and I go to checkout. I am using the MVS with a per item cost = $1.00 and get this error at the top of the page.

 

Thanks.

STeve

Link to comment
Share on other sites

Hello Craig,

 

No matter what method shipping I choose, I still get this error when I begin the check out process.

 

Steve

 

 

 

 

Hello Craig,

 

I am using the vendor shipping but getting this error:

 

Warning: Division by zero in /catalog/includes/classes/vendor_shipping.php on line 93

 

Warning: Division by zero in /catalog/includes/classes/vendor_shipping.php on line 94

 

when I set a per item shipping cost (for example $1.00) and I go to checkout. I am using the MVS with a per item cost = $1.00 and get this error at the top of the page.

 

Thanks.

STeve

Link to comment
Share on other sites

That error indicates that $vendors_data['max_box_weight'] is zero or not filled in. We probably should have a safety check for this. Anyway, the most likely cause is that you have not specified a maximum weight for this particular vendor. Check your Vendors and add values as appropriate.

 

Regards

Jim

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

Link to comment
Share on other sites

Added code to prevent getting the "divide by Zero" error -- find in includes/classes/vendor_shipping.php (line 84):

        $vendors_data = tep_db_fetch_array($vendors_data_query);  //Only the row of the table for this vendor

and add immediately after:

        if ($vendors_data['max_box_weight'] == 0) $vendors_data['max_box_weight'] = 1000000;

One more bug squashed. :P

 

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