Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

The original first line is

$shipping_array = $shipping['vendor'];

 

On my test site I currently have

if (($total_weight > 0 ) || ($shipping_array = $shipping['vendor'])){

 

and now believe that should be

if ($total_weight > 0 ) {
$shipping_array = $shipping['vendor'];

 

the point being that I put the whole section inside

 

if ($total_weight > 0 ) {

 

and

 

}

 

Okay. Problems with 'foreach()' being invalid have been solved. Orders are being processed correctly and inserted into database. Thanks, Stew.

 

Only problem remaining is a "Syntax error" with email.php. I know this problem has been discussed in many forums in the past. I will scour them for a solution. The puzzling thing is that I was not having email problems until MVS. I have checked and double-checked via debug that the correct values are being passed up to the point of the "return mail(...)" call [for SMTP]. Very strange. If someone has gone through this on a Windows system, please let me know. Thanks.

Link to comment
Share on other sites

I just felt the need to drop in and say how weird it was to be discussing that particular section of code with two people at the same time for completely different reasons, after having just identified it on my own due to my own curiousity. We all went from having completely forgotten about it, to being intimately familiar with it, how to modify it, and how it interacts with another contribution, in what seemed like a span of about 1 week.

 

That is all.

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

:thumbsup: Completely solved.

 

I ended up having to scrap the mailer class from osCommerce and use a phpmailer class from SourceForge. The suggestions that came with this mailer class literally made life sooooo much easier. I know most of the folks on this board are probably living in the Unix world - and, that's fine, since did so myself for almost 30 years - but, the issues of late have been specifically Windows-related. In addition, my issues added on the fact that my Host Mailer does not support HTML email submissions (inbound, but not outbound). That really stinks!

 

In any event. At the moment, life is great :D and I will move on to other things. Thanks to all those who contributed to resolution of my little problems.

 

Oh - yeah. I won't waste any more bandwidth with the replacement mailer class I found, unless requested.

:-"

Link to comment
Share on other sites

I have the MVS installed and working. Just a couple small problems.

 

1: When I set the Send Order Email to Don't Send Order Emails the vendor still gets the Email.

 

2: I can't get two shipping modules to work with one vendor.

I would be this Vendor, all other vendors only need one shipping choice.

I sell coffee and coffee equipment, some cleaning products are very light and easy to ship via USPS 1st Class mail. I also have some customers that choose USPS priority mail for the convenience of getting their order in their mail box or just their preference over UPS.

 

I set up both UPS XML and United States Postal Service in the Manage Vendor page, with all of my proper info but during checkout only the UPS options are given.

 

Can I easily fix this?

Hey! MyMy MyMy you've all been very busy while I've been absent yet again, sorry about that, life get's in the way occasionally.

 

I found this issue, I think, I haven't had the chance to really test to make sure but after reading through my code, this must be it. I missed a line in the RC4 release to check wether or not the vendor should get the email.

 

So, in admin->orders.php(right at the top of the file) and in catalog->checkout_process.php(about line 280 from MVS distro) find this query:

//let's get the Vendors
		  $vendor_data_query = tep_db_query("select v.vendors_id, v.vendors_name, v.vendors_email, v.vendors_contact, v.vendor_add_info, v.vendor_street, v.vendor_city, v.vendor_state, v.vendors_zipcode, v.vendor_country, v.account_number, v.vendors_status_send, os.shipping_module, os.shipping_method, os.shipping_cost, os.shipping_tax, os.vendor_order_sent from " . TABLE_VENDORS . " v,  " . TABLE_ORDERS_SHIPPING . " os where v.vendors_id=os.vendors_id and v.vendors_id='" . $vendors_id . "' and os.orders_id='" . (int)$oID . "' and v.vendors_status_send='" . $status . "'");

and replace it with this one:

//let's get the Vendors
		  $vendor_data_query = tep_db_query("select v.vendors_id, v.vendors_name, v.vendors_email, v.vendors_contact, v.vendor_add_info, v.vendor_street, v.vendor_city, v.vendor_state, v.vendors_zipcode, v.vendor_country, v.account_number, v.vendors_status_send, os.shipping_module, os.shipping_method, os.shipping_cost, os.shipping_tax, os.vendor_order_sent from " . TABLE_VENDORS . " v,  " . TABLE_ORDERS_SHIPPING . " os where v.vendors_id=os.vendors_id and v.vendors_id='" . $vendors_id . "' and os.orders_id='" . (int)$oID . "' and v.vendors_status_send='" . $status . "' and v.vendors_send_email = '1'");

 

Note that I added

 and v.vendors_send_email = '1'

to the query in order to exclude all vendors who are set NOT to send emails to. This should deal with that issue.

 

The matter of not being able to set up multiple modules is one I have not experienced myself, so I'm not sure about that. I will try to replicate on my test sites and see what I can come up with.

 

The other issue with changing the actual names being passed for the packingslip and invoice, I haven't worked out the best way to make that easy yet. They can be hardcoded with a bunch of "if" statements to show a different name that could be set in the language files or the database, but that would be very messy and should be able to be much simpler, will post when I can.

 

Also, a note of caution, the osCommerce 2.2 Milestone 2 051112 Update will overwrite some critical MVS files, pay close attention to this update and double check your edits. I will try to release a quick update to address this particular issue and some of the other bugs we have discovered as soon as I can.

 

And to everybody who has jumped right in to help each other out with the various issues,

THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! :thumbsup:

 

You have all been great, 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

Cheers, Craig... :thumbsup:

 

I solved my invalid zone problem.... modified Dan Naegle's RFQ contribution, which handles the situation perfectly.... so this was the last remaining niggle. :D

Great Maggi, glad you've got it worked out. If you were able to get this module modified for MVS, pass it on, we'd love to see it. You never know how many other folks can use this tool as well. If you aren't comfortable creating a contribution, send me your mods and I will put it together for you, with you're credit.

 

Thanks for the work and support, 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

Ok folks, here is a fix for the checking out without a shipping method being selected, that should cover each Vendor that may be in the cart.

 

The code we had been working with, in catalog->checkout_payment.php, I added some code:

	 // MVS
 //if no shipping method has been selected, redirect the customer to the shipping method selection page
if ($cart->content_type !== 'virtual') {
if (!isset($shipping[title])) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 }
 }//MVS end

 

This worked, but did not cover the reality of multiple Vendors, with only one Vendor missing a shipping option which allowed the customer to checkout without paying for shipping for one or more of the products.

 

So now, we need to change that entire piece of code to this:

	 // MVS
 //if no shipping method has been selected, redirect the customer to the shipping method selection page
if ($cart->content_type !== 'virtual') {
if (count($shipping['vendor']) != count($cart->vendor_shipping)) {
 tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED_SELECTED . ERROR_NO_SHIPPING_SELECTED_SELECTED_MORE, 'SSL'));
	}
} //MVS end

 

