Latest News: (loading..)
blucollarguy

Multi_Vendor_Shipping new thread

4,998 posts in this topic

I am planning on integrating MultiVendorShip in Vendors_Auto_Email and am open for input. Has any one gotten the original Multi_Vendor_Shipping mod to work? I have seen a few requests for help, but no replies. I have just installed it and am going through the errors to see if I can get it working. All input and suggestions are welcome and needed, this will be very valuable to me as well as many other folks I think. What do you think? :mellow:

 

Code in development is located here

Edited by Johnson
SwapAwainddiZ likes this

Share this post


Link to post
Share on other sites

Craig;

 

I am thrilled that someone is looking at this again. I've been trying to find the time (and the code-writing ability, which is even more difficult) to do something with this.

 

As I understand it, the original contribution was independant from any other shipping modules and allowed only for a single shipping method per product (and only one option within the selected method). If something could be written that would present all installed shipping modules on the item addition page in admin and allow for selection of multiple methods for any given item, that would be a HUGE step in the right direction.

 

With that ability on the item page, one could add as many shipping modules as needed to accomodate their various needs for all products and then select the appropriate module(s) when adding products.

 

Examples:

 

Item A: Ships from your location and can be shipped via UPS or USPS using any available service offered by those carrriers to any destination

Solution: Select the standard UPS and USPS modules.

 

Item B: Ships from your supplier's location and only via UPS

Solution: Select your customized UPS module which has your supplier's ZIP code set as the origin.

 

Item C: Ships via truck at a flat rate only to the continental US, all other destinations require a specific quote

Solution: Select your customized flat rate module which produces the flat rate when appropriate or a "Contact us for shipping quote" message if the delivery address is outside continental US

 

Item D: Ships from your location but is an oversized package

Solution: Select your UPSXML with dimensional support module which will yield appropriate rates for the oversized package.

(I still have hopes of eventually doing something with the USPS module that would accomodate oversized packages - this will have to be done within osC though, since the USPS API does not support a direct submission of dimensions. I currently have tables for all countries which show the various maximum weights and sizes allowed by USPS and, with a little guidance, could probably help to write this)

 

Then, of course, if the customer's shopping cart has a product mix in it that dictates more than one shipping method must be used, a way to effectively present the shipping to them will have to be solved.

Share this post


Link to post
Share on other sites

I'm gonna give it a shot. I am no coding genius but I may be able to figure it out with a little help here and there. the features you write about are exactly the functionality I am hoping to accomplish. The way I hope to get this done is to tie each product to a "Vendor". Each Vendor would have specific selectable shipping methods available, and at checkout, each would reconcile to one clean presentation to the customer. So, one would set the methods available from the "Vendors" page which would include package origin, and then simply select a vendor from a dropdown in the prod add page. I am using this already in my contrib "Vendors_Auto_Email" and hope to add the shipping functionality. You can see what you think of the layout i "Vendors_Auto_Email" by downloading it from the link in my sig. If you don't want to send emails just leave you vendors set to "0" which is the default setting for "no email". If you there is anything else you can help with let me know, and keep an eye out for my screams for help. Thanks, Craig. :)

Share this post


Link to post
Share on other sites

I believe I found a conflict with multi vendor shipping & First Item $X, Additional Items $Y Shipping. I don't think it's so much an issue with multi vendor shipping though - I haven't really delved into it, but I think the first item $x module has to be updated to say "only items with this shipping_type should be included in the count."

Share this post


Link to post
Share on other sites

Thanks Michael, I will add this to my notes and keep an eye out for this type of conflict. Craig.

Share this post


Link to post
Share on other sites

I'm not sure which Multi Vendor Shipping contrib you were talking about originally (there are two, look here).

 

Anyway, I've been toying around with the Enhanced Multi-Vendor Shipping (EMVS) Contrib this week, and have gotten it to work, although not perfectly.

 

Concerning the post by Spoot (two posts up), there is an issue like this in EMVS. EMVS allows for you to specifiy an "Indv. Shipping Price" and an "Each Additional Price" for every item. However, these prices are only used in the shipping calculation if the Products Shipping Method for that product is set to "Individual Shipping".

 

However, I also found another error with this today. If you have two items in your shopping cart, and one of them ships via Individual Shipping (and the other uses, say, FedEx), then the calculated shipping will end up being the FedEx price for the one item, plus the Individual Shipping price for both of the items. This is due to how the Individual Shipping Price is calculated.

 

Anyway, I would go into more detail, but don't want to waste the time because I'm not sure if others here are even using EMVS. I also don't really know much about the differences between the two (for all I know they might be the same thing).

