i'm using Owebia shipping extension for calculation shipping method but not work as follow

ceil ($value,10) 

it's work when i use ceil()

for example if i got total shipping charges 60.540 it should be 70 how could i do that ? currently i'm using


extesion reference : https://www.magentocommerce.com/magento-connect/owebia-shipping-free.html

documentation : https://owebia.com/os2/en/doc


In PHP, ceil() is just rounding to the nearest integer.

Source: http://php.net/manual/en/function.ceil.php

If you want to round up to nearest fraction of 10, you can write a snippet to finish:

function ceil_up($float, $sig){
    return ceil($float / $sig) * $sig;

So in your case, ceil_up(60.540, 10); will return 70

  • i'm using owebia shipping configuration which use json so i cann't create php function for that.. i Used ceil() function working well but not solve my problem.. Jan 17 '17 at 8:49
  • I teached you the concept on PHP. So back to the module, you may try to setup "fees" by "ceil(({cart.weight}*(150+150*.15))/10)*10"
    – PY Yick
    Jan 17 '17 at 8:55
  • thanks for you suggestion but it would became unnecessary complex. simple ceil worked for me.. Feb 21 '18 at 9:33

Simple ceil() function worked for me.. I updated my question with answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.