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

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Change mf_get_payment_total() function in post-functions to show half amount?


  1. chickc
    Member

    I am programmer and I need to change this form http://www.webwizards.pro/machform/view.php?id=3902 to show half amount when user selected radio button "Payments (credit card or paypal account) ", named "Pay 50% deposit". I made this view in javascript, but it seems to change post-functions.php to make this amount saved to continue for review and payment. Now only full amount is go through to the paypal review page. I need someone to show me how to insert condition in loop and where if is picked this form and this radio button, cut amount and show total with half of amount.

    Posted 10 years ago #
  2. yuniar

    If you are using PayPal, you actually need to modify the "mf_get_merchant_redirect_url()" function. This is the function that passed the amounts into PayPal.

    At the end of that function, you should find this:

    $paypal_params['item_name_'.$i] = $item_name;
    $paypal_params['amount_'.$i] 	  = $amount;
    $paypal_params['quantity_'.$i]  = $quantity;

    you can add some conditional code to reduce the $amount above.


    MachForm Founder

    Posted 10 years ago #

RSS feed for this topic

Reply