Support

Home Forums Event Espresso Premium Fee for shipping

Fee for shipping

Posted: March 13, 2018 at 9:18 am


kgltkn

March 13, 2018 at 9:18 am

Hi,

i wonder if it is possible to add a dropdown for an additional fee for postal. We ship the tickets and i can not add any fields.

Hard to explain. For example.:

The customer want to buy a ticket
20,- ticket + 2,99,- postal =22,99

or another scenario for 2 tickets:
40,- tickets + 2,99,- postal = 42,99

Thank you in advance


Josh

  • Support Staff

March 13, 2018 at 9:47 am

Hi there,

This is possible where you can add a question to the registration form, then add some PHP code to map the answers to that question to add a conditional fee for shipping. There’s some example PHP code in the custom code library:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/bc_ee_apply_transaction_surcharge.php

The code from the example can be adapted by a PHP programmer and added to a functions plugin.


kgltkn

March 13, 2018 at 10:15 am

hello Josh and thank you for your reply.
I Added everything like described to the site.

I have the Dropdown and i can chose between printing myself and shipping but if i chose shipping there is no fee added to the ticketprice. In the code it says 2.50 for ship. I did not change anything and first i wanted to try with no changes just to see if it works.

Would be grat if you can give me a hint.

Cheers


Tony

  • Support Staff

March 13, 2018 at 10:50 am

Hi there,

The snippet Josh linked to will not work out of the box and will always require modification for it to function on any site, did you change line 13 to use the ID of your dropdown question?

https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/bc_ee_apply_transaction_surcharge.php#L36


kgltkn

March 14, 2018 at 5:02 am

Hi,

Yes i did change the ID from 13 to 12 like shown in the browser. I followed the instructions but no success.


Tony

  • Support Staff

March 14, 2018 at 6:41 am

Can you link me to an event you have this set up on so I can take a look?


kgltkn

March 14, 2018 at 7:50 am

Sure

KLICK

Thank you


Josh

  • Support Staff

March 16, 2018 at 1:18 pm

May I ask was the code added into its own plugin, and is the plugin activated on the WP > Plugins page?


kgltkn

March 19, 2018 at 5:38 pm

Hi,
sorry for the late response. I added the code to a created plugin. Named it also functions.php in /plugins folder.


Josh

  • Support Staff

March 19, 2018 at 10:29 pm

Is the plugin activated on the WP > Plugins page?


kgltkn

March 21, 2018 at 4:36 am

Okay, it wasnt activated. But now after trying to activate i get following error:

Parse error: syntax error, unexpected ‘*’, expecting end of file in /homepages/7/d466324795/htdocs/web/wp-content/plugins/boatevent/event_functions.php on line 7


Tony

  • Support Staff

March 21, 2018 at 4:44 am

Can you either add all of your plugins code to PasteBin or create Gist and post the URL to either one here so we can view the code, please?


kgltkn

March 21, 2018 at 6:11 am

Sure
CLICK


Josh

  • Support Staff

March 21, 2018 at 6:14 am

Looks like a copy → paste error. You’ll need to remove lines 7 and 8.


kgltkn

March 21, 2018 at 6:26 am

IT IS WORKING. THANK YOU VERY MUCH FOR YOUR SUPPORT.

The support post ‘Fee for shipping’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  kgltkn 6 months, 1 week ago ago

Topic Tags

Notifications

This topic is:
pending
Do NOT follow this link or you will be banned from the site!