Share this post


Link to post
Share on other sites

Hi Craig, yes EMVS was a MultiVendor mod, or update. I have been going through the code to see how these folks went about things in these versions. My plan is to get as close as possible to the basic outline that Stuart wrote about in a previous post here. I appreciate a great deal your input, especially with known bugs or scripts errors since I am hacking this code to use for my version. I am going to link to "shipping origin" through each product being tied to a vendor. I hope to be able to create a script that will enabel us to select which INSTALLED shipping modules can be used for each vendor. If you have any suggestions or comments on how we can get this working I am open for all. I will be integrating this into "Vendors_Auto_Email" since I have already created the ability to link each product to a vendor in that code. If you want to see how I have done things there you can install it without using the email function since you can enter Vendors and specify NOT to send order emails. thanks for the input so far, Craig. :)

 

btw-Cool name you got there!

Share this post


Link to post
Share on other sites

A question for those following this dream of a contribution. Should we try to create the possibility of the option of showing the cusotmer separated shipping quotes?

Example: "Your order contains items that may ship from separate locations, the shipping options for these items are:

Item #1

Item #2 UPS gnd $23.32

UPS 3dc $29.50

UPS 2ds $34.25 please select one

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

Item #3 UPS gnd $15.32

UPS 3dc $19.50

UPS 2ds $24.25

FEDEX $24.75

USPS $19.00 please select one

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

total shipping - $(from adding selected for items 1 and 2 plus selected for item 3).

 

This would tell the customer that items #1 and #2 will ship from the same location and that item #3 would ship from another location and give them the choices for shipping that have been enabled for the vendor tied to the given products in the order. (obviously, #1 and #2 are from the same vendor, and #3 is from another). This would eliminate the conflict that would occur if products from vendors with different shippers enabled were in the order. How else could we sort which shippers to obtain a quote from? The more thoughts on this the better. Please let me have your opinions. Keep in mind that I can not guarrantee that I will be able to accomplish all of this, but I have to try. Craig.

Share this post


Link to post
Share on other sites

Craig;

 

I don't see any way around presenting separate shipments to the customer, else they won't be able to select their shipping preference for those shipments that offer them an option. It's probably also advisable to show them which items are in which shipment.

 

One might present it as:

The items in your order ship either from different locations or via different methods. Please select (if options are available) your preferred shipping method for each shipment.

 

Shipment 1:

Product: (model) Description, (model) Description

Shipping Options: Method 1 - Option 1  Price  (select box)

                                              Option 2  Price  (select box)

                                              Option 3  Price  (select box)

                              Method 2 - Option 1  Price  (select box)

                                              Option 2  Price  (select box)

 

Shipment 2:

Product: (model) Description

Shipping Options: Method 1 - Option 1  Price  (select box)

 

Total Shipping for selected methods:  Total Price

All of this could appear only on the shipping page and then just a combined shipping total on the order confirmation page (Of course, the admin view of the order would need to show the shipping method details and which items were split into each shipment, so maybe showing the items per shipment on the confirmation page is advisable. I suspect that it is also a good idea for the customer to be able to see the shipping details on any page shipping is presented). An intelligent decision by the cart is also required so that if an order all goes in one shipment, the available options are shown just as they are now, without any of the above multiple shipment related 'stuff'.

 

The total shipping entry would need to update either upon selection of the various options or with an 'update' link.

Share this post


Link to post
Share on other sites

I agree Stuart, and that will be the direction in which I will work. It is evolving slowly. There are so many possible ways of doing this that I am trying to let this evolve rather than be too stringent with a plan, but I think I will end up without using an additional shipping module to handle this. I believe I can use all installed shipping modules with the "origin zipcode" being pulled from the Vendors table along with any additional fees or charges one might want to add for any given Vendor. How to present all of this to the customer and store the info in the orders table will be difficult. I am hoping to have some results this weekend. (some basic functionality). LOL, I may be able to do all this, then again, I may fail completely and have to start over LOLOLOLLOLOLOLOLOL!!!! :D

Share this post


Link to post
Share on other sites
I believe I can use all installed shipping modules with the "origin zipcode" being pulled from the Vendors table along with any additional fees or charges one might want to add for any given Vendor.

Craig;

 

That's an excellent thought that never occurred to me. If you have a vendors table in which you can specify additional fees or charges, it could be used for any number of purposes, such as:

 

Separating Handling fees from shipping charges

Accomodating additional charge for oversized packages if you are using shipping methods that don't deal with dimensions.

 

