1

I'm trying to find an extension that will let me do the following:

  1. Per-category (preferably) or per-product (ok) settings where flat rate shipping applies for the products in that category / product.

  2. Enter a base rate for the first purchased item and then a different cost for each incremental item.

I am finding lots of extensions that will only let me set a single flat rate, so when you order 2 or more it just does a straight multiplication, which would be wrong in my case.

  • Do you mean smth similar: 1st item - 20, 2nd - 13, 3rd - 9, .... ? – zhartaunik Feb 23 '16 at 13:21
0

In native magento algorithm of calculating flatrate is following:

Mage_Shipping_Model_Carrier_Flatrate

$shippingPrice = ($request->getPackageQty() * $this->getConfigData('price')) 
- ($this->getFreeBoxes() * $this->getConfigData('price'));

In other words it's almost equals qty * price

You can modify existing class or implement your own carier, based on this. Creating new carrier can cause more time, so if you don't need base flatrate - just copy this file to local folder and edit the algorithm

You can put here any condition. Get product's category. Or implement smth like this:

$rates = array(1 => 20, 2 => 35, 3 => 45, /* other rates */)
$shippingPrice = $rates[$request->getPackageQty()];

If you have troubles with algorithm - share more details and we will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.