We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40122
    • 330 Posts
    Hi all,

    I have an API for Australia Post that gives me a price based on the user's inputted address. I need to have this dynamic price appear on the Check Out and be included in the total price to be processed by the payment method.

    As far as I know this means somehow intercepting or replacing the line:

    [[+method.price_add:notempty=`<li class="distribution">[[%simplecart.methods.yourcontribution? &price=`[[+method.price_add_formatted]]`]]</li>`]]


    within the scDeliveryMethod chunk.

    Would anyone know how to do this?

    Thanks!
      • 44195
      • 293 Posts
      I don't know SimpleCart very well but that line appears to just contain placeholders.
      You could quite easily change what is displayed in the cart I think but you'd need a way of inputting the amount to be processed by the payment gateway.
      That may mean modifying the snippet. Since it is a premium extra, it's probably best to contact Modmore directly about the solution.

        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com