Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

I've seen this before on other pages. It was the result of an error in the redirect code that resulted in an endless loop. Firefox is smart enough to pick up on this, but IE is not. Check your edits on that page and any page it redirects to (often itself.)

 

Regards

Jim

 

mmmm....

 

I'm using the order_history.php from MVS exactly?

 

Stephanie

Link to comment
Share on other sites

Glad to hear it's working for you.

 

Regards

Jim

 

 

Jim or Craig,

 

I forgot to ask a questions, can my customers can veiw the orders and history just like regulars?

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

mmmm....

 

I'm using the order_history.php from MVS exactly?

 

Stephanie

It's working here. What version of MVS are you using? There were some bugs in this area in 1.0 that were corrected in 1.1. If you are using 1.0, update your includes/vendor_order_info.php and includes/vendor_order_data.php.

 

Regards

Jim

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

Link to comment
Share on other sites

It's working here. What version of MVS are you using? There were some bugs in this area in 1.0 that were corrected in 1.1. If you are using 1.0, update your includes/vendor_order_info.php and includes/vendor_order_data.php.

 

Regards

Jim

 

k I'll try that thanks :)

Link to comment
Share on other sites

k I'll try that thanks :)

 

Thanks Jim

 

That fixed the catalog/order_history_info.php page, but not the catalog/order_history.php

I am comparing the rest of the files in the update.

 

Stephanie

Link to comment
Share on other sites

Thanks Jim

 

That fixed the catalog/order_history_info.php page, but not the catalog/order_history.php

I am comparing the rest of the files in the update.

 

Stephanie

One thing that might be happening here is that MVS does not alter in any way "order_history.php", which probably means something else, in another file entirely is causing your problem.

 

Also I notice that sometimes this error appears at the shipping method page when there is no choices?

Steph <_<

This sounds like a missing language file edit. It should be in catalog/includes/languages/thelanguageinuse/checkout_shipping.php.

 

If you manually edited your files, double check the one included in the MVS1.1. I am pretty sure it is there. :huh:

 

 

@Craig

 

I've read somewhere in this thread, that using paypal standard MVS will not recognize if the payment is settled correctly or not - meaning: the e.mail send to the vendor is leaving osCommerce without knowing if payment is made or not.

Is that correct? or is there a fix for that.

If not - what payment processors are handled correctly.

 

I can not afford to have the item send by the vendor and pay for it myself.

 

Thank you for an answer.

 

Andreas

In an attempt to deal with this I added the ability to send the email at the point the customer clicks "comfirm", this does mean that the email can be sent without payment being completed however. Unfortunately, PayPal has again changed things, they no longer automatically redirect if you use the PayPal acount optional setting, which means an even higher risk of the customer not returning to your site. This is an issue I personally delt with by using the osC team's IPN module, which is quick and get's it done, the customer may still not return, but it seems a little cleaner.

 

This option is in the admin->shipping/packaging->when to send the order email, the default is Admin, which means only when updated manually or the osC way, which seems to be more and more rare.

 

Good luck all, Craig

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

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

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

I think the zones shipping module could be improved by allowing zones within a country to be specified as shipping zones. An operator ":+" in the example below could be used to include zones within a country in that shipping zone, ":-" to exclude specific zones within a country from the shipping zone...

 

Zone 1 countries:

ES:+(Lugo,Madrid)

Zone 1 table:

3:8.50,7:10.50,99:20.00

Zone 2 countries:

ES:-(Lugo,Madrid),PT

Zone 2 table:

3:8.50,7:10.50,99:20.00

Zone 3 countries:

FR

Zone 3 table:

3:8.50,7:10.50,99:20.00

 

Any thoughts?

 

- Paul -

Link to comment
Share on other sites

I think the zones shipping module could be improved by allowing zones within a country to be specified as shipping zones. An operator ":+" in the example below could be used to include zones within a country in that shipping zone, ":-" to exclude specific zones within a country from the shipping zone...

 

Zone 1 countries:

ES:+(Lugo,Madrid)

Zone 1 table:

