Jump to content
blucollarguy

Multi_Vendor_Shipping new thread

Recommended Posts

In that case, it's likely that you missed a change. The example that you showed still has the original constant. Failing to change the constants could cause a conflict with the original module.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

In that case, it's likely that you missed a change. The example that you showed still has the original constant. Failing to change the constants could cause a conflict with the original module.

 

Regards

Jim

The code example is freeamount.php because it doesn't work in respect to the maximum weight either. I've confirmed that on a test site with MVS loaded. I don't actually have a test site without MVS so I can't test the 2nd code sample here.

If someone knows that they have the MVS freeamount.php working please let me know.

I went back to the original contrib http://www.oscommerce.com/community/contributions,146 and stated comparing that code to the MVS version.

Here's the relevant code from the MVS version;

      if ($shipping_weight > @constant('MODULE_SHIPPING_FAIRAMOUNT_WEIGHT_MAX_' . $vendors_id)) $this->quotes['error'] = MODULE_SHIPPING_FAIRAMOUNT_TEXT_TO_HEIGHT . ' (' . $shipping_weight . ') ' . MODULE_SHIPPING_FAIRAMOUNT_TEXT_UNIT;
     if ($cart->show_total() < @constant('MODULE_SHIPPING_FAIRAMOUNT_AMOUNT_' . $vendors_id)) {
    //   if (@constant('MODULE_SHIPPING_FAIRAMOUNT_DISPLAY_' . $vendors_id) == 'False') return;
    //   else $this->quotes['error'] = MODULE_SHIPPING_FAIRAMOUNT_TEXT_ERROR;

     } else {

      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_FAIRAMOUNT_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_FAIRAMOUNT_TEXT_WAY,
                                                     'cost' => $shipping)));
      }

And here's a sample from Freeamount 3.5d

     $total_weight = $shipping_num_boxes * $shipping_weight;
          if ($total_weight > MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX)
      {
		if (MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'True')
		   {
    	  	$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_TO_HEIGHT;
		   }
		$get_weight = false;
  } else {
   $get_weight = true;
  }

if (($get_total == true && $get_weight == true))

Seems like the MVS version never gets around to saying false to FREEAMOUNT if weight is over the max.

Edit; There's no conflict because I never loaded my mod to the test server. Also, you can put any sort of garbage into the "Maximum Weight" like .0000001 or %$error%%-1+ and it's totally disregarded.

Edited by motorcity

Share this post


Link to post
Share on other sites

Wow! I think I got it!

Sorry for previous post showing "fair" instead of "free".

in modules/// freeamount.php

lines 118 & 119 somewhere under..

// class methods
     $vendors_data = tep_db_fetch_array($vendors_data_query);
     $country_name = tep_get_countries($vendors_data['vendor_country'], true);
  $get_total = false;
  $get_weight = false;
     $handling_charge = $vendors_data['handling_charge'];

and lines 133-146

      if ($shipping_weight > @constant('MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX_' . $vendors_id)) {$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_TO_HEIGHT . ' (' . $shipping_weight . ') ' . MODULE_SHIPPING_FREEAMOUNT_TEXT_UNIT;
	$get_weight = false;
      }else {
   $get_weight = true;
  }
     if ($cart->show_total() < @constant('MODULE_SHIPPING_FREEAMOUNT_AMOUNT_' . $vendors_id)) {
       if (@constant('MODULE_SHIPPING_FREEAMOUNT_DISPLAY_' . $vendors_id) == 'False') return;
	$get_total = false;
      $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;
     } else {
    $get_total = true;

if (($get_total == true && $get_weight == true))
{
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY,
                                                     'cost' => $shipping)));
	}
      }

Share this post


Link to post
Share on other sites

If you've verified that this works, please update the MVS distribution package.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

thanks for the great contribution, I was wondering if there is anyway to show all shipping options + free shipping as well. Thanks

Share this post


Link to post
Share on other sites

MVS will show all of the shipping options that you have set up. If you have free shipping set up it will show. The only limitations are the ones that you have set in the Admin, such as Zones.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

hmm, well for some reason when I have items in cart that are qualify for free shipping, only the free shipping option shown

Share this post


Link to post
Share on other sites

If you are using the built-in free shipping, that's the way it works. This is standard osCommerce behavior. If you use a module for free shipping then it will show up whenever it is allowed. You can use the Flat module and set the cost to 0 to make a free module.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

im so sorry, I was mistaken this contribution for the MVS Shipping Estimator

 

which I can't get it to out put all the shipping options + free shipping as mentioned. Is there anyway you can help me with that? since there is no support forum for that contrib. Thanks

Edited by ptt81

Share this post


Link to post
Share on other sites

The answer is the same. The shipping estimator uses the same shipping modules in the same way as stock osCommerce or MVS. It's actually just a stripped-down version of the Shipping page.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

