Magento Forum

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

Hello,

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
and
product B 1x
and
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

$request->getPackageQty()

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