This will compare the number of Vendors involved in the order to number of shipping titles selected by the customer, if they are not the same, they will be sent back to checkout_shipping to with a message to select a shipping method.

 

For the message itself, open catalog->includes->languages->'THE LANG. file OF YOUR CHOICE' and add:

define('ERROR_NO_SHIPPING_SELECTED_SELECTED', '* You must select a shipping method for each group of products,');
define('ERROR_NO_SHIPPING_SELECTED_SELECTED_MORE', ' if none is available, please contact ' . STORE_NAME . ' at ' . STORE_OWNER_EMAIL_ADDRESS);

 

You can edit these lines as you see fit of course. If anyone finds any difficulty with this, please let me know, but I beleive this will solve this issue. The only other possibilty will be when there is a GV in the basket as well as real products, it may create some strange behavior, I will play around with this as much as I can.

 

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

 

I'm looking to install this UPSXML contrib and have a few advanced setup/custom tweak questions ...

 

First, can we generate UPS tracking labels from the site as an order comes in?

 

Once we get an approval, we would need to generate a tracking#/label and have this available for printing from the website directly. We are building out a Vendor based drop shipping affiliate program and need the entire process automated.

 

When we get an order (assuming its there stock) they would get an email with a name and address to send the order to. They would also receive a link to a page containing a pre-populated label for that order. They would only have to get the package out of door.

 

There affiliate account would get credited and they would be issued a check at months end.

 

I'm thinking of combining and expanding OscAffiliate with Multi Vendor Shipping to include the above functionality.

 

Has anyone done this? Anything of the shelf I can use? Anyone experienced enough to assist in development?. Have budget, will pay. contact me for more info.

 

Thanks

 

Chris

Link to comment
Share on other sites

Hello All ...

 

I'm looking to install this UPSXML contrib and have a few advanced setup/custom tweak questions ...

 

First, can we generate UPS tracking labels from the site as an order comes in?

 

Once we get an approval, we would need to generate a tracking#/label and have this available for printing from the website directly. We are building out a Vendor based drop shipping affiliate program and need the entire process automated.

 

When we get an order (assuming its there stock) they would get an email with a name and address to send the order to. They would also receive a link to a page containing a pre-populated label for that order. They would only have to get the package out of door.

 

There affiliate account would get credited and they would be issued a check at months end.

 

I'm thinking of combining and expanding OscAffiliate with Multi Vendor Shipping to include the above functionality.

 

Has anyone done this? Anything of the shelf I can use? Anyone experienced enough to assist in development?. Have budget, will pay. contact me for more info.

 

Thanks

 

Chris

 

As far as I know Chris no one has contributed any such modifications.

 

MVS certainly offers an ideal base for what you are talking about.

 

I have done some custom work of this nature and may be able to help you out. PM and we can discuss the particulars. 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

Ok folks, here is a fix for the checking out without a shipping method being selected, that should cover each Vendor that may be in the cart.

 

The code we had been working with, in catalog->checkout_payment.php, I added some code:

	 // MVS
 //if no shipping method has been selected, redirect the customer to the shipping method selection page
if ($cart->content_type !== 'virtual') {
if (!isset($shipping[title])) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 }
 }//MVS end

 

This worked, but did not cover the reality of multiple Vendors, with only one Vendor missing a shipping option which allowed the customer to checkout without paying for shipping for one or more of the products.

 

So now, we need to change that entire piece of code to this:

	 // MVS
 //if no shipping method has been selected, redirect the customer to the shipping method selection page
if ($cart->content_type !== 'virtual') {
if (count($shipping['vendor']) != count($cart->vendor_shipping)) {
 tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED_SELECTED . ERROR_NO_SHIPPING_SELECTED_SELECTED_MORE, 'SSL'));
	}
} //MVS end

 

This will compare the number of Vendors involved in the order to number of shipping titles selected by the customer, if they are not the same, they will be sent back to checkout_shipping to with a message to select a shipping method.

 

For the message itself, open catalog->includes->languages->'THE LANG. file OF YOUR CHOICE' and add:

define('ERROR_NO_SHIPPING_SELECTED_SELECTED', '* You must select a shipping method for each group of products,');
define('ERROR_NO_SHIPPING_SELECTED_SELECTED_MORE', ' if none is available, please contact ' . STORE_NAME . ' at ' . STORE_OWNER_EMAIL_ADDRESS);

 

You can edit these lines as you see fit of course. If anyone finds any difficulty with this, please let me know, but I beleive this will solve this issue. The only other possibilty will be when there is a GV in the basket as well as real products, it may create some strange behavior, I will play around with this as much as I can.

 

Craig :)

AWSOME! Thanks Craig!

that does just the trick and I like the big red banner at the top with the error message!

 

Jim

Jim Bullen - President

The Cigar Hut Group of Companies

 

still using these installed 2.3x add-ons: 

PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more!

Link to comment
Share on other sites

AWSOME! Thanks Craig!

that does just the trick and I like the big red banner at the top with the error message!

 

Jim

 

Ditto- looks good to me too.

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

Great catch, Craig. Thanks. And sooooo easy to implement. :D

Hey, that's how we like it isn't it?!

 

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 hate to complicate things (really!) but there is one case here that could fail. If all products are Virtual, no shipping is needed and this test will not execute (and does not need to). If all products are Physical the test will execute and prevent checkout without selecting a method for each vendor.

 

The problem comes when the type is Mixed. If you have one vendor which only has Virtual product(s), say a CV, then you will not be able to check out at all. Mixed Physical and Virtual products from a single vendor will still work.

 

I've been staring at this for a while, and have seen two solutions. The first is modifying the vendor_shipping method in the shopping_cart class to give us a content_type for each vendor. This could then be checked as Craig has done above. Given the structure of that method, this would be messy to implement. Alternatively, it would probably be simpler to build a new method, similar to the standard get_content_type(), to give a count by vendor. I'm leaning toward the latter solution. If anybody has any better ideas, now would be a good time to speak up. Otherwise I will probably code this and start testing.

 