Since the "Vendors" don't have to necessarily be actual different vendors, this feature would give you a lot of flexibility for dealing with odd charges that you don't want to apply to an entire shipping module or show as part of your product price!

 

You are indeed tackling a large, complex issue here, but one that will greatly enhance the shipping capabilities of osC, so any help I can give is there (but my php coding abailities are limited to finding something already written that does what I want it to and then copying it into the specific format that I'm looking to achieve or, on a good day, actually writing a couple of lines from scratch). :o

Share this post


Link to post
Share on other sites

Thanks for the support Stuart, with some work and some help I think I can get this done. I had not thought about using the vendor table without actually using different vendors, but your right, one could create vendors for product specific purposes rather than just Vendor specific products. Quite a thought! And even if I have to use a separate shipping module the way the original MVS was using one, I am still going for this same type of functionality, so we will see!

Share this post


Link to post
Share on other sites

I am very interested in something like this. I have played with MVS in the past but it didn't work the way I needed it to. Something like this is on my todo list, so if you need any help let me know.

Share this post


Link to post
Share on other sites

Great Dax, I am always in need of help! While I am here I will post a small update on progress. I am slowly working the needed methodology. First, we need to build the "product" list that is sent to each shipping module a little differently thatn is currently implemented. It needs to be a "Vendors Products List" so that we can quote by Vendor not by product alone. I worked out the basic code last night to create the first leg of this list. I was very pleased I received no errors from this array. From here I will need to create a new variable, multiple zipcodes to then pass to thet shipping modules along with any added fees. The fees will not be very difficult I think since they can be added separately from the shipping modules themselves. I am not sure still about how much code work will be needed in each module if any. I hope to be able to fool each module so as to avoid the need to hack the code in each individual module.

So any way, this was a good start for me since until last night I was still not entirely sure of quite how to process all the needed vendor info. It is becoming clearer though. Any thoughts? Anyone? I will hopefully have time this weekend to get much done. Craig :D)

Share this post


Link to post
Share on other sites

Ok folks, I'm getting some strange results. I have tracked down where we need to add or modify the info we need for the "Vendor Shipping". In catalog/includes/classes/shopping_cart.php, all the products info is collected and sorted such to be passed to the shipping modules, then the "class" shipping.php collects and sorts the shipping modules to be used for the quotes. So, these 2 files will need to be modified. Or I can try to create a new "class" to handle the functions we need. The code would be much cleaner if I can modify rather than create. That in mind, my plan is to create a "vendor" list rather than just a "product" list. Then pass the needed info on. The problem I am having is that the tables don't seem to be linking properly with the code I am used to using, the following code structure works in several other mods I have done:

// products price <-----mlti_vendor v.products_ship_method,

$product_query = tep_db_query("select v.vendors_id, v.vendors_name, v.vendors_zipcode, v.handling_charge, p.products_id, p.products_price, p.products_tax_class_id, p.products_weight from products p, vendors v where v.vendors_id=p.vendors_id and p.products_id = '" . (int)$products_id . "'");

However, this is returning this message:

1054 - Unknown column 'v.handling_charge' in 'field list'

 

select v.vendors_id, v.vendors_name, v.vendors_zipcode, v.handling_charge, p.products_id, p.products_price, p.products_tax_class_id, p.products_weight from products p, vendors v where v.vendors_id=p.vendors_id and p.products_id = '46'

I know that "handling_charge" exists in the "Vendors" table along with the ID, zipcode, name and many others. So, if it can find these other fields, which apparrently it can since the error starts after processing the others, why is it having trouble with "handling_charge" and nothing else? I don't get it. Any ideas anyone?

Share this post


Link to post
Share on other sites

My idiocy can be quite overwhelming at times. Found my error, a space included at the end of the name in the db. DUH! Sometimes you just have to ingnore me.

Share this post


Link to post
Share on other sites

Man this is a pain. Getting the modules to switch the zipcode that is pulled from the DB entry from the store data has been difficult. I am going to take a right turn and try to procede by rewriting the MLTI Vendor Ship contrib to call to "Vendors" table and use the vendors zipcode. I have already tied each product to a vendor through VA_Email, and have altered that table to include the shipping options, S/H, and any other fees one might want. I need to decide if I should enable each shipping method through the Vendors script or the MVS script, this would include which modules to use for each Vendor and set up all options, ship/handling or whatever, per Vendor. Any thoughts anyone? Craig :)

Edited by blucollarguy

Share this post


Link to post
Share on other sites

Just a bit of free-form thinking here... maybe it will help:

 

Product entry page in admin has added fields for

