Home › Forums › Calendar Products › Community Events › Custom design of woocommerce admin tickets on front-end community events
- This topic has 4 replies, 3 voices, and was last updated 8 years, 2 months ago by Support Droid.
-
AuthorPosts
-
December 28, 2015 at 5:39 am #1047222CesarParticipant
Hello,
On the page for creating an event (with community), I want to activate JUST WooCommerce tickets. Also, I want to delete fields like description ticket and customize the HTML.
I know that the tables to add tickets are in /wp-content/plugins/event-tickets/src/admin-views/meta-box.php but how do you customize ? Via templates or functions ?
Thank you very much
December 28, 2015 at 12:02 pm #1047510Geoff B.MemberWelcome back Cesar,
Thank you for your question.
I know that the tables to add tickets are in /wp-content/plugins/event-tickets/src/admin-views/meta-box.php but how do you customize ? Via templates or functions ?
To customize the HTML, the best approach is to customize the template files by following our Themer’s guide .
This will give you total control over what you display to your users.And since, all the customization is done in your WordPress theme, you can also use your theme’s functions.php to filter out unwanted fields.
On that topic, I recommend reading the following entry in our Knowledge base (required fields for events submission form).I hope this helps you accomplish exactly what you are looking to do.
Please let me know if you require further assistance on this topic or if you have any other questions.
Happy holidays!
Geoff B.
December 29, 2015 at 12:57 am #1047590CesarParticipantThank you for your response.
I already customized the plugin with your guide. This works to customize views (in the folder « view » ) but when they are parts of the admin-views folder, you can not customize them.
I understand for the filters to be included in my functions.php but that does not allow me to change the HTML.
Thanks
January 4, 2016 at 2:15 pm #1050061Geoff B.MemberGood afternoon Cesar,
Great, I am glad to see you have made some customizations already.
You are absolutely right, you cannot include the admin views in your template (sorry for the confusion).
Actually, using filters in functions.php can let you change what is displayed in the HTML (in this case when meta-box.php is called).
The only catch is that sometimes, your WordPress theme might interfere with the filter.
To summarize, this leaves you with 3 potential solutions:
- Modify meta-box.php directly (which is not ideal and will not survive upgrades)
- Use a custom function to filter what is returned in the HTML
- Use CSS to hide the unwanted fields that are not mandatory
Solution 3 is probably the fastest.
Since all rows have a “ticket” class, you will have to use adjacent sibling CSS targeting.
Here is an example of how you can hide the “Ticket description” field rowhttps://gist.github.com/GeoffEW/58b47ea4097ddda9e962
Note that the second line is necessary to make sure you only hide the ticket description and not every other field after!
Hope this helps! Let me know if it does.
Have a great evening.
Geoff B.
February 18, 2016 at 8:33 am #1076451Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Custom design of woocommerce admin tickets on front-end community events’ is closed to new replies.