With postcodes under 1000, lookups don't work. This is because the database stores the postcode 800 as '0800', and the lookup at time of calculating shipping options selects where dest_zip='800'. I've removed the str_pad so solve this issue. The other option would be to pad during lookup. I'm not sure what the value is in padding it out as input time though.