[Skip to main content](#vessel-content)

#   How to use shipping price with formula

##

- **[oxido](/forum/user/29793-oxido "View oxido's Profile")**
- [![oxido's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29793-oxido "View oxido's Profile") Topic Author
- [ Offline](/forum/user/29793-oxido)

Less More

- Posts: 284
- Thank you received: 42
-
-

1 year 11 months ago [\#364465](#364465) by [oxido](/forum/user/29793-oxido "View oxido's Profile")  *[How to use shipping price with formula](/forum/28-shipping-methods/908869-how-to-use-shipping-price-with-formula#364465 "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 4.4.8 -- PHP version -- : 8.1.30  Hi guys, this is more like note for me :P  So if you want to have shipping price by weight you need to do this. If you have a product with 344g, in database you have just a number 344, no mg, no g, so you will have to convert 344 to grams, if you use Kg, that's perfect for you. To convert the number to grams, jsut do weight/1000. In my mai case, the shipping is $59/kg, in my database the weight is saved as grams (for books). So I have a book with the weight of 344g, and I want the client to pay the full price on kg, so I round up using ceil() function. If the order has the weight of 1200g, the client it will pay for 2000g.  The formula I use is this: ceil({weight}/1000)&#42;59 ")* was created by *[oxido](/forum/user/29793-oxido "View oxido's Profile")*

-- HikaShop version -- : 5.1.1
-- Joomla version -- : 4.4.8
-- PHP version -- : 8.1.30

Hi guys, this is more like note for me ![:P](/media/kunena/emoticons/14.png ":P")

So if you want to have shipping price by weight you need to do this.
If you have a product with 344g, in database you have just a number 344, no mg, no g, so you will have to convert 344 to grams, if you use Kg, that's perfect for you.
To convert the number to grams, jsut do weight/1000.
In my mai case, the shipping is $59/kg, in my database the weight is saved as grams (for books).
So I have a book with the weight of 344g, and I want the client to pay the full price on kg, so I round up using ceil() function.
If the order has the weight of 1200g, the client it will pay for 2000g.

**The formula I use is this: ceil({weight}/1000)\*59**

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvOTA4ODY5LWhvdy10by11c2Utc2hpcHBpbmctcHJpY2Utd2l0aC1mb3JtdWxhP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.041 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