1) Dimensions It may not seem critical to some, but if you ship larger or heavier products, this can be very helpful down the road and with the existing UPSXML and Canada Post mods which I believe both support dimensions. Additionally, the UPSXML has a packaging add-on that would probably be useful to split off so that it could work with other shipping methods as well.

2) Vendor The vendor mod contains the setup page where you are able to specify all of the particulars on a per-vendor basis: Shipping method(s) {important here to allow multiple shipping methods to be selected}, handling fees, origin zipcode, specification of address to send extra email to, etc.

 

All shipping modules remain basically unchanged and are just called to be either enabled or disabled, based on the vendor assigned to a given product. Obviously, modules that rely on an origin zipcode will either have to be duplicated and given different names in the shipping module folder or amended to send the appropriate zipcode via the API for a quote. Multiple products from the same "vendor" are determined first, so that total shipping weight, size and cost can then be determined.

 

The vendor mod itself can either be actual different vendors from which you source your products or it can be different combinations of valid shipping methods, or a combination of both. You are able to dictate, on a per-product basis by selecting the vendor, which shipping methods are available for the product. (Similar to the existing shipping per product mod, but with much more flexibility)

 

The presentation of shipping methods to the customer is such that they see a separate group of shipping options for each "vendor" that is involved in the total makeup of their order.

 

Sorry if this repeats things from earlier posts - I didn't take the time to review before I wrote this.

Share this post


Link to post
Share on other sites

No need to be sorry, at this point I need input just to make sure I don't lose touch with the possibilities and necessities. You are right on the point though. Each Vendor is individually created and therefor we should be able to define ALL shipping info for each. Which modules to use, shipping charges of any type, max-dimensions, tare weight, whatever! Sounds great huh!? I am trying. Trick that I have had trouble with is that I did not want to re-write each module, but since each use slightly different code to call for the "origin" zipcode, I am beginning to think that it may be necessary. Or, I could go back to the original MltiShip module which was a standalone module that used the other mods code and settings, but each of the others were disabled so that they did not call for quotes themselves. I will take a look at the "per prod" contrib and see if it can at least offer some suggestions by it's functionality. Have you installed VA_Eamil? I am wondering because my intention is to use the "Vendors" table and products link from this script, integrate the shipping info into the Vendors_Auto_Email mod I have already done. I still need to clean up the "Add/Edit Vendor" page, but it functions very well. I have been also working on including the vendor's price and vendor sort to some reports I am using, been very handy to see a complete sales report. Any way if you have any more thoughts on how best to get this done please tell me, If you would rather collaborate through email PM me and I will get back to you. :)

Share this post


Link to post
Share on other sites

Hey Guys:

 

I like where you are going, if I can be of any help I'll be happy to help out. I am very comfirtable coding in PHP.

 

Here are my thoughts after reading this whole thread.

 

1) I think it was a good idea to start talking about how it will be used (called a "Use Case") rather than what features you need to use. The Use Case will flush out the needed features (AKA requirements).

 

2) I think putting up your vision of what it will look like was another good idea. I am a software developer and I always start with a mockup and bounce it off the stake holders.

 

3) I don't use any other contributions in this context, but I want to start selling product from two vendors from two locations and I know the shipping will kill me if I don't show it to the customer and let them choose for themselves while making them aware that this is because the products they chose come from multiple vendors. I like your ascii mockup.

 

4) I like your idea of creating a vendor (or a vendor location) table and I would think that you want to add manufacturers to a vendor location instead of adding a vendor to each product. So if I have a bunch of products made by sony, rca and jvc but they all come from the same vendor (say Vendor Location A) then in an Admin page I would set the manufacturer, sony, rca and jvc to Vendor Location A and then I wouldn't have to touch the Product Page at all, assuming my products already have the manufacturer set. In the check out page I would query using the product_ids to find out which manufacturers are involved in the cart contents and how many vendor locations the whole orders has. Let's just say it has 2. Then I would get the zip codes for each of those 2 vendor locations and then I would separate the order by these 2 locations and add the weight leaving these 2 locations, then loop twice on the "Choose Shipping" page in the Checkout process, each time it would get a quote for the separated weight and the Vendor's Location as the origin and the customer's shipping address (much like it does now. You could also indicate this is going to happen in the shopping cart by displaying that there are multiple vendor locations involved in the contents of your cart.

 

Am I oversimplifying it?

 

I'll support you any way I can!!

 

Joey

Share this post


Link to post
Share on other sites

Joey;

 

First, let me say that I am excited to have someone else express an interest in getting this developed. As I am not a great amount of use when it comes to writing code, I was starting to worry that Craig might get that entire chore dumped solely in his lap!

 

I wouldn't necessarily say that you are oversimplifying the desired scenario - the simpler, the better - as long as the desired results and/or capabilities are achieved.

 

I would offer an observation that might have a bearing on some people's use of what is being proposed:

 

If one has a given manufacturer that can be sourced from more than one vendor and that choice is made based on who has a given product available on any given day, then to utilize a manufacturer assignment to vendor format would create some problems. I don't think it's a bad idea, just that there are some situations in which it would not work. I personally don't see any problem with adding one more field to the Product Page (which won't be there at all for people who have no need for the type of modification we are discussing here, because they will not have installed it). Could not a manufacturer be synonymous with a vendor if one always ships all of that manufacturer's products from the same vendor?

 