3:8.50,7:10.50,99:20.00

Zone 2 countries:

ES:-(Lugo,Madrid),PT

Zone 2 table:

3:8.50,7:10.50,99:20.00

Zone 3 countries:

FR

Zone 3 table:

3:8.50,7:10.50,99:20.00

 

Any thoughts?

 

- Paul -

HMMMMMM

 

Now that is an interesting approach, I had never though of that, I have been trying to work out a method to easily create a zone that includes all countries except one. Haven't worked it out yet.

 

I may work with your approach and see what happens.

 

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

One thing that might be happening here is that MVS does not alter in any way "order_history.php", which probably means something else, in another file entirely is causing your problem.

This sounds like a missing language file edit. It should be in catalog/includes/languages/thelanguageinuse/checkout_shipping.php.

 

If you manually edited your files, double check the one included in the MVS1.1. I am pretty sure it is there.

Good luck all, Craig

 

I got it, my host has it setup so that you have to install oscommerce through their admin panel. And they need to update their copy of OSC. I think somehow I ended up with an old order_history.php from them. I just had to put the current copy of the file in an upload. Who knew? Well thanks for your help.

 

Stephanie :D

Link to comment
Share on other sites

HMMMMMM

 

Now that is an interesting approach, I had never though of that, I have been trying to work out a method to easily create a zone that includes all countries except one. Haven't worked it out yet.

 

I may work with your approach and see what happens.

 

Craig :)

 

Hi Craig.

 

There is a contribution out there to include a "rest of the world" zone... You name the last zone "WORLD" and enter a shipping table for it. The url for the contribution is: http://www.oscommerce.com/community/contributions,2458/

 

 

In includes/modules/vendors_shipping/zones.php, after this bit of code:

 

  for ($i=1; $i<=$this->num_zones($vendors_id); $i++) {
	$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $vendors_id . '_' . $i);
	$country_zones = split("[,]", $countries_table);
	if (in_array($dest_country, $country_zones)) {
	  $dest_zone = $i;
	  break;
	}

 

Add this:

 

// rest of the world
	if ($countries_table == 'WORLD') {
	  $dest_zone = $i;
	  break;
	}
// rest of the world eof

 

Still think it would be great to be able to have shipping zones within countries though.

 

All the best,

 

Paul

Link to comment
Share on other sites

All of that is properly installed, UPS XML works perfect! but FedEX won't

FedEx requires more information than UPS in order to work properly. Have you made any changes to the FedEx module that ships with MVS?

 

Regards

Jim

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

Link to comment
Share on other sites

HMMMMMM

 

Now that is an interesting approach, I had never though of that, I have been trying to work out a method to easily create a zone that includes all countries except one. Haven't worked it out yet.

 

I may work with your approach and see what happens.

 

Craig :)

 

Hi Craig,

 

I've plagiarised a couple of contributions to allow states to be used as zones and have a rest of the world zone. Credit for these goes to Jorge Suarez - Regions Based Rates Shipping Module and Radu Manole - Rest of the world addon.

 

I think there must be a neater way to do this though. For instance, I would rather it used the zone_code abbreviation instead of the full name of the state - can you think of a way to do this?

 

With this mod, if rest of the world zone is needed - WORLD zone should be last...

 

