Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Shipping Flatrate - Price per article position not per article (items)
Sr. Member
Total Posts:  85
Joined:  2009-06-30
Genau zwischen Hamburg und Berlin


we are trying to change some “little” thing in Magento shipping flatrate.

We want the shipping price to be calculated from the handling fee plus a special fee per article (position).

For example when adding

product A 2x
product B 1x
product C 2x

the shipping cost shall be 13$ when handling fee is 10$ and the fee per article (postion) is 1$.
In standard Magento calculates 15$ because of product A and C being added twice to the cart.

As far as we have figured out the flatrate.php in folder app/code/core/Mage/Shipping/Model/Carrier line 79-80 is relevant for this

elseif ($this->getConfigData(’type’) == ‘I’) { // per item
$shippingPrice = ($request->getPackageQty() * $this->getConfigData(’price’)) - ($this->getFreeBoxes() * $this->getConfigData(’price’));

The part


should be it.

We tried to change this but did not get a positive result yet.
To make things totally clear it is the same issue with the cart sidebar view where you can change the configuration in System > Configuration > Sales > Checkout > My Cart Link from “Display items quantities” to “Display number of items in cart “.

So it should be something like “Number of items in cart * Price + Handling Fee = shipping cost” (in the above example 3 * 1$ + 10$ = 13$)

Does anybody have an idea how to do this?

Thanks in advance!

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top