Regards

Jim

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

Link to comment
Share on other sites

I hate to complicate things (really!) but there is one case here that could fail. If all products are Virtual, no shipping is needed and this test will not execute (and does not need to). If all products are Physical the test will execute and prevent checkout without selecting a method for each vendor.

 

The problem comes when the type is Mixed. If you have one vendor which only has Virtual product(s), say a CV, then you will not be able to check out at all. Mixed Physical and Virtual products from a single vendor will still work.

 

I've been staring at this for a while, and have seen two solutions. The first is modifying the vendor_shipping method in the shopping_cart class to give us a content_type for each vendor. This could then be checked as Craig has done above. Given the structure of that method, this would be messy to implement. Alternatively, it would probably be simpler to build a new method, similar to the standard get_content_type(), to give a count by vendor. I'm leaning toward the latter solution. If anybody has any better ideas, now would be a good time to speak up. Otherwise I will probably code this and start testing.

 

Regards

Jim

As a matter of fact Jim, I was just going thru this very point myself. Yet another reality check. I think we need to simply get the count by vendor, I have been experimenting with this very idea for about a half an hour now and I think I have it implemented without much fuss. I need to do a bit more testing, but I think it's working properly.

 

Be back to it later, 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 need to do a bit more testing, but I think it's working properly.

 

Better Idea #3: Get somebody else to do it. :P

Have at it Craig. Let me know if you need me to do anything.

 

Back to installing Other Software....

 

Regards

Jim

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

Link to comment
Share on other sites

Cheers, Craig... :thumbsup:

 

I solved my invalid zone problem.... modified Dan Naegle's RFQ contribution, which handles the situation perfectly.... so this was the last remaining niggle. :D

 

You should make a contribution of it ! I'm searching for this modif... :-"

 

If you don't know how to upload a contribution, you can also make a copy/paste of your rfq.php if vendors_shipping :thumbsup:

Link to comment
Share on other sites

Great Maggi, glad you've got it worked out. If you were able to get this module modified for MVS, pass it on, we'd love to see it. You never know how many other folks can use this tool as well. If you aren't comfortable creating a contribution, send me your mods and I will put it together for you, with you're credit.

 

Thanks for the work and support, Craig :)

 

Sorted :blush:

Link to comment
Share on other sites

Any idea when we might see a roll up of all these changes released in a package? I am very interested in adding this to my site but am a little worried with all of the updates that have been made since the last release candidate was posted.

 

Just wondering,

Chuck

Link to comment
Share on other sites

Any idea when we might see a roll up of all these changes released in a package? I am very interested in adding this to my site but am a little worried with all of the updates that have been made since the last release candidate was posted.

 

Just wondering,

Chuck

My intentions have been to release as soon as possible, however, with some of the bugs we have found, I have decided to also make sure MVS is OK with all the know security issues addressed in the last osC update, osCommerce Update.

 

Once I get through that, I plan to get the next release out. I am sorry for the time lapse, but I also need to make a living and am very busy.

 

MVS is actually pretty stable, we have only one or 2 serious bugs, many little things. I realize it is difficult to keep up with this thread at this point, but there is little choice in that.

 

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

 

While troubleshooting my admin/categories.php (I don't know what I did wrong but I fixed it!), I found this tiny error in the version of the file that comes with MVS:

 

at line 701 you have

 

<?php //vendors_email start
		?>
		<td class="pageHeading" align="right">" . $currencies->format($pInfo->vendors_product_price); ?>
	  </tr>
   <?php   //   vendors_email end
   ?>

 

But the </tr> is superfluous- that row is closed in the next line, stock code.

 

Cheers

Stew

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

Craig and Jim-

 

Zero Weight Skips Shipping is giving me a headache. Basically, what I'm seeing is that when I use this mod, the products in the cart aren't assigned their vendor id so the order shows up in the backend as a non-MVS order. As I have it set right now the code to redirect to the payment page is near the top of the page, however I've tried it almost everywhere right up to where the head of the page begins with the same result.

 

Also, even without this mod, the vendor email is not being automatically sent. There is a fix for this that was posted recently, but it doesn't appear to work for me.

 

I don't know what to do about either of these problems. I thought I had the Zero Weight Skips Shipping thing figured out months ago, but I guess not. Brickle Frickle!

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

Zero Weight Skips Shipping-

 

Despite my previous posted problems, I have had a bit of luck with this particular mod. In order to prevent a loop, I've modified the fix for checkout without paying for shipping to look like this:

 

// MVS v4.0
//if no shipping method has been selected, redirect the customer to the shipping method selection page
if (($cart->content_type !== 'virtual') || ($total_weight > 0 )){
if (count($shipping['vendor']) != count($cart->vendor_shipping)) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED_SELECTED . ERROR_NO_SHIPPING_SELECTED_SELECTED_MORE, 'SSL'));
}
} //MVS end

 