There is a problem in that one customer might abbreviate the state to IN whereas another might enter Indiana. To get around this I have had to use another contribution: Country-state selector ( http://www.oscommerce.com/community/contributions,2028 ) so the customer chooses the state from a dropdown list rather than entering it freehand... Otherwise you could end up charging a customer to ship to India rather than Indiana !!

 

There are quite a few problems actually, so if it could be done, it would be much better to have to specify applicable states within a country e.g. US:+DL;FL;GE;IN or be able to specify a country with the exception of certain states e.g. US:-DL;FL;GE;IN

 

Anyway, here's what I have put in:

 

$dest_country = $order->delivery['country']['iso_code_2'];
//Zones within countries
  $dest_state = $order->delivery['state'];	  
//Zones within countries End	  
  $dest_zone = 0;
  $error = false;

  for ($i=1; $i<=$this->num_zones($vendors_id); $i++) {
	$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $vendors_id . '_' . $i);
	$country_zones = split("[,]", $countries_table);
	if (in_array($dest_country, $country_zones)) {
	  $dest_zone = $i;
	  break;
	}
}
//Zones within countries
 if ($dest_zone == 0) {

  for ($i=1; $i<=$this->num_zones($vendors_id); $i++) {
	$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $vendors_id . '_' . $i);
	$country_zones = split("[,]", $countries_table);
	if (in_array($dest_state, $country_zones)) {
	  $dest_zone = $i;
	  break;
	}

// rest of the world
	if ($countries_table == 'WORLD') {
	  $dest_zone = $i;
	  break;
	}
// rest of the world eof
  }
}
//Zones within countries End

Link to comment
Share on other sites

Hi Craig,

 

I've plagiarised a couple of contributions to allow states to be used as zones and have a rest of the world zone. Credit for these goes to Jorge Suarez - Regions Based Rates Shipping Module and Radu Manole - Rest of the world addon.

 

I think there must be a neater way to do this though. For instance, I would rather it used the zone_code abbreviation instead of the full name of the state - can you think of a way to do this?

 

With this mod, if rest of the world zone is needed - WORLD zone should be last...

 

There is a problem in that one customer might abbreviate the state to IN whereas another might enter Indiana. To get around this I have had to use another contribution: Country-state selector ( http://www.oscommerce.com/community/contributions,2028 ) so the customer chooses the state from a dropdown list rather than entering it freehand... Otherwise you could end up charging a customer to ship to India rather than Indiana !!

 

There are quite a few problems actually, so if it could be done, it would be much better to have to specify applicable states within a country e.g. US:+DL;FL;GE;IN or be able to specify a country with the exception of certain states e.g. US:-DL;FL;GE;IN

 

Anyway, here's what I have put in:

 

$dest_country = $order->delivery['country']['iso_code_2'];
//Zones within countries
  $dest_state = $order->delivery['state'];	  
//Zones within countries End	  
  $dest_zone = 0;
  $error = false;

  for ($i=1; $i<=$this->num_zones($vendors_id); $i++) {
	$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $vendors_id . '_' . $i);
	$country_zones = split("[,]", $countries_table);
	if (in_array($dest_country, $country_zones)) {
	  $dest_zone = $i;
	  break;
	}
}
//Zones within countries
 if ($dest_zone == 0) {

  for ($i=1; $i<=$this->num_zones($vendors_id); $i++) {
	$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $vendors_id . '_' . $i);
	$country_zones = split("[,]", $countries_table);
	if (in_array($dest_state, $country_zones)) {
	  $dest_zone = $i;
	  break;
	}

// rest of the world
	if ($countries_table == 'WORLD') {
	  $dest_zone = $i;
	  break;
	}
// rest of the world eof
  }
}
//Zones within countries End

 

Yes, that should basically get the job done. I am still looking to achieve the ability to select multiple countrie(or states for that matter) to be included or excluded from the "enabled" zone. This would make it less module specific, but I suppose each module would need to be edited no matter what, considering how the zones code is written for each one. This modification you have would need to be done to every module one wanted to be able to use with this particular zone setup. But, how to select the zones one wants to include or exclude? I suppose one could handle it the same way as the "Multi-Zone/Multi-Table" module. Perhaps selecting from a list of checkboxes, broken down by Country?

 

I dunno, too much for my very busy brain at the moment, you've gotten me thinking about things not on the top of my "critical" list. LOL

 

Keep going though, I will try to keep up with you.

 

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

Hey Craig,

 

Will this contrib work if you want to have a setup shipping rate instead of calculated for UPS and Fedex? We have some products that would need to be calculated but others that are just set shipping.

 

I installed the Individual Multiple Shipping contrib but it doesnt seem to calculate into the shopping cart correctly.

 

 

Thanks let me know. Also, how much do you charge to install the contrib?

