Support

Home Forums Event Espresso Premium Cost code on CSV

Cost code on CSV

Posted: January 3, 2020 at 7:24 am

Viewing 10 reply threads


Ballyholme Yacht Club

January 3, 2020 at 7:24 am

Hi, is there any way that for each event we could select a code cost from a drop down menu? When we export the the CSV we would like that cost code to come up? Is there also any way it could be transfered over to Stripe when a transaction is processed?


Tony

  • Support Staff

January 3, 2020 at 8:04 am

Hi there,

I’m not sure I understand, what is ‘code cost’? Is it just a custom value on the event?

Is this something you (as the admin) select once on an event rather than the registrants?


Ballyholme Yacht Club

January 3, 2020 at 8:41 am

Yea sorry should have been clearer. So each event will be assigned a cost code for example ‘TR909’. So really it is just a custom value that is set by the admin when creating each event, to help with accounting.


Josh

  • Support Staff

January 3, 2020 at 9:51 am

You can use a custom field in the event for this. Either the native WordPress Custom field box, or use a custom field plugin like Advanced Custom Fields.

Then, to add the custom field value to your CSV, you add some code to a site specific plugin like in the first example here:

https://gist.github.com/joshfeck/4a7f576ea04a7d43be05#file-include_custom_fields_csv-php

You can add the above to a functions plugin.


Ballyholme Yacht Club

January 8, 2020 at 11:25 am

Thanks Josh, that worked well. Wondering if there is a way it could also be passed to PayPal so when we export PayPal data it shows that value also?
Thanks.


Tony

  • Support Staff

January 9, 2020 at 2:42 am

Which PayPal payment method are you using?

I just checked your opening post and in that you mention Stripe, so just double checking you are using PayPal and not Stripe?


Ballyholme Yacht Club

January 10, 2020 at 12:59 pm

Sorry Tony, you’re quite right, I meant passing to Stripe!


Josh

  • Support Staff

January 10, 2020 at 6:30 pm

If you’re using the newer Stripe Elements gateway, you could add/modify the snippet found at:

https://gist.github.com/joshfeck/7835142b09f8a8a3502b70f9c36ac3b5

You can add the above to a functions plugin.

If you’re using the older Stripe Checkout gateway, then we can share a modified version of the above that will work with the older gateway.


Ballyholme Yacht Club

January 13, 2020 at 10:34 am

Thanks for the help Josh. Tried that but it didn’t seem to work, still just gives event name for the description. I edited the snippet to only give cost code and not join event name and cost code but still showed event name only, almost as if it is ignoring that snippet. Any suggestions for what I could try to solve it?


Josh

  • Support Staff

January 13, 2020 at 10:42 am

Are you using Stripe Elements or Checkout? If you’re not sure, you can check the settings in Event Espresso > Payment Methods > Stripe. The code snippet above only works with Stripe Elements.


Ballyholme Yacht Club

January 14, 2020 at 4:21 am

You’re quite right, changed to elements and it worked. Thanks for your help, A* support.

Viewing 10 reply threads

The support post ‘Cost code on CSV’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso