• Resolved zkenstein

    (@zkenstein)


    Hi,

    Is it any experienced how to implement the auto generate last number on Give Total amount? for example if Total Give donation is 50,00 the function will auto generate the last number and the total will be 50,29 (29 is the auto generate random number), with this unique amount total will easily to track the Offline payment verification.

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Hi there,

    While Give isn’t able to do this sort of thing out of the box. This can likely be achieved with custom development.

    We have a code snippet here that’s used for ticket sales and assigning a quantity to the total donation.

    While you wouldn’t need the ability to assign a quantity, it will show you how to populate the final donation total at the bottom of the form with a value you set.

    You could then write a function that autogenerates a number, appends that to the donation total value, then use this code snippet to create a way to assign that amount to the donation total. Here’s the link to that code snippet:

    https://github.com/impress-org/givewp-snippet-library/blob/master/form-customizations/give-simple-ticket-incrementer.php

    If you need assistance implementing custom code on your website we have this guide:
    https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Please note that this code snippet is provided as an example of how you can extend Give with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.

    ?We also recommend you first make these changes on a staging site or local development environment before running this on your live site, to make sure everything goes smoothly.

Viewing 1 replies (of 1 total)
  • The topic ‘Function to generate custom generated Total Donation’ is closed to new replies.