• Resolved comaxi

    (@comaxi)


    Hi,

    My pricing list (.csv) is auto-generated and it looks like this:

    Product Name|Qty 1-10|Qty 11-20|Qty 21+

    Demo product|10|8|6

    Is it possible to auto insert a dollar sign “$” automatically to column B,C & D, so it would look like this in the front end?

    Demo product|$10|$8|$6

    I would add the dollar sign manually before import, but the csv file has 2000+ products and it is auto-generated daily.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Hi,

    thanks for your post, and sorry for the trouble.

    You could maybe experiment with a different data renderer here. Please try adding this to the “Custom Commands” text field on the “Edit” screen of the table:

    "columnDefs": [ { "render": function ( data, type, row, meta ) { if ( 'display' === type ) { data = '$' + data; } return data; }, "targets": [ 1, 2, 3 ] } ]
    

    Regards,
    Tobias

    Thread Starter comaxi

    (@comaxi)

    It worked! Thanks for your help!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Automatically insert dallor sign’ is closed to new replies.