Home › Forums › Ticket Products › Event Tickets Plus › Default Min/Max number of RSVP tickets
- This topic has 9 replies, 4 voices, and was last updated 7 years, 9 months ago by Fred.
-
AuthorPosts
-
June 30, 2016 at 1:18 am #1133854FredParticipant
Hi Support.
I was following the ticket below,
https://theeventscalendar.com/support/forums/topic/number-of-tickets-for-rsvp/
Now, the child theme has been prepared as per the instructions from the above thread.
Could you please let me know the exact content to copy/paste to the child theme?
Looking forward to hearing from you soon.
Cheers, Fred
June 30, 2016 at 12:53 pm #1134170HunterModeratorHey Fred!
I’d be happy to help out 🙂
I’m basically going to copy/paste Nico’s response here as I can’t think of a better way to put it! Here it is:
To modify RSVP tickets default and max quantities you’ll need to create a template override (as described in our Themer’s Guide) for the RSVP tickets form.
The file is located at:
wp-content/plugins/event-tickets/src/views/tickets/rsvp.php
Copy it over to:
wp-content/themes/your-theme/tribe-events/tickets/rsvp.php
Once the copy is in place, edit line 53:
<input type="number" class="tribe-ticket-quantity" min="0" max="<?php echo esc_attr( $ticket->remaining() ); ?>" name="quantity_<?php echo absint( $ticket->ID ); ?>" value="0">
Change the min, max and (default) value attributes to fit your needs ?
I can’t stress how valuable reading through the Themer’s Guide is, so please refer to that if you run into any troubles. Let me know if you need any further instruction!
Cheers!
June 30, 2016 at 1:38 pm #1134200FredParticipantThanks for the updates.
Nico suggested to create a child theme to avoid any loss with the theme updates.
Now the child them has been created as suggested by Nico, so it would be good to let me know how to make udpates to the child theme,Cheers, Fred
July 1, 2016 at 11:24 am #1134599HunterModeratorHey Fred,
You’ll need to make a copy of /plugins/event-tickets/src/views/tickets/rsvp.php, then save it in your child theme folder with this structure: /your-child-theme/tribe-events/tickets/rsvp.php. Once you’ve done that, make the necessary changes on line 53 and save the file again.
If you haven’t already, please review our Themer’s Guide as it gives a good explanation of what is happening.
Keep me posted on your progress 🙂
July 4, 2016 at 1:31 am #1135026FredParticipantHi Hunter.
I finally was able to manage to follow your instructions. It shows definitely the minimum and maximum quantities of tickets, thanks!
Just one issue here,
Screenshot 1 (RSVP 1) shows the initial screen for the users, which does now allow the users to fill their names and email addresses. Note that the name and email fields do not show until pressing the up/down arrow in the quantity field.
Screenshot 2 (RSVP 2) shows that the result of pressing “Confirm RSVP” button
Screenshot 3 (RSVP 3) shows what needs to be shown as an initial display to the user with the minimum and the default number of ticket to be “1”.For your information, the following is that I changed from the very line.
<input type=”number” class=”tribe-ticket-quantity” min=”1″ max=”2″ name=”quantity_<?php echo absint( $ticket->ID ); ?>” value=”1″ <?php disabled( $must_login ); ?> >
Could you please have a look at this for me? I am so close to it!
Cheers, Fred
July 4, 2016 at 12:49 pm #1135208HunterModeratorHey Fred,
Before I get to testing myself, can you confirm if the issues still occur when reverting back to the default WP theme and deactivating all other plugins other than ours as outlined in our Testing for conflicts guide?
Don’t forget to copy the tribe-events folder you currently have saved in your theme folder into the Twenty Sixteen theme folder so the changes you’ve made overwrite the plugin. Let me know if this makes sense!
Cheers!
July 4, 2016 at 1:52 pm #1135232FredParticipantHi.
Have tested by following your instructions, the issue is still outstanding under the 2016 theme with your plugin being activated only.
Looking forward to hearing from you.Fred
July 5, 2016 at 2:06 pm #1135710HunterModeratorWelcome back 🙂
I just tested the code and everything appeared to work as designed for me. I updated line 54 on rsvp.php to:
<input type="number" class="tribe-ticket-quantity" min="1" max="2" name="quantity_<?php echo absint( $ticket->ID ); ?>" value="0" <?php disabled( $must_login ); ?> >
Can you please copy/paste exactly what I have below and replace line 54 on the custom rsvp.php template you’ve created and let me know if it works properly?
July 20, 2016 at 9:35 am #1141972Support 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 ‘Default Min/Max number of RSVP tickets’ is closed to new replies.