Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Cannot select higher rate of shipping


Recommended Posts

I have copied the Royal mail contrib, and made a second copy to enable priority posting. I renamed the fields to MODULE_SHIPPING_ANPOSTPRIORITY_ZONES_COST1_ etc. instead of MODULE_SHIPPING_ROYALMAIL_ZONES_COST1_ i.e. found and replaced all ROYALMAIL and replaced with ANPOSTPRIORITY.


The problem is that I cannot select a higher postage rate that the priority shipping module is giving me. I have used the contrib by DStomp

I was having problems with my customers using the cheapest (default) method for all their orders. I think this is because people get in a hurry. I disabled this default option by removing some code in a couple of pages. The end result..no shipping option is selected by default, forcing the user to make a selection, thus....READ.

Here ya go

part 1
includes/classes/shipping.php take out these lines(it is the last function on the page)...don't forget to complete the second part of this instruction

function cheapest() {
if (is_array($this->modules)) {
$rates = array();

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;

Part 2

catalog/checkout_shipping.php take out

if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

I hope this helps. Thanks
Dr Stomp


however it still will not accept my selection of higher postage.


Any Ideas ??



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.

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