This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Discount formatting on payment screen


  1. frankzobitz
    Member

    When using Stripe (I haven't checked if there is different behavior with PayPal), if the discount amount doesn't contain any cents (for example: $10.00) it only displays $10 rather than $10.00. The other amounts I have also don't contain any cents, however, they are displayed correctly with the .00.

    This is on the final payment screen where the user enters their credit card information.

    Any idea on how to get the discount price to have .00?

    Posted 8 years ago #
  2. yuniar

    Ah.. yes, this is a small bug with the formatting. To fix this, you can edit the "machform/includes/view-functions.php" file, search around line 7604 for this code:

    $payment_calculated_discount = round($payment_discount_amount,2);

    change it to become:

    $payment_calculated_discount = sprintf("%.2f",round($payment_discount_amount,2));

    Also, do the exact same thing with the code around line 7638


    MachForm Founder

    Posted 8 years ago #
  3. frankzobitz
    Member

    Thanks!

    Posted 8 years ago #

RSS feed for this topic

Reply