WP Event Ticketing
Quantity Dropdown (3 posts)

  1. edluvables
    Posted 3 years ago #

    Is there a way to limit the amount of tickets people can buy? I'm running a special at a restaurant where we limit one ticket per person per week, and course people are disregarding that and purchasing multiple tickets. How can I change the dropdown quantity to 1?


  2. bananerd
    Posted 2 years ago #

    Having the same problem, I would love to learn where i can modify this!

  3. bananerd
    Posted 2 years ago #

    Hey, just so everyone knows this is possible I was able to change this by editing the ticketing.php file of the plugin. Just search "10" and replace it with your desired values in this snippet (I used "4" for my quantity limit)

    //determine remaining tickets so we don't display selectors that allow too many tickets to be sold
    				//overall attendance max takes precendece over individual package quantity limitation
    				$totalRemaining = $o["eventAttendance"] - $o["packageQuantities"]["totalTicketsSold"];
    				if ($v->packageQuantity)
    					$packageRemaining = $v->packageQuantity - $o["packageQuantities"][$v->packageId];
    					$packageCounter = ($packageRemaining * $v->ticketQuantity) < $totalRemaining ? $packageRemaining : floor($totalRemaining / $v->ticketQuantity);
    					$packageCounter = $packageCounter > 4 ? 4 : $packageCounter;
    						$v->ticketQuantity = 1;
    					$packageRemaining = floor($totalRemaining / $v->ticketQuantity);
    					$packageCounter = $packageRemaining > 4 ? 4 : $packageRemaining;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Event Ticketing
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic