I created a custom shipping module that allows me to set flat shipping rates per category and zone. Everything works great except that no matter what option I select the only the first shipping option in the list is passed to the payment checkout page. Here is the loop code. Does anyone know how I can get this to work? Thanks in advance. Using Zencart 1.39e
The $count_poles variable is a check to see if the shipping method is allowed for the category and $check_zone verifies that it is valid for the customer's geo zone.
Code:
foreach $zone /* more code */ {
if ($category == $count_poles && $check_zone == $order->delivery['zone_id']) {
$methods[] = array(
'id' => $this->code.'_0'.$i,
'title' => $shipping_title,
'cost' => $shipping_cost
);
}
}
$this->quotes = array(
'id' => $this->code,
'module' => $this->title,
'methods' => $methods,
);
$this->quotes['methods'] = $methods;
Bookmarks