Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Posts
    6
    Plugin Contributions
    0

    Downloadable event tickets generated dynamically - how to?!

    Hi there!

    This is my first post on zen forums so hopefully I don't confuse you too much.

    Company I work for is putting on a set of of conferences for which we would like to sell tickets in advance (using ZC) and at the door. When a person selects which conference(s) they would like to attend and go through the checkout, we would like to have ticket(s) available for download if their credit card gets approved (we are using a third-party plug in for ZC that will do real-time processing of cc's).

    However, instead of having a generic pdf or html ticket they can download (and thus have their friends copy it without paying), we would like to have the ticket generated on-the-fly that will contain the following info:
    - person's name (and maybe address)
    - conference they chose to attend
    - a barcode so that we can scan it upon entry and verify its uniqueness
    (generating the barcode is not a big deal since we already have a script for that)

    I guess the problem is in dynamically generating this ticket after successful checkout and passing required information indicated above to a pdf or an HTML page that the visitor can download/print...

    Is there anyone out there who has encountered a similar problem and (cross my fingers!) found a solution to it?! Any suggestions greatly appreciated!

    Thanks everyone!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Downloadable event tickets generated dynamically - how to?!

    You'd have to hook into the end of the create-order element of the order class, typically using the notifiers hooks, and perhaps use PHP to create a JPG/PNG which could be displayed in the browser and printed.
    The image should be streamed to the browser, and not be a static file anywhere on the server; thus it could not be cached easily.
    In the customer's order info, I'd probably only supply a serial number of the ticket, rather than allowing them to re-print it from there ... depends on your needs and the intuitiveness of the process so that they don't get stuck.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2006
    Posts
    6
    Plugin Contributions
    0

    Re: Downloadable event tickets generated dynamically - how to?!

    Thanks DrByte for sending me in the right direction. It seems I would have to set up a notifier such as NOTIFY_HEADER_END_CHECKOUT_SUCCESS (but wouldn't this hold true even if a customer decides to pay with Money Order, for example?) then I wouldn't want to allow them to download the ticket yet. I couldn't find any notifiers such as NOTIFY_CHECKOUT_CREDIT_CARD_SUCCESS so I would know that the credit card has gone through.

    Also, even if I could work around that, how do I 'gather' their information (name, address, order #) so I can display an entry ticket with their name on it.

    If you could come up with some sample code that would be a great help! I saw couple of examples at the bottom of the link you gave but I'm not sure how to pass customer's info.

    Thanks again!

  4. #4
    Join Date
    Nov 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Downloadable event tickets generated dynamically - how to?!

    Not a solution but another step in the right direction:

    I don't think there's a way to do this without modifying the code. You need medium-level grasp of PHP. The file is header_php.php under \includes\modules\pages\checkout_success.

    Right after the lines:
    'products_id'=>$products->fields['products_id'],

    'products_name'=>$products->fields['products_name']);

    You need to retrieve the quantity:

    'products_quantity'=>$products->fields['products_quantity']);

    (I think)

    Inside that loop, you'll need to insert barcode generation code from something like:

    sid6581.net/cs/php-scripts/barcode

    and make sure you generate a code using, say, order number+products_id+quantity_number in another loop. That way, if someone buys 5 tickets for friends, which happens all the time, every barcode will be unique.

    Sorry I don't have time for more details. Let's hope someone else picks it up from here.

  5. #5
    Join Date
    Nov 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Downloadable event tickets generated dynamically - how to?!

    Here's an alternative solution for selling tickets and reservations for events:

    http://www.zen-cart.com/forum/showth...256#post459256

    Cheers,
    Gom

 

 

Similar Threads

  1. Individual unique event tickets
    By kroaks in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 4 Dec 2009, 05:00 PM
  2. Using ZenCart for Event Tickets
    By kbadr in forum General Questions
    Replies: 1
    Last Post: 21 Jul 2009, 04:51 PM
  3. Barcode Question: Event Tickets
    By lio in forum Addon Payment Modules
    Replies: 3
    Last Post: 30 Oct 2008, 04:00 AM
  4. Buying event tickets for guests
    By rbobzin in forum Managing Customers and Orders
    Replies: 4
    Last Post: 13 Nov 2007, 08:15 AM
  5. Replies: 6
    Last Post: 12 Nov 2007, 04:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg