Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

That's not quite true- I wasn't looking closely enough. When I ran an order for products that only came from the other vendors (vendors #2 and #3), the product attribute for the product from vendor #2 bled into the product attribute of product #1 of vendor #3 (resulting in that product as showing a color of "Molasses" instead of "Khaki"), while the second product from vendor #3 displayed it's attribute correctly. As a result I saw all three products displaying product attributes and thought all was well.

 

That order is the closest I've seen to it working correctly however.

 

So, it doesn't matter what vendor the products are listed under. But if you mix vendors on one order the results are even weirder than the attributes not showing up at all, because the attributes will bleed across products. When you have three vendors represented it gets crazy crazy, with the third vendors attributes basically wiped out due to bleed through from the products from the first two vendors.

 

If that makes any sense.

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

I've seen something like this once before, incidentally, while working on a contribution that had to work with Seperate Pricing Per Customer. It's a mod of product_listing.php, and it took me forever to get the code correct so that product attributes would pass to the cart properly (actually it was JanZ who showed me the way).

 

But SPPC doesn't modify admin/invoice.php, packingslip.php, or anything in the database associated with product attributes.

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

The data for the Invoice is coming from admin/includes/classes/order.php (actually from the MVS data section, which is admin/includes/classes/vendor_order_data.php.) This class processes the data and outputs an array that the Invoice then formats. I suspect that one of the index values is getting scrambles, causing the attributes to attach to the wrong product. Could you please check your database again and verify that the attributes have the correct products_id? If the database is accurate, then the data is getting scrambles somewhere in vendor_order_data.php or invoice.php. I've looked at both of these and don't see anything wrong, but I could easily be missing something.

 

Regards

Jim

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

Link to comment
Share on other sites

The data for the Invoice is coming from admin/includes/classes/order.php (actually from the MVS data section, which is admin/includes/classes/vendor_order_data.php.) This class processes the data and outputs an array that the Invoice then formats. I suspect that one of the index values is getting scrambles, causing the attributes to attach to the wrong product. Could you please check your database again and verify that the attributes have the correct products_id? If the database is accurate, then the data is getting scrambles somewhere in vendor_order_data.php or invoice.php. I've looked at both of these and don't see anything wrong, but I could easily be missing something.

 

Regards

Jim

 

The database looks fine to me- all the proper attribute names, etc, appear, each associated with the appropriate order_id.

 

Also, the data looks fine when a customer views his/her account_history_info.php or when I view the order info at admin/orders.php.

 

To me it seems most likely to be a problem with admin/invoice.php. I can post my entire vendor_order_data.php if you want, but it should be a clone of the file that was released with the contribution.

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

To me it seems most likely to be a problem with admin/invoice.php. I can post my entire vendor_order_data.php if you want, but it should be a clone of the file that was released with the contribution.

I still can't see anything wrong with the stock invoice.php or vendor_order_data.php. Have you modified invoice.php at all? If it's not the stock version, then that's where I would start looking.

 

Regards

Jim

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

Link to comment
Share on other sites

I still can't see anything wrong with the stock invoice.php or vendor_order_data.php. Have you modified invoice.php at all? If it's not the stock version, then that's where I would start looking.

 

Regards

Jim

 

Sure I've modified my invoice.php, but I've used the stock version instead to test and came up with the same results.

 

This is very strange.

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

Is there an alternate way to write this:

 

 for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
   echo '	  <tr class="dataTableRow">' . "\n" .
		'		<td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
		'		<td class="dataTableContent" valign="top">' . $order->products[$i]['name'];

   if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
	 for ($j = 0; $j < $k; $j++) {
	   echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
	   if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
	   echo '</i></small></nobr>';
	 }
   }

 

??

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

Is there an alternate way to write this:

Almost certainly, since there are multiple ways to code almost anything. It all depends on what you are trying to do with that data. BTW, that's the original osC code. If you are trying to use that with MVS, that's your problem. MVS needs to index all the data by vendor.

 

