Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Puck Holshuijsen 91 posts 355 karma points
    Jul 26, 2018 @ 11:49
    Puck Holshuijsen
    0

    How is the rate for shippingquotes calculated?

    Hi All,

    I got a shipping method with a rate tier.

    0 - 25 =              4.95
    25 - 100 =            9.95
    100 - 500 =          14.95
    500 - 9999999 =       0.00
    

    The shop is set to have price with vat excluded.

    I got a total price of 24.96, so I assume that I would get the 4.95, but that is not the case. I get the 9.95 shipment.

    I am guessing that the total price is rounded up to 25, but I am not sure. Anybody have a clue how to change this, and if this is the way how it works?

    Thanks!

    Puck

  • Simon Dingley 1431 posts 3332 karma points c-trib
    Jul 30, 2018 @ 07:54
    Simon Dingley
    0

    Perhaps take a look here:

    https://github.com/Merchello/Merchello/blob/318d55d1979c6972997c719c37a4c093b0278c64/src/Merchello.Core/Gateways/Shipping/FixedRate/FixedRateShippingGatewayMethod.cs

    and here:

    https://github.com/Merchello/Merchello/blob/318d55d1979c6972997c719c37a4c093b0278c64/src/Merchello.Core/Gateways/Shipping/FixedRate/FixedRateShipmentLineItemVisitor.cs

    and here:

    https://github.com/Merchello/Merchello/blob/8d80757f8ba7e772886038f67686b08e5b14584e/src/Merchello.Core/Extensions.ExtendedDataCollection.cs

    I don't think that there is any rounding going on as the price is a decimal. It's a while since I've actively developed anything on Merchello now so I can't recall where you set the option for prices to include/exclude tax. Have you checked how your Tax Provider is configured for the region you are shipping to?

    My suggestion would be to grab a copy of the Merchello source and step through it checking the values and the various stages of the shipping rate calculation.

  • Puck Holshuijsen 91 posts 355 karma points
    Jul 30, 2018 @ 08:02
    Puck Holshuijsen
    101

    Hi Simon,

    Thanks for the answer. I grabbed a copy of the source and found out what my problem was last week.

    I am calculating the prices for the products, based on a tier / single discount, which I set on the Price property. But what I didn't know, that there was the 'merchPrice' in the extended data which kept the original price. And that field is being used for calculating the shipping. So instead of using the 1.92 (which i gave the price property), it was still using the 2.02 the product originally cost.

  • Simon Dingley 1431 posts 3332 karma points c-trib
    Jul 30, 2018 @ 08:04
    Simon Dingley
    0

    Good work, glad you sorted it!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies