Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

Look in the orders_products table in your database. If the data is there, you have a problem in the Orders page of the admin. If it isn't there, look in checkout_process.php where the data is stored. This is also where the email is sent, so it's most likely in this page or in the data being sent to this page.

 

Regards

Jim

 

That was it, for others with weird problems....note to self, MVS does not like the contribution Bundles Products....

 

I thought that I removed everything from that contrib, but I had a few scattered lines in Checkout_process and checkout_confirmation.....That may have been the source of all my other weird things....

Link to comment
Share on other sites

Are the prices for the items in your shop all round numbers? Ie product number 1 is $10, product number 2 is $20, etc?

 

No, the prices are all different, some are 6.99, some are 5.50 etc.

 

I have uploaded the latest release of this module directly into a fresh OS commerce install to further investigate the issue. I simply overwrote the fresh install with the new files,you can see it here (Without the right column):

 

http://host372.ipowerweb.com/~weremaki/catalog/

 

I have created two vendors: my store and test store. I have allocated Matrox G200 to one of the stores and Matrox G400 to the other. Each store has its own shipping fees setup.

 

If you do a test purchase through this store of theses products, you will see how it does not add up the combined shipping cost correctly. You can also login to the stores admin:http://host372.ipowerweb.com/~weremaki/catalog/admin to check things out there

 

I am can't seem to work out what is going wrong, so if you can, it would be much appreciated. You can use the email address "[email protected]" and password: "password" to login as a customer (saves you time).

 

Any help is very much appreciated!

 

Thanks :)

Link to comment
Share on other sites

No, the prices are all different, some are 6.99, some are 5.50 etc.

 

I have uploaded the latest release of this module directly into a fresh OS commerce install to further investigate the issue. I simply overwrote the fresh install with the new files,you can see it here (Without the right column):

 

http://host372.ipowerweb.com/~weremaki/catalog/

 

I have created two vendors: my store and test store. I have allocated Matrox G200 to one of the stores and Matrox G400 to the other. Each store has its own shipping fees setup.

 

If you do a test purchase through this store of theses products, you will see how it does not add up the combined shipping cost correctly. You can also login to the stores admin:http://host372.ipowerweb.com/~weremaki/catalog/admin to check things out there

 

I am can't seem to work out what is going wrong, so if you can, it would be much appreciated. You can use the email address "[email protected]" and password: "password" to login as a customer (saves you time).

 

Any help is very much appreciated!

 

Thanks :)

 

Well, it's definitely doing what you're describing. The shipping is being rounded to the nearest ten dollar increment. That's just frickin' bizarre.

 

It's rounding up or down to the nearest 10 dollar increment if the shipping charge is greater than $10, and to the nearest dollar amount if shipping is less than $10.

 

I don't know enough about the way the shopping cart totals things up to tell you where to look to fix this. It seems like would have to be in vendors_shipping.php, checkout_process.php, or checkout_confirmation.php- but it's definitely related somehow to MVS, as disabling MVS gets rid of the problem.

 

What is this:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/weremaki/public_html/catalog/includes/vendor_order_data.php:93) in /home/weremaki/public_html/catalog/includes/functions/general.php on line 29

 

This is what comes back after hitting the confirm button.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

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

Link to comment
Share on other sites

Well, it's definitely doing what you're describing. The shipping is being rounded to the nearest ten dollar increment. That's just frickin' bizarre.

 

It's rounding up or down to the nearest 10 dollar increment if the shipping charge is greater than $10, and to the nearest dollar amount if shipping is less than $10.

 

I don't know enough about the way the shopping cart totals things up to tell you where to look to fix this. It seems like would have to be in vendors_shipping.php, checkout_process.php, or checkout_confirmation.php- but it's definitely related somehow to MVS, as disabling MVS gets rid of the problem.

 

What is this:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/weremaki/public_html/catalog/includes/vendor_order_data.php:93) in /home/weremaki/public_html/catalog/includes/functions/general.php on line 29

 

This is what comes back after hitting the confirm button.

 

This is another error that seems to be created from adding the mvs module. I don't know how this one got there either. DO you think it could be the way I upload the files (should it be binary??) or maybe the version I uploaded? RC4 and 5. Have you got a working version, and if so, what version was it?

 

Thanks for your help so far, and for having a look at this weird problem. I surely can't be the only one if its a direct upload to a fresh OSC....

Link to comment
Share on other sites

This is another error that seems to be created from adding the mvs module. I don't know how this one got there either. DO you think it could be the way I upload the files (should it be binary??) or maybe the version I uploaded? RC4 and 5. Have you got a working version, and if so, what version was it?

 

The bug in vendor_order_data.php is covered in this post. PHP files should be uploaded in ASCII mode, unless you are uploading from the same type of operating system as the server, in which case it doesn't matter.

 

I have no idea what's causing the roundoff bug. I'm not seeing this on any of my installs. Try a clean install of MVS 0.9RC4 and see if that works for you.

 

Regards

Jim

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

Link to comment
Share on other sites

This is another error that seems to be created from adding the mvs module. I don't know how this one got there either. DO you think it could be the way I upload the files (should it be binary??) or maybe the version I uploaded? RC4 and 5. Have you got a working version, and if so, what version was it?

 

Thanks for your help so far, and for having a look at this weird problem. I surely can't be the only one if its a direct upload to a fresh OSC....

 

I wouldn't say that. I use RC5 and I've never seen anything like the round off bug. However I have seen something like

Warning: Cannot modify header information - headers already sent by (output started at /home/weremaki/public_html/catalog/includes/vendor_order_data.php:93) in /home/weremaki/public_html/catalog/includes/functions/general.php on line 29

- in my case it was caused by checking out without selecting a shipping method. However if I was you I'd follow the link Jim posted for that.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

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

Link to comment
Share on other sites

Because I Just Won't Let it Die-

 

I'm still trying to find some code to dump the user back to checkout_shipping if they manage to somehow not select a shipping method (ie if FedEx or UPS doesn't return a rate).

 

I'm also using Separate Pricing Per Customer and I'd like it to be "customer group aware" so I came up with this:

 

// if retail customer has not selected shipping method redirect them to shipping page
global $sppc_customer_group_id;
if (!tep_session_is_registered('sppc_customer_group_id')) {
$customer_group_id = '0';
} else {
$customer_group_id = $sppc_customer_group_id;
}

if (($customer_group_id == '0') && ($order->info['shipping_cost'] == 0)) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}

 

I've been testing it and it looks like it works exactly like it's supposed to.

 

But, I'd like to make it a little more robust, and only check for a non-return of $order->info['shipping_cost'] or whatever it is that happens (doesn't happen?) when a shipping method is somehow not selected.

 

As Mel Allen would say, How About That?

Edited by djmonkey1

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

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

Link to comment
Share on other sites

Hey,

I finally got per item and table rate shipping modules to work with MVS,

Now I need multiple tables rates for ground, 2nd day and next day, So i want to see if i can get lucky, if anyone has modified multi-table shipping module for MVS.

I think it is called additional_table_rate_options_v1.2

Thanks!

 

The table rate module from RC5 doesn't function correctly - it appears that it doesn't take the shipping table. The bug was due to the $shipping_cost variable. It is not set as 'global' in the 'function quote' in vendor_shipping.php in include/classes/vendor_shipping.php. Adding $shipping_cost to the global variables solved the problem:

 

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

global $shipping_quoted, $order, $cart, $shipping_num_boxes, $shipping_weight, $shipping_cost;

Link to comment
Share on other sites

Stew and others,

I am currently working on the issue of being able to checkout without selecting a shipping method as well, I have received several emails asking for help with this particular issue and I beleive this is the single most disturbing bug we have with MVS. Files to check for this bug will be:

in catalog->

checkout_shipping.php

checkout_process.php

checkout_payment.php(though should not have been affected by MVS)

in catalog->includes