Basically what was added in is the

|| ($total_weight > 0 )

 

Maybe this will help others....

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

Zero Weight Skips Shipping-

 

Despite my previous posted problems, I have had a bit of luck with this particular mod. In order to prevent a loop, I've modified the fix for checkout without paying for shipping to look like this:

 

// MVS v4.0
//if no shipping method has been selected, redirect the customer to the shipping method selection page
if (($cart->content_type !== 'virtual') || ($total_weight > 0 )){
if (count($shipping['vendor']) != count($cart->vendor_shipping)) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED_SELECTED . ERROR_NO_SHIPPING_SELECTED_SELECTED_MORE, 'SSL'));
}
} //MVS end

 

Basically what was added in is the

|| ($total_weight > 0 )

 

Maybe this will help others....

The only problem with this is that if the Vendor assigned to multiple products that are in the cart has a shipping module installed such as flat, item or one that is per product not by weight, the customer will still be charged for shipping the item.

 

I should have posted this last week when I happened across this to fix an issue I was dealing with that ultimately is the same thing you are dealing with. I also have not tested this thoroughly, so it is possible that it will cause other issues. Maybe something to play with.

 

In catalog/includes/classses/shopping_cart.php, find the query in the MVS added code:

$products_query = tep_db_query("select products_id,
										   products_price,
										   products_tax_class_id,
										   products_weight,
										   vendors_id
									from " . TABLE_PRODUCTS . "
									where products_id = '" . (int)$products_id . "'"
								  );

and replace it with this:

$excluded_weight = EXCLUDED_WEIGHT;
	if (tep_not_null($excluded_weight))  {
	$products_query = tep_db_query("select products_id,
										   products_price,
										   products_tax_class_id,
										   products_weight,
										   vendors_id
									from " . TABLE_PRODUCTS . "
									where products_id = '" . (int)$products_id . "' and products_weight > '" . EXCLUDED_WEIGHT . "'"
								  );
	} else {
	$products_query = tep_db_query("select products_id,
										   products_price,
										   products_tax_class_id,
										   products_weight,
										   vendors_id
									from " . TABLE_PRODUCTS . "
									where products_id = '" . (int)$products_id . "'"
								  );
 }

then at the top of the same file below this code:

 function restore_contents() {
  global $customer_id;

add

   //mvs remove prod from shipping array if weight = 'CHANGE TO YOUR NEEDS-DEFAULT IS 0'
  define('EXCLUDED_WEIGHT', '0');

What this will do is remove the product(with a weight of whatever you set it to, here it is zero) from the array that is built to count and get shipping quotes for. The only problem with this is that it will not show in the shipping selection page along with any other products that are in the cart. Note, all we are doing is adding to the "where" clause in the query, checking for whatever weight limit you want.

 

How this will handle a scenario such as the only product in the cart is a zero weight product or something of that nature, I am not sure.

 

If you play with this, let me know what your results are.

 

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

Zero Weight Skips Shipping-

 

Despite my previous posted problems, I have had a bit of luck with this particular mod. In order to prevent a loop, I've modified the fix for checkout without paying for shipping to look like this:

 

// MVS v4.0
//if no shipping method has been selected, redirect the customer to the shipping method selection page
if (($cart->content_type !== 'virtual') || ($total_weight > 0 )){
if (count($shipping['vendor']) != count($cart->vendor_shipping)) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED_SELECTED . ERROR_NO_SHIPPING_SELECTED_SELECTED_MORE, 'SSL'));
}
} //MVS end

 

Basically what was added in is the

|| ($total_weight > 0 )

 

Maybe this will help others....

Actually, I don't think this works. Why not, I don't know, but more testing is required.

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