I'd like to have customer pay shipping fee on a flat + Per item rule:
For example, the shipping fee for the first 1-5 itemsis $20 and addtional $2 per item for addtional items.
How to set this kind of shipping fee?
Thanks!
The easiest way is to make this edit:
IN:
REPLACE:
WITH:
If you need variable costs per quantity instead, I have a Quantity-Based Shipping extension that could handle it.
IN:
Code: Select all
/catalog/model/shipping/item.php
Code: Select all
$quote_data['item'] = array(
'id' => 'item.item',
'title' => $this->language->get('text_description'),
'cost' => $this->config->get('item_cost') * $this->cart->countProducts(),
'tax_class_id' => $this->config->get('item_tax_class_id'),
'text' => $this->currency->format($this->tax->calculate($this->config->get('item_cost') * $this->cart->countProducts(), $this->config->get('item_tax_class_id'), $this->config->get('config_tax')))
);
Code: Select all
$cost = $this->config->get('item_cost') * $this->cart->countProducts();
$cost = ($cost < 20) ? 20 : $cost;
$quote_data['item'] = array(
'id' => 'item.item',
'title' => $this->language->get('text_description'),
'cost' => $cost,
'tax_class_id' => $this->config->get('item_tax_class_id'),
'text' => $this->currency->format($this->tax->calculate($cost, $this->config->get('item_tax_class_id'), $this->config->get('config_tax')))
);
Who is online
Users browsing this forum: No registered users and 37 guests