Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
Airmail over 2Kg
 
John
Sr. Member
 
Avatar
Total Posts:  96
Joined:  2007-12-20
Sheffield, United Kingdom
 

Hi - just looking at the module and for Airmail it does not seem to stop at a particular weight. 

The Airmail goes up to 2Kg except for Books and pamphlets which can go up to 5kg.

Is this a bug? or is there something I don’t understand about Airmail…

Thanks
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
got-bonsai
Sr. Member
 
Avatar
Total Posts:  123
Joined:  2008-10-25
Wales, UK
 

Hi John,

I have no idea how to differentiate between printed papers and parcels, but to stop all airmail at 2kg you need to edit code/community/meanbee/royalmail/shipping/carrier/royalmail/airmail.php

Find line 212 and replace

while($weight > 1000) {

with

while($weight <=2000 && $weight > 1000) {

I haven’t tested this yet but it should work.
We are going to leave it as it is for now though as there are other options, such as parcelforce international that do ship over 2kg (I’m not sure how the price matches up yet though)

 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Sr. Member
 
Avatar
Total Posts:  96
Joined:  2007-12-20
Sheffield, United Kingdom
 

I have just looked at that and I have solved this in a different way.

I added a line just above that

if ($weight > 2000) return null;

In this way the cost is null and so the method is not displayed.  All tested and working.

Thanks for the comment though

Regards
John

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
194012 users|456 users currently online|356001 forum posts