How to calculate shipping rate through product weight and cost per gram

Highlighted
New Member
4 0 0

Hi there!

 

I've been scratching my head and pulling my hair over this issue for almost a month now.

I would like to know if there is a way to, given a flat cost for skipped kilo, to calculate a shipping rate of a product.

Example: I know the cost to ship a kilogram of product ( I have several products with any given weight on my Shopify web store) is 13.5€/Kg and I have the weights of every product (that range from 0.2kg to 400Kg).

How can I display to the customer in the checkout process the shipping rate base on that information? How can I make a simple multiply of Price/Kg*Product-weight? 13.5*0.2, for example?

So I can have more accurate rates even if the customer orders a number of products that amass a total weight of 1.2Kg, 3.8Kg or 4.2Kg and so on...

 

Anyone with a good solution for this that doesn't involve apps!? I don't have any problem in going to the code and add this feature myself I just don't know where to start...

 

Thanks in advance

 

Best Regards,

Daniel

 

 

0 Likes