WordPress.org

Ready to get started?Download WordPress

Forums

WP Event Ticketing
Quantity Dropdown (3 posts)

  1. edluvables
    Member
    Posted 2 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?
    http://johnnysfillinstation.com/special-offers/50-gift-certificate-to-jos-for-25

    http://wordpress.org/extend/plugins/wpeventticketing/

  2. bananerd
    Member
    Posted 1 year ago #

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

  3. bananerd
    Member
    Posted 1 year 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;
    
    				}
    
    				else
    
    				{
    
    					if(!$v->ticketQuantity)
    
    						$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

About this Topic