Edited by UniqueDesign
Link to comment
Share on other sites

Yes, that should basically get the job done. I am still looking to achieve the ability to select multiple countrie(or states for that matter) to be included or excluded from the "enabled" zone. This would make it less module specific, but I suppose each module would need to be edited no matter what, considering how the zones code is written for each one. This modification you have would need to be done to every module one wanted to be able to use with this particular zone setup. But, how to select the zones one wants to include or exclude? I suppose one could handle it the same way as the "Multi-Zone/Multi-Table" module. Perhaps selecting from a list of checkboxes, broken down by Country?

 

I dunno, too much for my very busy brain at the moment, you've gotten me thinking about things not on the top of my "critical" list. LOL

 

Keep going though, I will try to keep up with you.

 

Craig :)

 

Hi Craig,

 

I've made a couple of minor changes, although there is the problem of a zone_code being the same as countries_iso_code_2. This won't be a problem here in the UK, but there would be quite a few clashes in the US - e.g. the India / Indiana example. Currently, I've got it to use zone_code if this has been set (otherwise state name), and it sets up $shipping_method depending on whether shipping is to a state or country...

 

I think the way forward would be to create a new type of vendors_shipping zones module altogether along the lines of what you have suggested. Lots of other improvements could be introduced too, like percentage support and the ability to select whether the cost is calculated from weight, cost of order or number of items etc.

 

Anyway, here's what I have at the moment:

 

	  $dest_country = $order->delivery['country']['iso_code_2'];

//Zones within countries
  $dest_state = $order->delivery['state'];	  
  $dest_zone_id = $order->delivery['zone_id'];
  if ($dest_zone_id > 0) {
	  $zone_query = tep_db_query("select distinct zone_code from " . TABLE_ZONES . " where zone_id = '" . $dest_zone_id . "'");
	  if (tep_db_num_rows($zone_query) == 1) {
		$dest_zone_n = tep_db_fetch_array($zone_query);
		$dest_state = $dest_zone_n['zone_code'];
	  } 
	  }

  $state_shipping = 0;
//Zones within countries End
  $dest_zone = 0;
  $error = false;

  for ($i=1; $i<=$this->num_zones($vendors_id); $i++) {
	$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $vendors_id . '_' . $i);
	$country_zones = split("[,]", $countries_table);
	if (in_array($dest_country, $country_zones)) {
	  $dest_zone = $i;
	  break;
	}
}
 if ($dest_zone == 0) {
//Zones within countries	 
  for ($i=1; $i<=$this->num_zones($vendors_id); $i++) {
	$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $vendors_id . '_' . $i);
	$country_zones = split("[,]", $countries_table);
	if (in_array($dest_state, $country_zones)) {
	  $dest_zone = $i; $state_shipping = 1;
	  break;
	}

// rest of the world
	if ($countries_table == 'WORLD') {
	  $dest_zone = $i;
	  break;
	}
// rest of the world eof
  }
}
//Zones within countries End

 

and this minor change to the wording of the table:

 

		tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (vendors_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . $vendors_id . "', 'Zone " . $i ." Countries or States', 'MODULE_SHIPPING_ZONES_COUNTRIES_" . $vendors_id . "_" . $i . "', '" . $default_countries . "', 'Comma separated list of either State or two character ISO country codes that are part of Zone " . $i . ".', '6', '0', now())");

 

All the best,

 

Paul :)

Link to comment
Share on other sites

Hey Craig,

 

Will this contrib work if you want to have a setup shipping rate instead of calculated for UPS and Fedex? We have some products that would need to be calculated but others that are just set shipping.

 

I installed the Individual Multiple Shipping contrib but it doesnt seem to calculate into the shopping cart correctly.

Thanks let me know. Also, how much do you charge to install the contrib?

Yes, this will do exactly what you are describing. MVS was designed to offer the ability to create groups(we call them Vendors, but this can literally be used for any purpose, ie. different shipping methods, different wharehouses, different locations) of products that each will have their own shipping module setup. The "Individual Shipping Contrib" has been modified to work with MVS, though it must be installed after MVS.

 

