WordPress.org

Plugin Directory

Changeset 633832


Ignore:
Timestamp:
12/04/12 05:08:32 (17 months ago)
Author:
kovshenin
Message:

Set the quantity to 1 for single ticket

If we have only once ticket type and the user
visits the tickets form, the 0 by default is
off-putting.

Instead, if there's only one ticket type, we
default the quantity to 1. This way the user can
just click Register and we will do the expected
thing. No choice needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • camptix/trunk/camptix.php

    r633831 r633832  
    39703970 
    39713971                            $max = min( $ticket->tix_remaining, 10 ); 
    3972                             $selected = 0; 
     3972                            $selected = 1 == count( $this->tickets )? 1 : 0; 
    39733973                            if ( isset( $this->tickets_selected[$ticket->ID] ) ) 
    39743974                                $selected = intval( $this->tickets_selected[$ticket->ID] ); 
Note: See TracChangeset for help on using the changeset viewer.