I would suggest printing out the $order->products array. That will tell you if the data is being fed to invoice.php correctly.

 

Regards

Jim

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

Link to comment
Share on other sites

Almost certainly, since there are multiple ways to code almost anything. It all depends on what you are trying to do with that data. BTW, that's the original osC code. If you are trying to use that with MVS, that's your problem. MVS needs to index all the data by vendor.

 

I would suggest printing out the $order->products array. That will tell you if the data is being fed to invoice.php correctly.

 

Regards

Jim

 

I was being dumb and copied the wrong section of code, but I verified again that my admin/invoice.php is a stock copy from MVS. I did once try to use that code with MVS and all that came back was garbage.

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

Almost certainly, since there are multiple ways to code almost anything. It all depends on what you are trying to do with that data. BTW, that's the original osC code. If you are trying to use that with MVS, that's your problem. MVS needs to index all the data by vendor.

 

I would suggest printing out the $order->products array. That will tell you if the data is being fed to invoice.php correctly.

 

Regards

Jim

 

Thank you for your help, Jim. If it wasn't for you I'd still be staring at me screen in bewilderment and wondering why it doesn't work.

 

I did a printout of $order->products and the data looks ok to me, but I am far from an expert.

 

Here is an example:

 

Array ( [0] => Array ( [Vid] => 4 [Vname] => Test [Vmodule] => item [Vmethod] => Best Way [Vcost] => 0.000 [Vship_tax] => 0.000 [Vorder_sent] => no [Vnoname] => Shipper [spacer] => - [orders_products] => Array ( [0] => Array ( [qty] => 1 [name] => Zero weight test [tax] => 0.0000 [model] => [price] => 0.0100 [vendor_name] => [vendor_ship] => [shipping_method] => [shipping_cost] => [final_price] => 0.0100 [spacer] => - [attributes] => Array ( [0] => Array ( [option] => Color [value] => Sand/black [prefix] => + [price] => 0.0000 ) [1] => Array ( [option] => Style [value] => Crumb [prefix] => + [price] => 0.0000 ) [2] => Array ( [option] => Size [value] => X-Large [prefix] => + [price] => 0.0000 ) ) ) [1] => Array ( [qty] => 1 [name] => 3 lb. Test [tax] => 0.0000 [model] => [price] => 0.0100 [vendor_name] => [vendor_ship] => [shipping_method] => [shipping_cost] => [final_price] => 0.0100 [spacer] => - ) [2] => Array ( [qty] => 1 [name] => Zero weight test [tax] => 0.0000 [model] => [price] => 0.0100 [vendor_name] => [vendor_ship] => [shipping_method] => [shipping_cost] => [final_price] => 3.2600 [spacer] => - [attributes] => Array ( [0] => Array ( [option] => Color [value] => Khaki/wine [prefix] => + [price] => 0.7500 ) [1] => Array ( [option] => Size [value] => XX-Large [prefix] => + [price] => 1.5000 ) [2] => Array ( [option] => Style [value] => Double Crust [prefix] => + [price] => 1.0000 ) ) ) ) ) )

 

For the third product the display on invoice.php is:

 

Zero weight test

- Color: (+$0.75)

- Size: (+$1.50)

- Style: (+$1.00)

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

Hi all,

I am having a problem with shipping weights, number of packages, and subsequently the cost assigned to shipping. I am using the upsxml module. Here is a screen shot as an example:

 

example.gif

 

The first vendor product, washington pine, is 24lbs, should be only one pkg, and the ups rates look right.

The second weighs in at about 6oz, is only one package, and should not cost $41.79 for ups ground.

 

Kind of looks like the rates are being added to each other, or multiplied... Quoted on thier own, each product will quote corectly, its only when I have multiple products that it is doing this. You should see what happens if you have a cart full of products!

 

I have checked the code, but its not obvious to me where the problem lies. Any ideas where I can start to figure the problem out?

 

Thanks,

Anthony

Link to comment
Share on other sites

Hi all,

