Skip to content

Commit

Permalink
Added default message and rate for tablebasedshipping
Browse files Browse the repository at this point in the history
  • Loading branch information
freddirkse committed Jun 16, 2011
1 parent fd1e450 commit 2b878e1
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -60,18 +60,20 @@ public function getRates($order) {
//52 - PuertoRico
$stateUpcharge = array('2','21','52');

if(!empty($c)) {
$rates = array();
if(!empty($c)) {
for($i = 0; $i < count($c); $i++) {

if (in_array($currentMethod->state, $stateUpcharge)) {
$c[$i] += 1.50; $c[$i] += 1.50;
}
$rates[0 . ($i+1)] = array('id' => 0 . ($i+1), 'title' => $this->shippingspeeds[$i]->speed, 'cost' => $c[$i]);
if($i <= 9) $rates[($i+1)] = array('id' => 0 . ($i+1), 'title' => $this->shippingspeeds[$i]->speed, 'cost' => $c[$i]);
else $rates[0 . ($i+1)] = array('id' => 0 . ($i+1), 'title' => $this->shippingspeeds[$i]->speed, 'cost' => $c[$i]);

}
}

if(!count($rates)) $rates[01] = array('id' => 01, 'title' => "Table Based Shipping is Currently NOT Configured", 'cost' => 0);
return $rates;
}

Expand Down

0 comments on commit 2b878e1

Please sign in to comment.