Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi Vendor Shipping and percent.php


jgkiefer

Recommended Posts

I have installed the Multi Vendor Shipping contribution (on snapshot 5-18-03) and using it with the ups.php and percent.php shipping modules. The initial installation is functioning great! The two shipping modules are functioning as they should. However when i follow the install doc- "You then will need to edit the remove function in each moudle so that the variables are not deleted.

With the current release you should just have to comment out this line

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");"

The ups.php shipping module is correct but the percent.php shipping module is not it shows a total of 0.00.

I am thinking that I have the switch set wrong in multiship.php.

case "percent":

$rate = new percent;

$mltQuote = $rate->quote('show_total');

//Any other module specific processing / charges should be done here

break;

Full code:

switch ($row['module_name'])

{

case "ups":



$rate = new ups;

$mltQuote = $rate->quote('GNDRES');



//Any other module specific processing / charges should be done here

break;

case "percent":

$rate = new percent;



mltQuote = $rate->quote('show_total');



//Any other module specific processing / charges should be done here

break;

case "usps":

$rate = new usps;



$mltQuote = $rate->quote('Priority');



//Any other module specific processing / charges should be done here

break;

I am really quite confused on how to describe the problem. The ups.php works but the percent.php does not.

Link to comment
Share on other sites

Hi there,

 

So, did you figure out your problem? I'm running into the same issue and also figured it was my switch. Where I'm a bit confused is the connection to th quote value?

 $rate->quote('show_total');

Now, where is 'show_total' referenced elsewhere? I understand that the case value of "percent" is pulled from the shipping_methods table. But what about the curious $rate->quote('some_value')?

 

Any help would be appreciated as my install is acting exactly the way you describe yours.

 

Kate

Link to comment
Share on other sites

No, I'm stuck. I also figured it was the switch. I also tried -

$rate->quote('show_total');

$rate->quote('total');

$rate->quote('percent');

$rate->quote('shipping_percent');

These did not work either. I am clueless as what the rate quote should be calling in the percent.php file.

 

Hmmm.. now that I look at the file it says "Any other module specific processing / charges should be done here" maybe the

$rate->quote('show_total');

is unnecessary, I never tried taking it out completely. (something tells me this is not wise)

I guess that you can see how stuck I am. But hey, I'm willing to try anything right now to solve this.

But fear not there is an answer for this somewhere. I just don't have it... yet. :shock:

Link to comment
Share on other sites

I dropped the author an email asking for help. His response is over my head. I will include it here as it may help someone else that is better at php than I am.

 

In shoping_cart.php (catalog/includes/classes) there

is a function called calculate you will need to keep

track of the price of items assinged to each shipping

method (the changes I made only track weight per

shipping method). So my code that does this is

 

//changes mltship

//get shipping methods

$methods = tep_db_fetch_array(tep_db_query("select

method_name from " . TABLE_SHIPPING_METHODS));

$mltcount = sizeof($methods);

 

$this->multi_weight = NULL;

 

for($i = 0; $i < $mltcount; $i++){

$this->multi_weight[] = Array($methods[$i]=>0);

}

//end chages mltship

 

You will need to write a smiliar function and add the

appopriate varibles to keep track of the price of

products assigned to a shipping method.

I am sure someone here knows how to do this. I am also sure it's not me. :(

Link to comment
Share on other sites

  • 2 weeks later...

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