• Hello.
    I am testing the plugin on your test page https://plugin.globalbizsol.com/wp-ride-booking/
    and when I put 2 points that are below 50klm I get a wrong total price.
    For example, I put for Source N Piedra Rd, Sanger,California and for Destination Sanger, California and I get a distance of 17,4 km and total rate of $384 for a $2 rate per km

    Why does this happen?

    Thank you in advance

Viewing 10 replies - 1 through 10 (of 10 total)
  • I got the same problem
    i was unable to find the error tho :S

    Plugin Author GBS Developer

    (@gbsdeveloper)

    Hi,

    I don’t think this problem should arise, We have tested plugin for the same locations and we are getting correct results.
    We are getting distance 17.4 and rates are $2/km

    Total price is $34.8

    So if you are still facing issues then please share your website urls so that we can check there.
    Might be some other plugins are conflicting or something other issues.

    Thanks

    Thread Starter efstraatios

    (@efstraatios)

    OK thank you.

    Can I set the map to be showing a country before the visitor types in the address and hit calculate?

    I got the same problem when I give a distance over 100km for example (brussels to oostende) with a rate of 1€/km then the total rate is €111.
    But when i give a distance with less then 100km for example brussel to zaventem then the total rate is €157 for 15.7 km at a rate of 1€/km.
    I think there is a comma missing somewhere.
    It would be great if you guide us how to fix this problem
    thanks for reading

    You can test the results yourself here: https://belgiumtaxi.com/pay-now/

    results under 100km: Per km rate : € 1 Distance : 15,7 km Total Rate : € 157
    results above 100km: Per km rate : € 1 Distance : 111 km Total Rate : € 111

    Plugin Author GBS Developer

    (@gbsdeveloper)

    Hi lordkek,

    Thank you for providing website url. I have tested it with the location provided by you and its working perfectly so might be you are using comma as a decimal separator so just change the functions to use comma as a decimal separator instead of dot.

    Let us know if you still face any issues then you may hire our services to do this for you.

    @efstraatios : You may just use placeholder for showing a country by default on the text boxes.

    Thanks

    Just changed the decimal separator to a comma in woocommerce settings but still have the problem.

    • This reply was modified 6 years, 9 months ago by lordkek.
    Thread Starter efstraatios

    (@efstraatios)

    I think that the demical separator should be a dot cause google maps give for distance dot separated number (ex. 2.6 km)
    Change it back and retry.
    Also, disable all plugins except woocommerce and wp booking ride and give it a go

    @efsrraatios

    i just tried what you said but still, have the same problem.
    Did you figure it out or do you still have this problem?

    EDIT: I just solved the problem.
    Go to plugin > editor > ride-functions.php
    search for this: $distance = (float) str_replace(“,”,””,$_POST[‘distance’]);

    Change it to this: $distance = (float) str_replace(“.”,””,$_POST[‘distance’]);

    • This reply was modified 6 years, 9 months ago by lordkek.
    Thread Starter efstraatios

    (@efstraatios)

    I think the problem is in the distance that google sends. Sometimes I get a result with a , and sometimes with a .

    I do not now why. Thanks for your answer with the solution

    the problem is still there on mobile browsers
    any ideas why this is happening?
    EDIT: solved the problem, just edit it to this: $distance = (float) str_replace(“”,””,$_POST[‘distance’]);

    On PC you won’t have ,00 anymore tho.
    just a rounded up number

    • This reply was modified 6 years, 9 months ago by lordkek.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error in calculating price’ is closed to new replies.