I guess from a selfish standpoint I should point out that my primary desire in the development of this idea is to be able to dictate, on a per item basis, which shipping options will be allowed to be shown to the customer. This stems from having products from the same manufacturer, some of which can ship "any ol' way" and others which can only be shipped by truck freight, due to their weight and/or size. The idea of having one additional field on the product page where I could make that determination seemed like just the ticket to solve that problem.

 

Again, I'm thrilled to have another brain working on this, let's keep the discussion lively and moving forward! ;)

Share this post


Link to post
Share on other sites

Awesome Joey, I will need the help working out the code for this as I have already started and stopped many different attempts from different directions. I think the problem with adding Vendors to each product from a separate page in the admin would be time involved during new product additions. The way I am currently tieing prods to Vendors (and therefore each location, would happen in prod add screen the same way you tie a manufacturer, from a dropdown) and this seems a logical spot since you will have the option with every new prod every time you add or edit a prod. The rest of what you have written is exactly what we want to accomplish. I have already created a Vendors table and the ability to tie each prod to a vendor in my contrib Vendors_Auto_Email. My plan has been to simply add the shipping info to that table and everything will happen at once. One does not have to send the Vendor any Email to use the V_A_Email contrib so it seems an easy step to use this as the starting point where to store the ship info. If you can would like to see how I am doing this you can download V_A_Email from the link in my signature. I would appreciate your coding help a great deal so let me know what you think. A lot of people can get a lot of value from this functionality I think, I know I will and many others who have already contacted me. If you have the time I can certainly use some guidance with this code. Replacing the zipcode from the STORE with the zipcodez from the Vendors has been difficult since each shop module is a little different and I fear a rewrite of each module would be needed. What do you think? Thanks again for the input, Joey. Craig :)

Share this post


Link to post
Share on other sites

Another thought. We would probably need an additional "fee" field in the prod screen for misc fees. For instance: Vendor's Prod A requires custom packaging, Vendor charges $10.00 for this packaging, and all shipping options are the same as all other prods from this Vendor. This would need to be implemented per prod not per Vendor. I have not looked at the "Per Prod Ship" cnotrib but I would assume that this is done in some way in that contrib. This does not seem overly difficult, but would need to be included in the shipping calls in each quote. Thoughts?

Share this post


Link to post
Share on other sites

Manufacturer thoughts. We might be able to tie manufacturers to vendors as an "option". This had not occured to me before, but it could be very useful to be able to not only get the quote from whichever Vendor has the given manufacturers prod available but also to sort the order in kind. Availability checks would be needed, I think. I think this would need to be much deeper than the shipping mod itself, though. If all of manufacturer B's prods only come from Vendor C, this would be, in theory, not that difficult to a achieve, I think. While working on VAEmail I was a bit surprised as to how simple it was to tie each prod to a Vendor. Then calling that information for use in the email was what gave me the most difficulty. And, here again, this is what is causing my frustration with my early attempts with this MVS mod. Adding the info to be available is relatively easy, getting and using properly is the tricky part. Just thoughts bouncing around thoughts in an otherwise empty mind.

Share this post


Link to post
Share on other sites

Each shipping module is going to need some code change since most use a constant to get the origin zip. in the modules I have looked at, it should only be 2 line change.

 

$country_name = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
     $this->_Origin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);

 

changed to

global $origininfo;
$country_name = tep_get_countries($origininfo['country'], true);
     $this->_Origin($origininfo['zipcode'], $country_name['countries_iso_code_2']);

 

the key here is rewriting the shipping class to change the value of $origininfo before calling each need module.

 

the shipping class uses the cart class to get the products and coresponding vendors, it sorts the items by vendor, adds up the weights and calls the valid shipping modules for each vendor. it then returns the totals of all the different items and methods.

 

Now if I just had some time I would code it....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now