application_top.php

in catalog->includes->classes

order.php

shopping_cart.php

vendor_shipping.php

 

These files are the only ones changed by MVS that could create this issue, there will be a check to make sure a shipping method was chosen and, if not, kick back to "checkout_shipping.php".

 

If I find it, obviously I will post the fix immediately and update the next release.

 

The "default" shipping method is automatically selected as the "cheapest" method available, you cannot pick wich one is used, it is hard coded to the "cheapest".

 

The "unknown" column message your getting is from "Header Tags" contribution. Do you have that installed? You may have accidently wiped out that column during MVS installation.

 

Seperately, USPS has been a major headache for me, all I get is messages from USPS that they can't give me quote, if someone is using the USPS module with success, could you please send me a copy through PM? If I can keep my hair and not go grey over this particular issue I will be trying to post another bugfix update to MVS soon.

 

Special thanks to Jim for his incredible efforts with MVS, we all owe him a great deal of gratitude. I am sure he never expected to be so involved when he agreed to work with me on MVS, he got much more than he bargained for, so thank him every chance you get. He's a great guy as well as a $@&* of a coder.

 

Craig :)

 

I just want to share my two cents on tackling this problem.

1) I created a session variable called 'vendor_shipping_error' and it gets set in includes/modules/vendor_shipping.php

 

<?php
	if (isset($quotes[$i]['error'])) {
			//if there is a shipping error, record it in session. this is used
at line 143 in checkout_shipping.php
			tep_session_register('vendor_shipping_error');
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="messageStackWarning" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	} else {
			//if no shipping error, unregister the 'vendor_shipping_error'
			tep_session_unregister('vendor_shipping_error');

 

2) Create a count on shipping methods selected in includes/checkout_shipping.php

if ($method) {
			$count_vendor_shipping_method_selected++;
	}

 

3) Check count and the vendor_shipping_error in includes/checkout_shipping.php

	  $shipping = array('id' => $shipping,
					'title' => $shipping_title,
					'cost' => $total_shipping_cost,
					'shipping_tax_total' => $total_ship_tax,
					'vendor' => $output
				   );
//make sure if there are shipping error, the page does not redirect to checkout_payment.php
	if (tep_session_is_registered('vendor_shipping_error')) {
			tep_session_unregister('shipping');
	}
	tep_session_unregister('vendor_shipping_error');

//make sure all the correspondent shipping methods are selected for all the vendors' shipping
	if ($count_vendor_shipping_method_selected != sizeof($vendor_shipping)) {
			tep_session_unregister('shipping');
	}

 

Hope this help...

Link to comment
Share on other sites

just a quick note to let everyone know that the test site is back up, been having strange database issues, I think I have it resolved now.

 

the site: http://www.blucollarsales.com/osc

the admin: http://blucollarsales.com/osc/admin

No login required for the admin.

 

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 have the following problems when I go to manage the vendors shipping. I have not tried too see if it actually works but I can still install them on the right.

 

What I really would like to do though and Im not sure how to do it is add the Fedex contribution to this list.

http://www.oscommerce.com/community/contri...2/search,Fed+Ex

 

I have it on my regular shipping mod but would like to add it to the vendors.

 

 

Federal Express

Warning: constant(): Couldn't find constant MODULE_SHIPPING_FEDEX1_SORT_ORDER_3 in /home/******/public_html/catalog/includes/modules/vendors_shipping/fedex1.php on line 120

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_FEDEX1_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/fedex1.php on line 120

0

Flat Rate

Warning: constant(): Couldn't find constant MODULE_SHIPPING_FLAT_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/flat.php on line 32

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_FLAT_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/flat.php on line 32

0

Per Item

Warning: constant(): Couldn't find constant MODULE_SHIPPING_ITEM_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/item.php on line 33

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_ITEM_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/item.php on line 33

0

Table Rate

Warning: constant(): Couldn't find constant MODULE_SHIPPING_TABLE_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/table.php on line 33

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_TABLE_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/table.php on line 33

