Okay .. new method same file:
Code:// class methods function quote($method = '') { global $order, $total_count; // bof: charge $1 or $5.95 or $6.95 $new_shipping = 0; $chk_1 = 0; $chk_595 = 0; $chk_products = $_SESSION['cart']->get_products(); for ($i=0, $n=sizeof($chk_products); $i<$n; $i++) { if ($chk_products[$i]['weight'] == 1.00) { $chk_1 = $chk_1 + $chk_products[$i]['quantity']; } if ($chk_products[$i]['weight'] == 5.95) { $chk_595 = $chk_595 + $chk_products[$i]['quantity']; } // echo 'ID: ' . (int)$chk_products[$i]['id'] . ' Name: ' . $chk_products[$i]['name'] . ' weight: ' . $chk_products[$i]['weight'] . ' qty: ' . $chk_products[$i]['quantity'] . '<br>'; } $new_shipping = 0; if ($chk_1 > 0) { $new_shipping = 1; } if ($chk_595 > 0) { $new_shipping += 5.95; } //echo 'New shipping charge: ' . $new_shipping . '<br>'; // adjusted count for free shipping $item_total_count = $total_count - $_SESSION['cart']->free_shipping_items(); $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_ITEM_TEXT_WAY, 'cost' => $new_shipping + MODULE_SHIPPING_ITEM_HANDLING))); // eof: charge $1 or $5.95 or $6.95 if ($this->tax_class > 0) {


Reply With Quote

