Home › Forums › Ticket Products › Event Tickets Plus › Add a woocomerce product which is not an event to event
- This topic has 5 replies, 2 voices, and was last updated 9 years, 1 month ago by Barry.
-
AuthorPosts
-
March 13, 2015 at 7:58 am #948142oniregocParticipant
Hello,
until now I succed adding a product to an event with the shortcode [product id=”ID”] in the texte field but of course the product appear in the top of the page.
How can I make that product wihch is not an event appear next to the woocommerce ticket in the bottom of the page ?
My product is coupon that clients can buy as a gift to offer so it’s logical to put it near the ticket as an option.
March 13, 2015 at 9:58 am #948197BarryMemberHi oniregoc,
Might a template override allow you to accomplish this? You could then safely customize the ticket form (the template you’d be interested in is wootickets/tickets.php) and use do_shortcode() to add the desired product.
If you also make clever use of either WordPress’s own custom fields (or else Event Calendar PRO’s additional fields) you could set the actual product ID from the event editor.
Does that help at all?
March 13, 2015 at 11:14 am #948213oniregocParticipantNot really…
calendar pro additional filed : can’t display product with the shorcode [product id=”99″]
and template override means the additional field with do_shortcode() let event creator decide which product to add dynamicaly.
I tried to use Advanced Custom Field but with no success until now.
I can see the field when creating a new event but displaying the page do not show additionnal field content.
Is there any conflict with ACF ?
March 13, 2015 at 11:42 am #948219BarryMemberand template override means the additional field with do_shortcode() let event creator decide which product to add dynamicaly
If that’s a problem you could hardcode the product ID instead, then the event creator will not be able to change it.
I tried to use Advanced Custom Field but with no success until now.
I can see the field when creating a new event but displaying the page do not show additionnal field content.
Is there any conflict with ACF ?
Not that I’m aware of, but unless I’m mistaken I’d point out you need to do some customization work within your templates to actually expose any custom fields you set up using ACF – reading though the ACF documentation, particularly with regards to template tags like the_field() and get_the_field() is probably worthwhile here 🙂
March 13, 2015 at 6:13 pm #948282oniregocParticipantHello
<?php echo get_field('Add product shortcode');?>
is doing the trick in single-event.phpThanks
March 16, 2015 at 4:43 pm #948733BarryMemberAwesome!
-
AuthorPosts
- The topic ‘Add a woocomerce product which is not an event to event’ is closed to new replies.