Home › Forums › Ticket Products › Event Tickets Plus › Add a comma in the price field
- This topic has 7 replies, 2 voices, and was last updated 8 years, 8 months ago by Brian.
-
AuthorPosts
-
August 27, 2015 at 9:47 am #999632Heather WoodParticipant
How do I add a comma in the price field? When I do it manually, it does not show up.
Is there a way to change the code to make this do this automatically?
http://ittrainingsolutions.net/class/vmware-vsphere-install-configure-manage-6-0-2/I’m suprised I didn’t find this in the forums. I tried looking. So thought I would just ask.
August 27, 2015 at 12:41 pm #999692BrianKeymasterHi,
Sorry for the issues you are having. I can help out.
I have this snippet to add to your theme’s functions.php:
https://gist.github.com/jesseeproductions/914b68ce570cca31c075
That should enable the comma to show in the field again.
Let me know if that works for you.
Thanks
August 27, 2015 at 1:07 pm #999700Heather WoodParticipantThank you. I added the code you gave me to the top of functions.php .
all it seemed to do was remove my dollar symbol (which I do not want) and I still don’t see a comma?
August 28, 2015 at 7:51 am #999906BrianKeymasterOh my bad I did not put together this was WooCommerce Prices. So I do not think that snippet would work and I would recommend removing it.
I tested on my site and added a $100 ticket and a $64 ticket and it displays like this for me: $64 – $100
So do you have any other snippets that modify the cost somehow or any changes to the Single Events Template?
Let me know and we can figure it out from here.
Thanks
August 28, 2015 at 9:06 am #999936Heather WoodParticipantNo I don’t. I’m trying to add a comma. So a comma would only occur in prices such as for example: $3,500.
In my link, you can see almost all our course packages are in the “thousands”. How can I add a comma? I can’t do it manually as the system removes it. So is there a code snipped that would add it?
Thanks so much for your help.
August 28, 2015 at 12:10 pm #1000036BrianKeymasterOh I am sorry I thought you were trying to separate two numbers, not add a comma like that.
My Bad.
I came up with this filter and it worked for me on the single price and also the range.
https://gist.github.com/jesseeproductions/b14f815d967f4851f641
Please remove that other snippet I gave and try this instead.
Let me know how it works out.
Thanks
August 28, 2015 at 12:33 pm #1000047Heather WoodParticipantThank you so much. Next time I’ll try to be more specific. Sorry about that. Thank you again!! 🙂
It works great!
- This reply was modified 8 years, 8 months ago by Heather Wood.
August 28, 2015 at 12:50 pm #1000061BrianKeymasterGreat glad it helps now!
I did update the coding after I first posted a link to it to add a check for a value and if it is a number otherwise it was giving me some errors on some pages.
So please use that new coding.
I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.
Thanks
-
AuthorPosts
- The topic ‘Add a comma in the price field’ is closed to new replies.