well i guess im out of luck on this one, im using the built-in free shipping w/minimum order and no matter what I do, it only show free shipping as the only option. Of course when the total in cart does not qualify for free shipping, then other shipping would show, but thats not the point here. Thank you anyway.

Edited by ptt81

Share this post


Link to post
Share on other sites

First, I like to say Thank You for the contribution. I have too many suppliers and this is a great contribution for me.

 

I have spent two days to install this contribution (go over and go over it again since it has so much modifications)

 

I have installed MVS, and executed MVS sql. There were no errors. I got Vendor in admin panel, but when I read the usage it says I need to Open Admin panel, click on Configuration->Shipping/Packaging, then click on Use Vendor Shipping.

 

I did not see this option in there.

 

Is there something wrong? Did I miss something or the sql is not right? Could someone help me with this. Thank you in advance.

Share this post


Link to post
Share on other sites

The actual text is Enable Vendor Shipping. I need to fix the instructions.

 

That's the first section of mvs.sql, so if that text is not there, the SQL was not executed.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hi,

 

Firstly, many thanks for a great contribution which is allowing me to do my shipping how I would like to do it.

 

Secondly, I know this problem is probably my own causing of missing something in the instructions, but would really appreiciate some feedback on where to start looking.

 

The module works fine, but when I go in to edit a product in admin, it wipes the product name and comes up with "New Product". The prices of the product are still there so it looks like it is just not picking up the details for that bit from the database for some reason.

 

Any ideas please, please?

 

Ali

Share this post


Link to post
Share on other sites

MVS should not have that effect. I think you made a mistake in editing admin/categories.php. Check your edits carefully.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

The actual text is Enable Vendor Shipping. I need to fix the instructions.

 

That's the first section of mvs.sql, so if that text is not there, the SQL was not executed.

 

Regards

Jim

 

Wow!!! that was a fast respond. You think I should executed it again? or You think I should manual do so it work give me a duplicate error?

 

Thank you Jim

Share this post


Link to post
Share on other sites

Hi Jim,

I have correct the problem, but I have another problem. HeeHee.

 

When I select a vendor and click the Manage button. It bring up Vendor Shipping Modules

manager. But I didn't see anything in there for me to install. Is this also a sql problem?

 

Thank you and best regards.

Share this post


Link to post
Share on other sites

That's most likely caused by failing to upload the modules in catalog/includes/modules/vendor_shipping/.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

That's most likely caused by failing to upload the modules in catalog/includes/modules/vendor_shipping/.

 

Regards

Jim

 

Hi Jim,

 

I corrected that problem. Actually I name the folder vendors_shipping wrong. But then after I correct that problem, I have another problem popped up...lol..

 

Warning: require_once(includes/classes/xml_5.php) [function.require-once]: failed to open stream: No such file or directory in /home/topdispl/public_html/includes/modules/vendors_shipping/bax.php on line 17

 

Fatal error: require_once() [function.require]: Failed opening required 'includes/classes/xml_5.php' (include_path='.:/usr/local/php52/pear') in /home/topdispl/public_html/includes/modules/vendors_shipping/bax.php on line 17

 

Thank you for your help Jim.

Share this post


Link to post
Share on other sites

Does includes/classes/xml_5.php exist?

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Then I don't know why it's complaining. Try removing the bax.php from that directory. If that does not solve the problem, or you need that module, we'll have to try something else.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Then I don't know why it's complaining. Try removing the bax.php from that directory. If that does not solve the problem, or you need that module, we'll have to try something else.

 

Regards

Jim

 

Hi Jim,

I have deleted the bax.php and it error now gone. But it seems like the vendor shipping doesn't work. I tested it out. Make a one vendor, and use it on one product. When I added the product in the cart, the shipping that I chose for that vendor didn't show up. For example, I install free shipping but it didn't show up. Matter of fact, it didnt' even show shipping option up (i'm using one page check out).

 

I have searched for a solution til now I cannot find out an answer.

 

Do you have anything on this one, Jim? Thank you for your helps. I am really appreciate this.

Share this post


Link to post
Share on other sites

One Page Checkout must be modified with the changes that MVS would normally make to checkout_shipping.php. There will probably be other changes needed to make things like the shipping selection check (normally done at the top of checkout_payment.php) work. I assume that you haven't made those edits.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

One Page Checkout must be modified with the changes that MVS would normally make to checkout_shipping.php. There will probably be other changes needed to make things like the shipping selection check (normally done at the top of checkout_payment.php) work. I assume that you haven't made those edits.

 

Regards

Jim

 

Wow again. You are quick. I thought I would get it in the morning. lol. I will double check the checkout_payment.php again. Thank you once again. Please send me your email paypal so there should be an invaluable contribution from my part.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×