Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping Problem


Schuyl

Recommended Posts

Have taken over hosting a clients website running on osCommerce 2.2-MS2, they are having issues with the shipping on orders that no matter which shipping method is chosen the most expensive one is calculated every time, is there a fix for this? Any other advice on what I could do to get this working correctly?

 

Thanks

Link to comment
Share on other sites

Best advice I can give you is...........create a new store using v2.3.1. If the client is still using MS2 than their code is very outdated and more than likely riddled with 'gremlins'

 

 

 

 

 

Chris

Link to comment
Share on other sites

This has been reported with some USPS version but that was almost more then an year back as USPS or UPS did some changes to the way shipping XML and variables were to be used.

 

you need to look into classes/shipping.php for this function:

function cheapest() {

if (is_array($this->modules)) {

$rates = array();

 

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ($GLOBALS[$class]->enabled) {

$quotes = $GLOBALS[$class]->quotes;

for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {

if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {

$rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],

'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',

'cost' => $quotes['methods'][$i]['cost']);

}

}

}

}

 

$cheapest = false;

for ($i=0, $n=sizeof($rates); $i<$n; $i++) {

if (is_array($cheapest)) {

if ($rates[$i]['cost'] < $cheapest['cost']) {

$cheapest = $rates[$i];

}

} else {

$cheapest = $rates[$i];

}

}

 

return $cheapest;

}

}

}

 

Ans make sure this cheapest function is called and used.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Would updating the old store to the new one be an easy task or are we basically looking at re building the entire thing from scratch? Can the database be moved over or also have to be re done from scratch?

 

Thanks for the help

Link to comment
Share on other sites

From past experience, it is less work to create a new website rather than to try to update your old site. Also, it has been found that updated stores become less stable with each updte performed and contributions also need to updated along with the core code.

 

 

Chris

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...