Okay
  Public Ticket #3568293
Calculate a total for this column: Remove suffix Σ = before the total
Closed

Comments

  •  1
    Gerard started the conversation

    I have recently purchased the plugin. I cannot find a way to remove the prefix 

    Σ = before each total. Also is it possible to add the word Total in the first column before the column totals appear

  •  1,846
    Miloš replied


    Hi Gerard,

    1. When it comes to completely removing the "total prefix", here is a workaround :

    To remove the SUM/Total symbol, you need to open and edit a little bit of code from three files, using any text editor of your choice, find them inside your WordPress folder via FTP or Hosting File Manager :

    - The PHP file in this path :

    ../wp-content/plugins/wpdatatables/controllers/wdt_functions.php.

    Use "CTRL+F"  in the editor, to search for this: " #8721 "

    You will find part of a line that looks like this :

    echo ((isset($wdtSumFunctionsLabel) && $wdtSumFunctionsLabel != '') ? $wdtSumFunctionsLabel : '& #8721; = ')
    
    5611304872.png

    - Just remove "& #8721; = " from the end, so it looks like this:

    echo ((isset($wdtSumFunctionsLabel) && $wdtSumFunctionsLabel != '') ? $wdtSumFunctionsLabel : ' ')
    

    - Do the same for this JS file, 

    which is located here : 

    /wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js

    you will find something like this :

    var sumLabel = tableDescription.sumFunctionsLabel ? tableDescription.sumFunctionsLabel : '& #8721; = ';

    Once "& #8721; = "  is removed, should look like this :

    var sumLabel = tableDescription.sumFunctionsLabel ? tableDescription.sumFunctionsLabel : ' ';
    

    - Same with this PHP file :

    wp-content/plugins/wpdatatables/templates/frontend/table_footer.inc.php

    ;

    Once you are finished, the SUM/Total symbol should be gone from the Front End.

    Also, make sure to disable "Use minified wpDataTables Javascript" slider in wpDataTables settings/Custom JS and CSS tab, as on this screenshot :

    6740649174.png

    Let us know how it goes.


    If you can't manage to do this on your own, we can do it for you, if you provide me with full access to your Site.

    If that is the case, please provide me a temporary WP-admin (administrator) user for your website where this happens, 

    as well as FTP credentials and access to the database ( either link with credentials for PHPmyAdmin, or access to Hosting Panel),

    so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. 

    We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties. 

    You can write credentials here just check PRIVATE Reply so nobody can see them except us.



    2. When it comes to adding the word "Total" in the cell beneath the first Column, in the footer of the Table, in the "calculations row";

    Right now we don't have any built-in option/solution to achieve it.

    You can only try with a custom workaround.

    Here is a way with pseudo CSS method ::after :

    Add this CSS to your Table's Customize/Custom CSS :

    td.wdt-sum-cell:first-child::after {
        content: "Total :";
    }

    In CSS, ::after creates a pseudo-element that is the last child of the selected element. It is often used to add cosmetic content to an element with the content property. It is inline by default.

    You can learn more about this pseudo CSS ::after on this Page.

    6088312779.png


    Please note, this is a completely custom solution, our Support can only provide the idea to get you started, but if you require any troubleshooting for that part, it is not covered by our Support.


    You can, of course, change the Text inside "content" of that code, and modify it to add more styling, etc, if you have CSS skills.

    I hope it helps.smile.png


    Let me know how it goes.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  •  1
    Gerard replied

    Thanks for the detailed response. I have updated the table to remove the prefix here https://www.ecobomjesuit.org/institution-dashboard/

    This css as suggested by you adds Total and centers and transforms text to bold 

    td.wdt-sum-cell:first-child::after {
        content: "Total";
        display: block;
        width: 100%;
        text-align: center;    
       font-weight: bold;  
    }


    td.wdt-sum-cell {
      text-align: center !important;
      font-weight: bold;
    }

  •  2,572
    Aleksandar replied

    Hello Gerard.

    Milos is out sick, so I'll jump in.

    From what I can see, your issue has been resolved. Is that correct? Can we close this ticket?

    Kind Regards, 

    Aleksandar Vuković
    [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

  •  1
    Gerard replied

    Please close the ticket as the issue has been resolved. Thank You