Vue.component('checkout', { template: `
Step 1
Review
Step 2
Address
Step 3
Payment
Step 4
Receipt
Continue
Note: (For standard delivery only) We deliver from 9am to 6pm, if you will be at work during that time, please choose your work address.

Previous step Continue
Online Payment . (You'll receive a payment link once your order is confirmed, within few minutes of making the order)
Cash on delivery
Card on delivery . (not available for express 2hrs delivery)
Benefit Pay on delivery
Processing your order... please wait.
Previous step Confirm order

Your order is complete, will be delivered soon.



Your can track your order's status from 'My Orders' in your account


Download our app to be up to date with the latest offers, and track your order in realtime.
Get it on Google Play
`, props: ['api_url', 'site_url', 'shopping_cart', 'current_user'], data: function () { return { is_loading: true, is_processing: false, porcessing_response: null, step: 1, review: { 'review_token': '' }, user_email: '', address: { title: '', building: '', road: '', block: '', area: '', phone_number: '', memo: '', guest_name: '' }, payment_method: 'online_payment', areas: [ { "name_ar": "المنامة", "name_en": "Manama" }, { "name_ar": "الجفير", "name_en": "Juffair" }, { "name_ar": "العدلية", "name_en": "Adliya" }, { "name_ar": "البرهامة", "name_en": "Burhama" }, { "name_ar": "الديه", "name_en": "Daih" }, { "name_ar": "مدينة عيسى", "name_en": "Isa Town" }, { "name_ar": "مدينة حمد", "name_en": "Hamad Town" }, { "name_ar": "منقطة أخرى", "name_en": "Other" } ], e1: 0 } }, methods: { nextStep: function (what = null) { if (what == 'check_address') { if (this.current_user == null) { $("#checkout_address_form_submit_button").trigger("click"); } else { this.user_email = this.current_user.email; if (this.address == null || this.address.block.length < 1) { alert("Please select an address"); } else { this.step++; } } } else { this.step++; } }, prevStep: function () { this.step--; }, updateAddress: function (newAddress) { this.address = newAddress; }, updateReview: function (newReview) { this.review = newReview; }, processOrder: function () { this.is_processing = true; var thisCompo = this; const params = new URLSearchParams(); var user_id = null; if (this.current_user != null) { user_id = this.current_user.id; params.append('access_token', getCookie('access_token')); } params.append('review_token', this.review.review_token); params.append('address', JSON.stringify(this.address)); params.append('payment_method', this.payment_method); params.append('email', this.user_email); params.append('source_platform', 'website'); axios.post('https://api.feehla.com/api/v1/checkout/process', params) .then(function (response) { if (response.data.success) { thisCompo.porcessing_response = response.data; thisCompo.is_processing = false; thisCompo.nextStep(); fbq('track', 'Purchase', {value: parseFloat(thisCompo.review.grand_price).toFixed(3), currency: 'BHD'}); gtag('event', 'conversion', { 'send_to': 'AW-969130814/TeEoCJbipKMBEL6Gj84D', 'value': thisCompo.review.grand_price, 'currency': 'BHD', 'transaction_id': '' }); // one more thing, let's clear the shopping cart const params = new URLSearchParams(); if (thisCompo.current_user != null) { params.append('access_token', getCookie('access_token')); } params.append('list_id', getCookie('enaseej_scid')); axios.post(thisCompo.api_url + '/shopping_list/clear_list', params); } else { alert("An error has occured, please contact our customer support. reference number: 0421547"); } }) .catch(function (error) { console.log(error); }); } }, watch: { api_url: { handler: function (newVal, oldVal) { } } }, created: function () { fbq('track', 'InitiateCheckout'); } });