kendry Posted September 11, 2013 Posted September 11, 2013 Hi, When selecting a shipping method I can choose: Shipping by courier Personal Collection I would like to "Shipping by courier" was always checked. Unfortunately when I checked "Shipping by courier" and go to checkout_payment.php section and go back to checkout_shipping.php then "Personal Collection is checked. I read a bit in this forum, and a few people have written about change function cheapest() (includes/classes/shipping.php) but and don't know how to change it. Can anyone help?
kendry Posted September 12, 2013 Author Posted September 12, 2013 My function cheapest looks: 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; } } Maybe someone knows where I can turn off ??
Recommended Posts
Archived
This topic is now archived and is closed to further replies.