Hi,

I need help with my code. I want to break down my shipping with a flat rate and a fee for any addition quantity of that particular product. From there I would like to be able to categorize these diffrent rates for diffrent product types. for example. Every extra product quantity will get a $1.00 fee.

hardcover book
Quantity.1 = $5.00
Quantity.2 = $6.00
Quantity.3 = $7.00
Ect..

Softcover book
Quantity.1 = $3.00
Quantity.2 = $4.00
Quantity.3 = $5.00
Ect...

I have followed a few threads but end up with code with errors that cause a blank shipping estimate sheet and missing shipping module. Need help.

I am using the item.php as the base of the module and I have kept the name the same for the reason that I dont need the default item.php.

Here is my code. If you have any suggestions or would like to work together to get this figured out. that would be great! I know alot of people want this sort of set-up.

PHP Code:
// class methods     
function quote($method '') {
     global 
$order$total_count;

// i ignore free shipping items.. all items are priced no matter what.
//$total_count = $total_count - $_SESSION['cart']->free_shipping_items();

// each array item is another array consisting of the product name, it's base shipping cost,
// the price of each extra unit shipped, and the IDs of each product in that price category.
$product_chart = array
(
'<card>' => array (
'base' => 2.75,
'extra' => .20,
'ids' => array (2,3),
'<mattedprint>' => array (
'base' => 4.55,
'extra' => 1.45,
'ids' => array (4,5),
'<laminatedsmall' => array (
'base' => 7.90,
'extra' => .90,
'ids' => array (8,9,10,12),

$cost 0,

// calculate the cost based on quantity
foreach ($order->products as $product) {        
$product_id explode(':'$product['id']);       
$product_id $product_id[0];        

foreach (
$product_chart as $product_type => $product_details) {

}
}
}

$this->quotes = array (
'id' => $this->code,
'module' => 'Shipping',
'methods' => array (
array(
'id' => $this->code,
'title' => MODULE_SHIPPING_MINE_TEXT_WAY,
'cost' => $cost
)
)
);