• Resolved marilena6

    (@marilena6)


    Hello. I’m reposting my question in this new thread in case someone missed it.

    I’ve managed to add another field “rprice” (reduced ticket price) successfully. What I really need now is to add another one “rspaces”, so that the total price for a booking will be: spaces * price + rspaces * rprice. I didn’t mess with the field ticket_spaces in the em-tickets table in the db, because I want it to be the total sum for regular spaces plus reduced spaces. I’ve tried several changes but I haven’t figured out the correct solution (the total price is incorrect because the code doesn’t see my custom variable). To be more specific:
    in the em-ticket-booking.php

    function get_price( $force_refresh=false, $format = false, $add_tax = 'x' ){
    		if( $force_refresh || $this->ticket_booking_price == 0 ||$add_tax !== 'x' || get_option('dbem_bookings_tax_auto_add') ){
    			//get the ticket, calculate price on spaces
    			$this->ticket_booking_price = round($this->get_ticket()->get_price(false, $add_tax) * $this->ticket_booking_spaces, 2)+round($this->get_ticket()->get_rprice(false, $add_tax) * $this->ticket_booking_rspaces, 2);

    The ticket_booking_rspaces variable is zero and the total price is wrong.
    Can anyone please help me with this, I would really appreciate a reply, because I’m doing my thesis and I need help immediately.

    http://wordpress.org/extend/plugins/events-manager/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘add a custom field in the booking form’ is closed to new replies.