We aren't suppose to discuss any commercial topics here though, so if you contact me via PM or email, we can discuss that end at that time.

 

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

Hi Craig,

 

I've made a couple of minor changes, although there is the problem of a zone_code being the same as countries_iso_code_2. This won't be a problem here in the UK, but there would be quite a few clashes in the US - e.g. the India / Indiana example. Currently, I've got it to use zone_code if this has been set (otherwise state name), and it sets up $shipping_method depending on whether shipping is to a state or country...

 

I think the way forward would be to create a new type of vendors_shipping zones module altogether along the lines of what you have suggested. Lots of other improvements could be introduced too, like percentage support and the ability to select whether the cost is calculated from weight, cost of order or number of items etc.

 

Anyway, here's what I have at the moment:

 

........

 

and this minor change to the wording of the table:

 

		tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (vendors_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . $vendors_id . "', 'Zone " . $i ." Countries or States', 'MODULE_SHIPPING_ZONES_COUNTRIES_" . $vendors_id . "_" . $i . "', '" . $default_countries . "', 'Comma separated list of either State or two character ISO country codes that are part of Zone " . $i . ".', '6', '0', now())");

 

All the best,

 

Paul :)

Very nice, I like the listing setup, that is essentially the critical part that would need to be available for the setup, I was wondering how you were going to attack that part of the issue.

 

I will be working with this at some piont very soon, so I may bring it back up later.

 

Thanks for sharing your thoughts and code, Paul, 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 All

 

First of all let me say

 

ONE HE*L OF A D*M GOOD JOB YOU HAVE DONE WITH MVS SIMPLY AWSOME.

 

I have dl the latest ver and installed it without any broblems. I took the time too take it slow and dbl chk as i went. It went quite smothly.

 

Everything seams to work just fine, yea here it comes LOL

 

I am using 2 shipping methods. UPS works great

 

& Table rates based on Cost - this one will not set the rate, no mater how much the total cost is

it only gives the cheapest cost in the table.

 

I have been over and over the code and cant find the prob.

 

I have just spent the whole night going over this thread and I havent seen anything about Table rates.

 

btw Im using the table rate code that came with the mod.

 

SO any ideas whats going on, I'm sure its something simple.

 

Please

 

HAVE A GREAT DAY!

Link to comment
Share on other sites

<snip>

SO any ideas whats going on, I'm sure its something simple.

 

Please

 

HAVE A GREAT DAY!

Yes, there's a bug in the Table code. Find this code in catalog/includes/modules/vendor_shipping/table.php at Line 99:

$order_total = $shipping_cost;
} else {
$order_total = $shipping_weight;

and change it to:

$order_total = $cart->vendor_shipping[$vendors_id]['cost'];
} else {
$order_total = $cart->vendor_shipping[$vendors_id]['weight'];

Remember that the Table module will only use the total cost for the vendor, not for the total order.

 

Regards

Jim

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

Link to comment
Share on other sites

First off, I think this is an awesome mod, and the last I need to make the store I'm building to do what it's supposed to do... I think.

 

Anywho, after installation and testing, I came across this error while going through the checkout process

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /sites/yuma4/yamatoeddie/home/secure_html/catalog/includes/classes/vendor_shipping.php on line 48

 

It pops up at the top of the page when being asked for delivery information. That error seems to create the following error when the checkout process is continued onto "payment informtion"

 

Warning: Cannot modify header information - headers already sent by (output started at /sites/yuma4/yamatoeddie/home/secure_html/catalog/includes/classes/vendor_shipping.php:48) in /sites/yuma4/yamatoeddie/home/secure_html/catalog/includes/functions/general.php on line 44

 

I'm on a shared SSL server, so oscommerce has been divided among the public and secure folders (and doing well with it too, might I add :) ).

 

Then, also, in Vendor Shipping Modules, the list of available modules is blank. The CHMODs are correct, I beileve, and the folder has been located in both the secure and public folders, but with blank results.

 

Any help would be appreciated.

Edited by eddydavik
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...