I am having a problem with shipping weights, number of packages, and subsequently the cost assigned to shipping. I am using the upsxml module. Here is a screen shot as an example:

 

example.gif

 

The first vendor product, washington pine, is 24lbs, should be only one pkg, and the ups rates look right.

The second weighs in at about 6oz, is only one package, and should not cost $41.79 for ups ground.

 

Kind of looks like the rates are being added to each other, or multiplied... Quoted on thier own, each product will quote corectly, its only when I have multiple products that it is doing this. You should see what happens if you have a cart full of products!

 

I have checked the code, but its not obvious to me where the problem lies. Any ideas where I can start to figure the problem out?

 

Thanks,

Anthony

 

Wow- now that is weird. Have you tried other shipping modules? For instance the normal UPS module, FedEx, etc?

 

I installed UPSXML and couldn't replicate this particular bug.

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

I did a printout of $order->products and the data looks ok to me, but I am far from an expert.

 

Here is an example:

That did it. Your example shows that all of the data is being produced correctly, but invoice.php is not working correctly. The Option, Prefix, and Price are being displayed correctly, but the Value is not. That narrows it down to this line in admin/invoice.php:

		  echo '<br><nobr><small> <i> - ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['orders_products'][$i]['attributes'][$j]['value'];

A close examination of that line shows that the first index on the Value is an i where it should be l. Another reason why I won't use single-letter variables. Here's the correct line:

		  echo '<br><nobr><small> <i> - ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['option'] . ': ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['value'];

Thanks for all of the help in finding this bug.

 

Regards

Jim

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

Link to comment
Share on other sites

That did it. Your example shows that all of the data is being produced correctly, but invoice.php is not working correctly. The Option, Prefix, and Price are being displayed correctly, but the Value is not. That narrows it down to this line in admin/invoice.php:

 echo '<br><nobr><small> <i> - ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['orders_products'][$i]['attributes'][$j]['value'];

A close examination of that line shows that the first index on the Value is an i where it should be l. Another reason why I won't use single-letter variables. Here's the correct line:

 echo '<br><nobr><small> <i> - ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['option'] . ': ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['value'];

Thanks for all of the help in finding this bug.

 

Regards

Jim

 

You, sir, are the man. I'm not totally against using one-letter variables myself, but using l-i-j does seem like asking for trouble!

 

Thanks again, next Thanksgiving will go much more smoothly!

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

Wow- now that is weird. Have you tried other shipping modules? For instance the normal UPS module, FedEx, etc?

 

I installed UPSXML and couldn't replicate this particular bug.

 

I installed the ups module, and it seems to be working without issue. Side by side to the xml rates, it is showing the correct box count and weight...

 

So its good that the issue seems to be with the xml module, however any ideas where to start?

Thanks!!!

Anthony

Link to comment
Share on other sites

That's super-bizarro.

 

Have you modified the XML module at all? There are a bunch of crazy features in there.

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

So its good that the issue seems to be with the xml module, however any ideas where to start?

Thanks!!!

Anthony

In includes/modules/vendors_shipping/upsxml.php, go to line 54 and follow the instructions to enable logging. Run a test order and look at the log. Sometimes UPS will return a useful error message that will be revealed in the log. Otherwise you need to examine the data that is being sent to see what is missing or incorrect.

 

Regards

Jim

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

Link to comment
Share on other sites

is there any way to enable both usps and ups for the US, but ONLY ups for canada?

 

Just set the USPS module to only work in the US zone.

 

I don't know how to set up zones, but it shouldn't be very hard.

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

How do you set up shipping zones? For instance, is it possible to set up a zone that includes 15 U.S. states and D.C., and only enable UPS to work for that zone?

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

I've ported the multi-geozone multi-table (mzmt) shipping module to MVS0.94 and posted to the contribution. Any feedback is welcome.

 

Tony.

 

Has anyone ever used this? I installed it and am seeing

 

1054 - Unknown column 'num_tables' in 'field list'