0

United Parcel Service

Warning: constant(): Couldn't find constant MODULE_SHIPPING_UPS_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/ups.php on line 62

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_UPS_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/ups.php on line 62

0

United Parcel Service (XML) 0

United States Postal Service

Warning: constant(): Couldn't find constant MODULE_SHIPPING_USPS_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/usps.php on line 83

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_USPS_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/usps.php on line 83

0

Zone Rates

Warning: constant(): Couldn't find constant MODULE_SHIPPING_ZONES_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/zones.php on line 111

 

Warning: constant(): Couldn't find constant MODULE_SHIPPING_ZONES_SORT_ORDER_3 in /home/*****/public_html/catalog/includes/modules/vendors_shipping/zones.php on line 111

0

Vendor Module Directory: /home/brian23/public_html/catalog/includes/modules/vendors_shipping/

Federal Express

 

 

Federal Express

 

You will need to have registered an account with FEDEX to use this module. Please see the README.TXT file for other requirements.

Link to comment
Share on other sites

I have the following problems when I go to manage the vendors shipping. I have not tried too see if it actually works but I can still install them on the right.

 

What I really would like to do though and Im not sure how to do it is add the Fedex contribution to this list.

http://www.oscommerce.com/community/contri...2/search,Fed+Ex

 

 

 

Federal Express

 

You will need to have registered an account with FEDEX to use this module. Please see the README.TXT file for other requirements.

 

The easiest way would be to change the calls from constant(x) to @constant(x). But that leaves a '0' in the Sort Order column, which (a) is different from the other osCommerce modules and (B) leaves you without any way to tell which modules are installed and not installed.

 

The better way (in my not-so-humble opinion) is to replace the sort_order functions in each module with something else. Here's what I did in catalog/includes/modules/vendors_shipping/item.php, for example:

 

	  function sort_order($vendors_id='1') {
 $sort_order = constant ('MODULE_SHIPPING_ITEM_SORT_ORDER_' . $vendors_id);
 if (isset ($sort_order)) {
   $this->sort_order = $sort_order;
 } else {
   $this->sort_order = '0';
 }
 return $this->sort_order;
  }

 

changed to:

 

	function sort_order($vendors_id='1') {
 $sort_order = 'MODULE_SHIPPING_ITEM_SORT_ORDER_' . $vendors_id;
 if (defined($sort_order)) {
   $this->sort_order = constant($sort_order);
 } else {
   $this->sort_order = '-';
 }
 return $this->sort_order;
  }

 

See, instead of taking constant() blindly, we set up a variable name (so we don't have to do the concatenation multiple times), then check to see if it's defined. If not, we use a non-numeric sort order, which will result in a blank in the Sort Order column, just like the standard modules.

 

It's not a tough change, from a coding standpoint. You've just got to make sure you hit every module.

 

Jude

 

There's a FedEx module included with MVS that works really well.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

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

Link to comment
Share on other sites

There's a FedEx module included with MVS that works really well.

 

I would like to use the FedEx module but you have to have a account, I would assume that would cost money? I dont actually ship the product thats why I was hoping to get the other contribution working. Im gonna check out Fedex site though and see how much it is.

Link to comment
Share on other sites

I would like to use the FedEx module but you have to have a account, I would assume that would cost money? I dont actually ship the product thats why I was hoping to get the other contribution working. Im gonna check out Fedex site though and see how much it is.

No cost for the account. You just have to sign up.

 

Also, an easy way to deal with the errors:

 

 function sort_order($vendors_id='1') {
$sort_order = constant ('MODULE_SHIPPING_ITEM_SORT_ORDER_' . $vendors_id);
if (isset ($sort_order)) {
$this->sort_order = $sort_order;
} else {
$this->sort_order = '0';
}
return $this->sort_order;
}

Is to add this symbol @ before the "constant" call, like this:

 

 function sort_order($vendors_id='1') {
$sort_order = @constant ('MODULE_SHIPPING_ITEM_SORT_ORDER_' . $vendors_id);
if (isset ($sort_order)) {
$this->sort_order = $sort_order;
} else {
$this->sort_order = '0';
}
return $this->sort_order;
}

Do this in each of the modules, search for this block of code:

$sort_order = constant

in each module and make the correction. Very simple, very easy. This suppresses the warnings that you are getting and then you will be able to install and configure the module after you have signed up with FedEx.

 

Good luck, 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

Thanks that seem to have fixed the errors.

 

When I try to get a fedex account number they are asking for a credit card. It doest even say anywhere about what is for?

 

I have tried several shipping options under the vendor manage option and im not getting charged any shipping cost when I test it.?

Link to comment
Share on other sites

I have tried several shipping options under the vendor manage option and im not getting charged any shipping cost when I test it.?

Unless it has recently changed, there is no charge for the account itself. The credit card info is for when you use FedEx.com for to actually ship stuff, print labels and such.

 

Are you getting any error messages?

 

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

Unless it has recently changed, there is no charge for the account itself. The credit card info is for when you use FedEx.com for to actually ship stuff, print labels and such.

 

Are you getting any error messages?

 

Craig :)

 

