I've got a very basic ecommerce website going. I'm struggling to come up with a method of dealing with shipping.

Most of my goods fit into one of two categories and have a clear fixed rate. Let's call them fresh goods, perishable and sent via express courier and I have two rates depending on where you live.

Then I have 'general merchandise', some are tiny and can be sent for $10 others heavy and cost $100

I don't have access to an API to calculate this and don't want to hard code rates based of itemID's etc.

I'm thinking of having a weight saved in the DB, and then doing a lookup once over 5kg charge X, once over 10kg charge X.. or once over X item count charge Y.

Are there any other ideas or suggestions

    6 days later

    Shipping costs will depend on who you use, and the service offerings from various shipping organizations can also get complicated. United States Postal Service (USPS), for example, offers priority mail, express mail, media mail, etc. and there are various sizes of packages that ship at fixed rates. You might choose one method of shipping for your entire site and boil the cost estimate down to something based on size and/or weight.

    It looks like FedEx offers an API to calculate rates. UPS also has an api, although it doesn't look very friendly at first glance.

      a month later
      Write a Reply...