{"id":26,"date":"2019-01-15T08:24:09","date_gmt":"2019-01-15T08:24:09","guid":{"rendered":"https:\/\/wp.test.airport.ee\/?page_id=26"},"modified":"2019-04-26T08:48:22","modified_gmt":"2019-04-26T08:48:22","slug":"osta-pilet-ara","status":"publish","type":"page","link":"https:\/\/wp.test.airport.ee\/ru\/","title":{"rendered":"Osta pilet \u00e4ra"},"content":{"rendered":"<p>Gate ticket purchase button.<\/p>\n<p>Buy BL:<\/p>\n<!-- template for the modal component -->\n                    <script type=\"x\/template\" id=\"modal-template\">\n                        <transition name=\"modal\">\n                            <div class=\"tll-purchase-modal\" @click=\"close\" v-show=\"show\">\n                                <div class=\"tll-purchase-modal__container\" @click.stop>\n                                  <slot><\/slot>\n                                <\/div>\n                            <\/div>\n                        <\/transition>\n                    <\/script>\n\n                    <!-- template for the buy now modal component -->\n\n                    <script type=\"x\/template\" id=\"buy-now-modal-template\">\n                        <modal :show=\"show\" @close=\"close\">\n                            <div class='tll-purchase-section is-sticky'>\n                                <button\n                                    type=\"button\"\n                                    class=\"tll-purchase-modal__close\"\n                                    @click=\"close\"\n                                    >\n                                    x\n                                <\/button>\n                                <h3 class='tll-purchase-section__title'>Checkout<\/h3>\n                                <div v-if=\"quantity_lounge > 0 || quantity_child_lounge > 0 || quantity_fasttrack > 0 \">\n                                    <div class='tll-purchase-card'>\n                                        <div class='tll-purchase-service' v-if=\"quantity_lounge > 0\">\n                                            <div class='tll-purchase-service__header'>\n                                                <p class='tll-purchase-service__title'>Business Lounge<\/p>\n                                                <div class='tll-purchase-service__price'>{{quantity_lounge * lounge_price}} &euro;<\/div>\n                                            <\/div>\n                                            <div class=\"tll-purchase-quantity\">\n                                                <button class='tll-purchase-quantity__button' :disabled=\"quantity_lounge < 1\" @click=\"decrementLounge()\"><\/button>\n                                                <input class='tll-purchase-quantity__input' type=\"text\" :value=\"quantity_lounge\" readonly>\n                                                <button class='tll-purchase-quantity__button tll-purchase-quantity__button--increase' :disabled=\"quantity_lounge >= max_quantity\" @click=\"incrementLounge()\"><\/button>\n                                            <\/div>\n                                        <\/div>\n\n                                        <div class='tll-purchase-service' v-if=\"quantity_child_lounge > 0\">\n                                            <div class='tll-purchase-service__header'>\n                                                <p class='tll-purchase-service__title'>Business Lounge for children (ages 2-12)<\/p>\n                                                <div class='tll-purchase-service__price'>{{quantity_child_lounge * lounge_child_price}} &euro;<\/div>\n                                            <\/div>\n                                            <div class=\"tll-purchase-quantity\">\n                                                <button class='tll-purchase-quantity__button' :disabled=\"quantity_child_lounge < 1\" @click=\"decrementChildLounge()\"><\/button>\n                                                <input class='tll-purchase-quantity__input' type=\"text\" :value=\"quantity_child_lounge\" readonly>\n                                                <button class='tll-purchase-quantity__button tll-purchase-quantity__button--increase' :disabled=\"quantity_child_lounge >= max_quantity\" @click=\"incrementChildLounge()\"><\/button>\n                                            <\/div>\n                                        <\/div>\n\n                                        <div class='tll-purchase-service' v-if=\"quantity_fasttrack > 0\">\n                                            <div class='tll-purchase-service__header'>\n                                                <p class='tll-purchase-service__title'>Fast Track<\/p>\n                                                <div class='tll-purchase-service__price'>{{quantity_fasttrack * fast_track_price}} &euro;<\/div>\n                                            <\/div>\n                                            <div class=\"tll-purchase-quantity\">\n                                                <button class='tll-purchase-quantity__button' :disabled=\"quantity_fasttrack < 1\" @click=\"decrementFastTrack()\"><\/button>\n                                                <input class='tll-purchase-quantity__input' type=\"text\" :value=\"quantity_fasttrack\" readonly>\n                                                <button class='tll-purchase-quantity__button tll-purchase-quantity__button--increase' :disabled=\"quantity_fasttrack >= max_quantity\" @click=\"incrementFastTrack()\"><\/button>\n                                            <\/div>\n                                        <\/div>\n                                        <div v-if='showRequirements' v-for=\"(requirement, key) in promotionProductRequirements\" :key='key'>\n                                            <p v-if=\"requirement.moreTicketsNeeded\">Please add {{requirement.nrOfTicketsNeeded}} {{requirement.type}} {{promotionTickets(requirement.nrOfTicketsNeeded)}} to activate promotion code<\/p>\n                                        <\/div>\n                                    <\/div>\n                                    <div class='tll-purchase-card'>\n                                        <p v-if='fullDiscountAmount > 0' class='tll-purchase-totals'>\n                                            <span class='tll-purchase-totals__title'>Promotion code:<\/span>\n                                            <span class='tll-purchase-totals__amount'>-{{fullDiscountAmount}} &euro;<\/span>\n                                        <\/p>\n                                        <p class='tll-purchase-totals'>\n                                            <span class='tll-purchase-totals__title'>Total:<\/span>\n                                            <span class='tll-purchase-totals__amount'>{{total}} &euro;<\/span>\n                                        <\/p>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n\n                            <div class=\"tll-purchase-section\">\n                                <div class=''>\n                                    <div class='tll-purchase-accordion'>\n                                        <div class='tll-purchase-accordion-element tll-purchase-accordion-element--business-lounge' :class=\"{hidden: quantity_lounge > 0 && quantity_child_lounge > 0}\">\n                                            <h3 class='tll-purchase-accordion__header'>\n                                                <button class='tll-purchase-accordion__title'>\n                                                    Business lounge\n                                                    <span class='tll-purchase-accordion__description'>Enjoy premium experience<\/span>\n                                                <\/button>\n                                            <\/h3>\n                                            <div class='tll-purchase-accordion__content' inert>\n                                                <div class='tll-purchase-service' :class=\"{hidden: quantity_lounge > 0}\">\n                                                    <div class='tll-purchase-service__header'>\n                                                        <p class='tll-purchase-service__title'>Business Lounge<\/p>\n                                                        <div class='tll-purchase-service__price'>{{quantity_lounge * lounge_price}} &euro;<\/div>\n                                                    <\/div>\n                                                    <div class=\"tll-purchase-quantity\">\n                                                        <button class='tll-purchase-quantity__button' :disabled=\"quantity_lounge < 1\" @click=\"decrementLounge()\"><\/button>\n                                                        <input class='tll-purchase-quantity__input' type=\"text\" :value=\"quantity_lounge\" readonly>\n                                                        <button class='tll-purchase-quantity__button tll-purchase-quantity__button--increase' :disabled=\"quantity_lounge >= max_quantity\" @click=\"incrementLounge()\"><\/button>\n                                                    <\/div>\n                                                <\/div>\n                                                <hr>\n                                                <div class='tll-purchase-service' :class=\"{hidden: quantity_child_lounge > 0}\">\n                                                    <div class='tll-purchase-service__header'>\n                                                        <p class='tll-purchase-service__title'>Business Lounge for children (ages 2-12)<\/p>\n                                                        <div class='tll-purchase-service__price'>{{quantity_child_lounge * lounge_child_price}} &euro;<\/div>\n                                                    <\/div>\n                                                    <div class=\"tll-purchase-quantity\">\n                                                        <button class='tll-purchase-quantity__button' :disabled=\"quantity_child_lounge < 1\" @click=\"decrementChildLounge()\"><\/button>\n                                                        <input class='tll-purchase-quantity__input' type=\"text\" :value=\"quantity_child_lounge\" readonly>\n                                                        <button class='tll-purchase-quantity__button tll-purchase-quantity__button--increase' :disabled=\"quantity_child_lounge >= max_quantity\" @click=\"incrementChildLounge()\"><\/button>\n                                                    <\/div>\n                                                <\/div>\n                                            <\/div>\n                                        <\/div>\n\n                                        <div class='tll-purchase-accordion-element tll-purchase-accordion-element--fast-track' :class=\"{hidden: quantity_fasttrack > 0}\">\n                                            <h3 class='tll-purchase-accordion__header'>\n                                                <button class='tll-purchase-accordion__title'>\n                                                    Fast track\n                                                    <span class='tll-purchase-accordion__description'>Get to plane faster<\/span>\n                                                <\/button>\n                                            <\/h3>\n                                            <div class='tll-purchase-accordion__content' inert>\n                                                <div class='tll-purchase-service'>\n                                                    <div class='tll-purchase-service__header'>\n                                                        <p class='tll-purchase-service__title'>Fast Track<\/p>\n                                                        <div class='tll-purchase-service__price'>{{quantity_fasttrack * fast_track_price}} &euro;<\/div>\n                                                    <\/div>\n                                                    <div class=\"tll-purchase-quantity\">\n                                                        <button class='tll-purchase-quantity__button' :disabled=\"quantity_fasttrack < 1\" @click=\"decrementFastTrack()\"><\/button>\n                                                        <input class='tll-purchase-quantity__input' type=\"text\" :value=\"quantity_fasttrack\" readonly>\n                                                        <button class='tll-purchase-quantity__button tll-purchase-quantity__button--increase' :disabled=\"quantity_fasttrack >= max_quantity\" @click=\"incrementFastTrack()\"><\/button>\n                                                    <\/div>\n                                                <\/div>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n\n                            <div class=\"tll-purchase-section\" v-if=\"quantity_lounge > 0 || quantity_child_lounge > 0 || quantity_fasttrack > 0 \">\n                                <h3 class='tll-purchase-section__title'>Your details<\/h3>\n                                <div class='tll-purchase-form'>\n                                    <label class=\"tll-purchase-form__label\">\n                                        First name\n                                        <span class=\"tll-purchase-form__asterisk\" >*<\/span>\n                                        <input v-model=\"firstname\" class=\"tll-purchase-form__control\">\n                                    <\/label>\n                                    <label class=\"tll-purchase-form__label\">\n                                        Last name\n                                        <span class=\"tll-purchase-form__asterisk\" >*<\/span>\n                                        <input v-model=\"lastname\" class=\"tll-purchase-form__control\">\n                                    <\/label>\n                                    <label class=\"tll-purchase-form__label\">\n                                        Your email\n                                        <span class=\"tll-purchase-form__asterisk\" >*<\/span>\n                                        <input v-model=\"email\" class=\"tll-purchase-form__control\" type=\"email\">\n                                    <\/label>\n                                    <label class=\"tll-purchase-form__label\">\n                                        Your Phone\n                                        <input v-model=\"phone\" class=\"tll-purchase-form__control\" type=\"tel\">\n                                    <\/label>\n                                    <label class=\"tll-purchase-form__label checkbox-container\">\n                                        I would like an invoice for company\n                                        <input v-model=\"isBusinessCustomer\" class=\"tll-purchase-form__control\" type=\"checkbox\" @change=\"toggleClientType\">\n                                        <span class=\"tll-purchase-form__custom-label\" ><\/span>\n                                    <\/label>\n\n                                   <div v-if='isBusinessCustomer'>\n                                        <div class=\"tll-purchase-form__company\">\n                                            <label class=\"tll-purchase-form__label\">\n                                                Company Name\n                                                <span class=\"tll-purchase-form__asterisk\" >*<\/span>\n                                                <input v-model=\"company_name\" class=\"tll-purchase-form__control\">\n                                            <\/label>\n                                            <label class=\"tll-purchase-form__label\">\n                                                Company address\n                                                <span class=\"tll-purchase-form__asterisk\" >*<\/span>\n                                                <input v-model=\"company_address\" class=\"tll-purchase-form__control\">\n                                            <\/label>\n                                        <\/div>\n                                    <\/div>\n                                    \n                                    \n                                <\/div>\n                            <\/div>\n\n                            <div class=\"tll-purchase-section promo-container\" :class=\"{success: this.promotion.message, error: this.promotion.error}\" v-if=\"quantity_lounge > 0 || quantity_child_lounge > 0 || quantity_fasttrack > 0 \">\n                                <h3 class='tll-purchase-section__title'>Promotion code<\/h3>\n                                <div class='tll-purchase-form__promo'>\n                                    <input v-model=\"promotion_code\" class=\"tll-purchase-form__control\" :disabled=\"this.promotion.message\">\n                                    <button class=\"tll-purchase-form__check_promo\" @click.stop=\"checkTllPromotion(promotion_code)\" :disabled=\"this.promotion.message\">Apply<\/button>\n                                <\/div>\n                                <span v-if=\"this.promotion.message\">Promotion code is active! <a @click.stop=\"removeTllPromotion()\">Remove<\/a><\/span>\n                                <span v-if=\"this.promotion.error\">Promotion code is invalid<\/span>\n                            <\/div>\n\n                            <div class='tll-purchase-section tll-purchase-form' v-if=\"quantity_lounge > 0 || quantity_child_lounge > 0 || quantity_fasttrack > 0 \">\n                                <div v-if=\"total > 0\">\n                                    <h3 class='tll-purchase-section__title'>Select payment method<\/h3>\n                                    <div v-for=\"(methods, category) in payment_methods\" class=\"tll-purchase-payment-card\">\n                                        <span class=\"card-header\">{{ getCategoryName(category) }}<\/span>\n                                        <div class=\"tll-purchase-payment-methods\">\n                                            <div class='tll-purchase-payment-methods__method' v-for=\"(method, key) in methods\" :key=\"'B' + key\">\n                                                <label class=\"tll-purchase-payment-methods__label\">\n                                                    <input v-model=\"maksekeskus_method\" type=\"radio\" name=\"maksekeskus_method\" :value=\"method.name\">\n                                                    <span class=\"tll-purchase-payment-methods__custom-label\"><\/span>\n                                                    <img :src=\"method.logo_url\" alt=\"payment_method_logo\" class=\"tll-purchase-payment-methods__logo\">\n                                                <\/label>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                    <input type=\"hidden\" v-model=\"maksekeskus_method\" name=\"maksekeskus_method\" value=\"maksekeskus_method\">\n                                <\/div>\n\n                                <label class=\"tll-purchase-form__label checkbox-container\">\n                                    <a href=\"\/privacy-policy\" target=\"_blank\">Terms of processing personal data<\/a>\n                                    <input v-model=\"privacy_policy\" class=\"tll-purchase-form__control\" type=\"checkbox\">\n                                    <span class=\"tll-purchase-form__custom-label\" ><\/span>\n                                <\/label>\n                                <label class=\"tll-purchase-form__label checkbox-container\" v-if=\"quantity_lounge > 0 || quantity_child_lounge > 0\">\n                                    I have read and I accept <a href=\"\/terms-conditions\" target=\"_blank\">Sales Terms<\/a> (Business Lounge)\n                                    <input v-model=\"bl_terms\" class=\"tll-purchase-form__control\" type=\"checkbox\">\n                                    <span class=\"tll-purchase-form__custom-label\" ><\/span>\n                                <\/label>\n                                <label class=\"tll-purchase-form__label checkbox-container\" v-if=\"quantity_fasttrack > 0\">\n                                    I have read and I accept <a href=\"\/fast-track-sales-terms\" target=\"_blank\">Sales Terms<\/a> (Fast track)\n                                    <input v-model=\"ft_terms\" class=\"tll-purchase-form__control\" type=\"checkbox\">\n                                    <span class=\"tll-purchase-form__custom-label\" ><\/span>\n                                <\/label>\n                                <div class='tll-purchase-errors' v-if=\"errors.length\">\n                                    <div class=\"tll-purchase-notice tll-purchase-notice--danger\">\n                                        <div class='tll-purchase-notice__icon'><\/div>\n                                        <ul class=\"tll-purchase-errors__list\">\n                                            <li v-for=\"error in errors\">{{ error }}<\/li>\n                                        <\/ul>\n                                    <\/div>\n                                <\/div>\n                                <button class=\"tll-purchase-form__submit\" @click.stop=\"buyNow()\">\n                                    Submit\n                                <\/button>\n                            <\/div>\n                            <div class=\"modal-footer text-right\">\n\n                            <\/div>\n                        <\/modal>\n                    <\/script>\n\n                    <!-- template for success modal component -->\n                    <script type=\"x\/template\" id=\"success-modal-template\">\n                        <modal :show=\"show\" @close=\"close\">\n                            <button\n                                type=\"button\"\n                                class=\"tll-purchase-modal__close\"\n                                @click=\"close\"\n                                >\n                                x\n                            <\/button>\n                            <div class=\"modal-body\" >\n                                <h2 class='tll-purchase-section__title'>Purchase successful<\/h2>\n                                <div class='tll-purchase-confirmation'>\n                                    <p>We sent your booking confirmation to your email.<\/p>\n                                    <img src='https:\/\/wp.test.airport.ee\/wp-content\/plugins\/tll-ticket-purchase\/public\/static\/success-deco.svg' alt='' class='tll-purchase-confirmation__deco'>\n                                <\/div>\n                            <\/div>\n                        <\/modal>\n                    <\/script>\n\n                    <!-- template for failed modal component -->\n                    <script type=\"x\/template\" id=\"failed-modal-template\">\n                        <modal :show=\"show\" @close=\"close\">\n                            <button\n                                type=\"button\"\n                                class=\"tll-purchase-modal__close\"\n                                @click=\"close\"\n                                >\n                                x\n                            <\/button>\n                            <div class=\"modal-body\" >\n                                <div class='tll-purchase-notice tll-purchase-notice--danger'>\n                                    <div class='tll-purchase-notice__icon'><\/div>\n                                    <div class='tll-purchase-notice__content'>\n                                        <div class='tll-purchase-notice__text'>Payment failed! Please try again.<\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                        <\/modal>\n                    <\/script>\n\n                    <!-- app -->\n                    <div id=\"tll-purchase\" class='tll-purchase'>\n                        <buy-now-modal :show=\"showModal\" @close=\"showModal = false\" @success=\"showSuccess = true\" data-tll-atts={&quot;business_lounge_qty&quot;:&quot;3&quot;,&quot;business_lounge_child_qty&quot;:null,&quot;fast_track_qty&quot;:&quot;0&quot;}><\/buy-now-modal>\n                        <success-modal :show=\"showSuccess\" @close=\"showSuccess = false\" @payment-success=\"showSuccess = true\" @payment-failed=\"showFailed = true\" data-tll-success={&quot;payment&quot;:&quot;&quot;}><\/success-modal>\n                        <failed-modal :show=\"showFailed\" @close=\"showFailed = false\" data-tll-success={&quot;payment&quot;:&quot;&quot;}><\/failed-modal>\n                        <button id=\"show-modal\" class=\"tll-purchase-open-btn\" @click=\"showModal = true\">Buy now<\/button>\n                    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Gate ticket purchase button. Buy BL:<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/pages\/26"}],"collection":[{"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":3,"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/pages\/26\/revisions"}],"predecessor-version":[{"id":32,"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/pages\/26\/revisions\/32"}],"wp:attachment":[{"href":"https:\/\/wp.test.airport.ee\/ru\/wp-json\/wp\/v2\/media?parent=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}