Im getting no error messages. When I go to checkout it just charging me for the item it shows no shipping at all as if its all turned off.

Link to comment
Share on other sites

Im getting no error messages. When I go to checkout it just charging me for the item it shows no shipping at all as if its all turned off.

 

My regular shipping module works is there a file I may have skipped over during the process I need to look for?

 

My regular shipping module works is there a file I may have skipped over during the process I need to look for?

 

I think I answered my own question I noticed the checkout shipping file was smaller than the contributions I must have missed that one. Anyways I now get this error when I go to check out. Im using the simple items module just to test.

 

Fatal error: Call to undefined function: vendor_shipping() in /home/******/public_html/catalog/includes/modules/vendor_shipping.php on line 13

Link to comment
Share on other sites

It looks like you missed the changes to includes/classes/shopping_cart.php.

 

Regards

Jim

 

Im so glad I went with osc this community is great that fixed it. I missed alot on this last try it was my 4th try. I have alot of contributions in the categories file that has caused me alot of havoc. I finally got this one working but I did break a few others during the process :rolleyes: I just know im going to screw something up hehe but I will backup the site first.

 

 

Thanks again

Link to comment
Share on other sites

Is this normal output from Fedex on a heavier package? This is just one item that weighed 86lbs

 

Federal Express (3 x 28.666666666667lbs)

 

Is this normal output from Fedex on a heavier package? This is just one item that weighed 86lbs

 

Federal Express (3 x 28.666666666667lbs)

 

Oops should of tested it all the way out. When im using Fedex I get this error when I go to payment information.

 

Warning: Missing argument 2 for _setservice() in /home/*****/public_html/catalog/includes/modules/vendors_shipping/fedex1.php on line 308

 

Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/catalog/includes/modules/vendors_shipping/fedex1.php:308) in /home/*****/public_html/catalog/includes/functions/general.php on line 29

Link to comment
Share on other sites

Oops should of tested it all the way out. When im using Fedex I get this error when I go to payment information.

 

Warning: Missing argument 2 for _setservice() in /home/*****/public_html/catalog/includes/modules/vendors_shipping/fedex1.php on line 308

 

Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/catalog/includes/modules/vendors_shipping/fedex1.php:308) in /home/*****/public_html/catalog/includes/functions/general.php on line 29

 

 

Just a little more information I have found. This only does this if I go back and make another purchase using Fedex. If I close down the browser and reopen it and go through the entire procedure again it works fine on the first run. This happends with Fedex.

Edited by srober
Link to comment
Share on other sites

Is this normal output from Fedex on a heavier package? This is just one item that weighed 86lbs

 

Federal Express (3 x 28.666666666667lbs)

 

 

You have your max package weight set to something like 30 or 40 lbs.

Edited by djmonkey1

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

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

Link to comment
Share on other sites

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