select vendors_id, vendors_name, vendors_email, vendors_contact, vendors_phone1, vendors_email, vendors_send_email, vendors_status_send, vendor_street, vendor_city, vendor_state, vendors_zipcode, vendor_country, vendor_country, account_number, vendors_url, vendor_add_info, handling_charge, handling_per_box, tare_weight, percent_tare_weight, max_box_weight, num_tables, zones from vendors where vendors_id = '3'

[TEP STOP]

 

on the vendor edit screen.

 

There was no sql command provided with the contribution, as far as I can tell.

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

That did it. Your example shows that all of the data is being produced correctly, but invoice.php is not working correctly. The Option, Prefix, and Price are being displayed correctly, but the Value is not. That narrows it down to this line in admin/invoice.php:

		  echo '<br><nobr><small> <i> - ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['orders_products'][$i]['attributes'][$j]['value'];

A close examination of that line shows that the first index on the Value is an i where it should be l. Another reason why I won't use single-letter variables. Here's the correct line:

		  echo '<br><nobr><small> <i> - ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['option'] . ': ' . $order->products[$l]['orders_products'][$i]['attributes'][$j]['value'];

Thanks for all of the help in finding this bug.

 

Regards

Jim

You know everyone, it amazes me how many of these little things have gotten by me for so long. I've done a lot of testing with all of this code before releasing and since, but somehow these little bugs keep getting by me, I am VERY thankful for all who have and are working with MVS and willing to post their problems so we can all benefit from finding and fixing all the bugs.

 

And thanks again Jim, 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

Has anyone ever used this? I installed it and am seeing

 

1054 - Unknown column 'num_tables' in 'field list'

select vendors_id, vendors_name, vendors_email, vendors_contact, vendors_phone1, vendors_email, vendors_send_email, vendors_status_send, vendor_street, vendor_city, vendor_state, vendors_zipcode, vendor_country, vendor_country, account_number, vendors_url, vendor_add_info, handling_charge, handling_per_box, tare_weight, percent_tare_weight, max_box_weight, num_tables, zones from vendors where vendors_id = '3'

[TEP STOP]

 

on the vendor edit screen.

 

There was no sql command provided with the contribution, as far as I can tell.

I have never looked at this mod, so I can't say, but my guess would be to look at the original contribution and see if it has the table modifications. Be careful, these modifications may need to be done in a different place than may be instructed in the original contribution. I was also looking into the "Multizones by weight enhanced" contribution. It seems to be capable of doing exactly what you were asking about. Multiple "Cities" in one zone so that it can be used for tax and shipping purposes. You may want to look into it.

 

http://www.oscommerce.com/community/contri...arch,multizones

 

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

is there any way to enable both usps and ups for the US, but ONLY ups for canada?

got it figured out.

 

in the admin panel, i created two new tax zones, USPS Shipping and UPS Shipping. for UPS zone, i added both US and Canada, all zones included. for USPS zone, i only added US, all zones included.

 

then, in my shipping module, i set each shipping zone to it's respective shipping module, and it works like a charm!

Link to comment
Share on other sites

Has anyone ever used this? I installed it and am seeing

 

1054 - Unknown column 'num_tables' in 'field list'

select vendors_id, vendors_name, vendors_email, vendors_contact, vendors_phone1, vendors_email, vendors_send_email, vendors_status_send, vendor_street, vendor_city, vendor_state, vendors_zipcode, vendor_country, vendor_country, account_number, vendors_url, vendor_add_info, handling_charge, handling_per_box, tare_weight, percent_tare_weight, max_box_weight, num_tables, zones from vendors where vendors_id = '3'

[TEP STOP]

The vendors table is a MVS exclusive, so I doubt that any other contribution would modify it. Unless there is something out there that is specifically designed to work with MVS, in which case it very well could. So, if it doesn't say that it is designed for MVS, I think that you modified the wrong SQL. Unless, again, you have modified the Contribution yourself to work with MVS, in which case this would be correct and you need to make the change to the table.

 

Ok, I think I've even confused myself. My head hurts. :wacko:

 

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