Okay
  Public Ticket #3393416
Need to know whether I can build a feature on my website using wpDataTables
Closed

Comments

  • Sabrina started the conversation

    Hello everyone. I am writing because I need to build a functionality on my website and I would like to know whether I can do it using wpDataTables. 

    I have a formidable form where my clients place orders. I want to display the entries of the form in a database and as far as I understood, I can do this using wpDataTables. 

    Then for each user I want to display the total price of what they ordered. For example I have a user placing 3 orders, 100 USD, 200 USD and 300 USD. The price column should have these values and in the end it should also have the total, so 600 USD. I can also do this using Calculation Functions. So far so good. 

    The trick is here. As the owner of the business, I want to be able to apply a discount on the total, for example I apply 100 USD discount, or the user already paid me 100 USD from the 600 and his new remaining total is 500 USD. 

    How can I add a field where I can manually enter all the amounts paid and automatically get the remaining amount for a certain user. 

    I would like to see all the discounts made also for example first time I made a 100 USD discount, then another 200 USD discount and so on. 

    Any help is appreciated I am lost.

    Attached files:  Screenshot 2023-06-15 at 15.33.58.png

  •  1,700
    Miloš replied

    Hi, Sabrina.

    I think you should be able to achieve this by adding an additional column that you can use to input how much they paid,

    and then you can combine this column that stores the "paid amount" with the "price" in a new Formula Column, to see the remaining ammount.

    In a Formula Column, you can combine other columns with basic math operations.


    Regarding calculation functions, here is our Documentation section with examples, how you can use this.

    Here you can see more details explained about a formula/calculated column.

    And here is our Documentation with an example how you can present percentages, currency and other columns.


    Just please note, there are several limitations when using formula columns in wpDataTables:

    1. One formula column cannot be used in another. This limitation can be avoided by using nested calculations.
    2. In tables with server-side processing formula, columns cannot be used for grouping, filtering, and sorting. Basically, formulas are calculated only for the rows that are immediately visible; Therefore, it’s not possible to “know” the values for currently invisible rows. Please note that this also applies to the “Manual” tables, as they also use server-side processing by default. Also, of course, it is not possible to edit the cells generated by formulas in the editable tables.
    3. Adding a sum in the sum row for formula columns is not yet supported.
    4. Using calculation functions in formula columns is not possible



    And i just wanted to point out that you can try wpDataTables before purchasing

     on our sandbox Demo sites ( you can find links for the main plugin Demo,  

    as well as add-on Demos, in my signature),

    and there is a 15-day money-back guarantee period, 

    so if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)

    Let me know if you have any additional questions. smile.png

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables