kaisv

Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • kaisv
    Participant
    kaisv
    Participant

    You only see it with priced tickets not with rsvp tickets. Maybe its a change from Enfold 4.2.4: “- improved: display data of events calendar pro on mobile”.

    kaisv
    Participant

    Anyway I tracked down the problem:

    Enfold renders the a single event with its own template offered in “wp-content/themes/enfold/config-events-calendar/views/single-event.php”. There it renders the meta information two times! (TWO TIMES, important in a moment). It creates a “av-single-event-meta-bar-mobile” and a “av-single-event-meta-bar-desktop”. The bar-mobile is hidden on desktop devices and the desktop bar on mobile devices. Despite being hidden, the meta divs are created at two locations. (Careful by following the recommendations to add your own “single-event.php”, enfold hooks into the selection process of theme files, forcing the usage of theirs at config-events-calendar/config.php:34 !)

    Now the script from events tickets plus “wp-content/plugins/event-tickets-plus/src/resources/js/meta.js” (take note: the minified version “meta.min.js” is used, and has to be altered if you want to fix it yourself instead of the non minified verbose version), that is responsible to create the form divs for the additional meta data, calculates the amount of meta divs to add based on the existing divs. BUT that code uses a DOM CLASS selector to find the amount of already appended meta divs. Therefore the current behavior is wrong with enfold! Because the following happens:

    • Having 0 products/items selected, does not render addiitonal attendee-meta-divs
    • Changing to 1, renders 1 additional attendee-meta-div, but really appends 1 div in BOTH bars (desktop/mobile). leading to TWO/2 new divs.
    • Changing to 2, renders NO additional attendee-meta-div, because the var current_count = $fields.find( '.tribe-event-tickets-plus-meta-attendee' ).length; gives already “2”.
    • Changing to 3, renders 1 additional attendee-meta-div, because there are already two (one in each bar), but really appends 1 div in BOTH bars (desktop/mobile). leading to FOUR/4 new divs.
    • And so on!

    I assume the code from enfold from “single-event.php” has to be changed to include only one “bar”.Possible fix:

    https://gist.github.com/kmindi/91f416bbc92ed4179a3c15950579644e

    • This reply was modified 6 years, 1 month ago by kaisv. Reason: corrects code rendering (now in a gist)
    kaisv
    Participant

    Hi,

    I was talking about the tickets form from events tickets plus, which is different than rsvp. There your suggested change has no effect of course. Anyway I could not yet figure out what difference is between the rsvp form and the tickets form except that there is a div used for the tickets and a table for the rsvp meta data quantity input field.

    Still if I try it with rsvp:
    That is not shown because it is only added to the “av-single-event-meta-bar-mobile” not “av-single-event-meta-bar-desktop” and the “-mobile” has “display: none;” set by enfold/config-events-calendar/event-mod.css (so this might be an enfold issue, but I could not yet figure out why it is not added to the desktop bar as well because the code in enfold/config-events-calendar/views/single-event.php looks identical for both “bars”…
    I can add the rsvp tickets, and that is working (if I remove the “display: none;” part from the css). So I guess that fix has to be applied by enfold sometime.
    Still my original issue is open.

    kaisv
    Participant

    Hi,

    does it still work if you increase the counter further, and can you put the order in the cart then?

    Disabling lightbox via that checkbox does not help.

    • This reply was modified 6 years, 1 month ago by kaisv.
    kaisv
    Participant

    No that snippet is not needed for me, as the DISPLAY of the prices is correct only the INPUT is not respecting the decimal separator.

    I found the corresponding code.

    It is in the javascript file event-tickets/src/resources/tickets.min.js in the following part (as it is minimized I don’t see your used variable names but searching for “#ticket_price” as the id for the ticket price input leads to the correct part I guess):

    r.on("keyup","#ticket_price",function(e){
    e.preventDefault();
    var i=price_format.decimal,
    n=new RegExp("[^-0-9%\\"+i+"]+","gi"),
    a=t(this).val(),
    r=a.replace(n,"");
    a!==r&&t(this).val(r)
    }
    )

    here i is the set via price_format.decimal which I can see in the debugger (Firefox) that it is set to “.” which therefore allows that symbol as input (du to not replacing it as it is added in the regex). I don’t konw where price_format.decimal is set though…

    kaisv
    Participant

    Okay, and where do I start? Do you think about integrating this into your code some time?

    kaisv
    Participant

    This does not answer my question, and sure i can play around until I find the right combination of capabilities, but that is what I want you to answer.

    What permissions are required to create an event including creating tickets. Especially, do the tickets require the publish right or in what state are they until the event is published?

    in reply to: "-1" Showing when updating an event #1455159
    kaisv
    Participant

    I solved this problem temporary with the following advice from enfold:

    Error saving event – Events Calendar Pro + Event Tickets Pro

    Meanwhile please update /enfold/config-templatebuilder/avia-template-builder/php/meta-box.class.php around line 262

            `check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce' );`
    

    with

            `if( false === check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce', false ) )
            {
                 return $data;
            }`
    
    in reply to: Enfold Theme / WooCommerce plugin conflict #1455155
    kaisv
    Participant

    I solved this problem temporary with the following advice from enfold:

    Error saving event – Events Calendar Pro + Event Tickets Pro

    Meanwhile please update /enfold/config-templatebuilder/avia-template-builder/php/meta-box.class.php around line 262

            `check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce' );`
    

    with

            `if( false === check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce', false ) )
            {
                 return $data;
            }`
    
    in reply to: Events Tickets Plus #1455144
    kaisv
    Participant

    I solved this problem temporary with the following advice from enfold:

    Error saving event – Events Calendar Pro + Event Tickets Pro

    Meanwhile please update /enfold/config-templatebuilder/avia-template-builder/php/meta-box.class.php around line 262

            `check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce' );`
    

    with

            `if( false === check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce', false ) )
            {
                 return $data;
            }`
    
    in reply to: Adding paid ticket to event results in error page #1455143
    kaisv
    Participant

    I solved this problem temporarily with the following advice from enfold:

    Error saving event – Events Calendar Pro + Event Tickets Pro

    Meanwhile please update /enfold/config-templatebuilder/avia-template-builder/php/meta-box.class.php around line 262

            `check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce' );`
    

    with

            `if( false === check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce', false ) )
            {
                 return $data;
            }`
    
    kaisv
    Participant

    I solved this problem temporary with the following advice from enfold:

    Error saving event – Events Calendar Pro + Event Tickets Pro

    Meanwhile please update /enfold/config-templatebuilder/avia-template-builder/php/meta-box.class.php around line 262

            `check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce' );`
    

    with

            `if( false === check_ajax_referer( 'avia_nonce_save', 'avia-save-nonce', false ) )
            {
                 return $data;
            }`
    
Viewing 13 posts - 1 through 13 (of 13 total)