Posted: November 22, 2016 at 4:29 pm
|
The following snippet was found in another forum question. EE was preventing a logged in user from buying extra tickets. this coode was recommended. It causes a fatal error. I am guessing because there is no ‘function’. Can you help? if ( is_user_logged_in() ) { |
|
Also I cannot get this code working from the Gist: // display the base price of the ticket in the ticket selector (instead of the modified price) add_filter( ‘FHEE__ticket_selector_chart_template__ticket_price’, ‘change_ee_ticket_selector_base_price_display’, 10, 2 ); function change_ee_ticket_selector_base_price_display( $ticket_price, $ticket ) { |
Can you link to the original thread so we can see where that is from?
Are you setting the ticket as taxable or using a price modifier on the ticket? |
|
|
Hey Tony, I was adding a processing fee. I understood that code was to ensure the ticket selector showed the base price. Regarding snippet 1, that code came from the following link. I can now see that I missed a part that came from another post, but it still doesn’t work. I am thinking I must have lost a link in the code chain for fix. https://eventespresso.com/topic/additional-attendee-email-already-exists/ |
Hi Omar, Are you placing the code within its own plugin or within a functions.php file? |
|
|
Hey Josh, I have tried the code in functions.php and in a custom function |
It depends how you are adding that ‘processing fee’. So are you adding it as a ‘tax’ within EE by selecting ‘This ticket is taxable’ within the ticket settings or are you adding a price modifier to the ticket? Regarding the code snippet, there seems to be a misunderstanding within the original thread you linked to that has followed through to here. The code you have pasted above is the code that’s used by the core plugin, it should not be added as a custom function. The So do you not want EE to check for other users accounts that are using the email address entered into the registration form, at all? |
|
|
The processing fee is a price modifier. My desire is to show the base price of the tickets, on the ticket page, instead of the price + Modifier, regardless of whether the member/user is signed in. I hope that answers your question, Tony. |
The code you are using does not remove price modifiers from the output, it’s a subtotal before taxes which price modifiers are included in. You need to use something like:
|
|
|
Thanks Tony! That did the job. |
The support post ‘I cannot get the following code snippet to work’ 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.