Allow only one ticket EDD – CSS hack.

Home Forums Ticket Products Event Tickets Plus Allow only one ticket EDD – CSS hack.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #995286
    Jonathan
    Participant

    Hi,

    I just wanted to post this in case it would help someone else. The site I am working on has one use case selling tickets for conference events and needs to have one person’s (buyer) name associated with each ticket so I thought we would just disable in the EDD settings using:

    		add_filter( 'edd_item_quantities_enabled', '__return_false' );
    

    in the ./eddtickets/src/Tribe/Main.php or overriding this filter in the theme’s functions.php. This would not work and after considering the options and searching for other solutions (none worked for me) I figured I could just hide the field. The field is pre-populate with quantity of 1… so,

    I added the following to my child theme’s style.css:

    td>input.edd-input.edd-item-quantity {
    	visibility: hidden !important;
    	}
    

    to disable the field on the event page. And the following:

    div.edd_download_quantity_wrapper {
    	visibility: hidden !important}
    

    to disable the quantity field on the cart.

    I didn’t need to be ultra secure or compatible so I settled to hiding on the page. The remove button still shows up on the cart page and when clicked the line item is removed effectively emptying the cart.

    If there are other suggestions or pointers I would appreciate them.

    Thanks,
    Jonathan

    #995440
    Brian
    Member

    Hi Jonathan,

    Thanks for sharing how you limited ticket sales to 1 ticket.

    I know someone will find this useful.

    I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Allow only one ticket EDD – CSS hack.’ is closed to new replies.