- Titan79 situs slot gacor terbaru hari ini dengan link APK resmi, server SLOT777 stabil, peluang maxwin besar dan mudah menang.
- Titan79 situs slot gacor terbaru hari ini dengan link APK resmi, server SLOT777 stabil, peluang maxwin besar dan mudah menang.
No Item available
' : html) $("#itemAddons").attr("data-length", products.length) // $('#itemAddons')[0].swiper.update(); }); }) async function isAddon(){ let ids = [] $("#itemAddons .item-card.selected").each(function(i, e){ const id = $(this).data("id") ids.push(id) }) console.log(ids) return ids } $("#itemAddons").delegate(".item-card > div:not(.card-qty)", "click", async function(){ const t = $(this).parent() const id = t.data("id") const btn = t.parents(".purchaseAddon").find(".next-purchase-button") t.toggleClass("selected"); //$(this).next("input").toggleAttr('name', 'id[]'); if (t.hasClass('selected')) { t.find("input").val(1) t.find("input").attr('name', 'id[]'); } else { t.find("input").val(0) t.find("input").removeAttr('name'); } $("#properties-addons").val(addons) const is = await isAddon() if(is.length === 0) { btn.text("continue without add-ons") return } if(is.includes(8835692069079)) { btn.text("personalize acrylic frame") } else { btn.text("Continue") } }) async function myAddon(data) { const c = $(".addonsPurchase .addons") let items = [] const spotifyAddons = $(".spotifyAddons").find("[data-index]") // if(spotifyAddons.length > 0) { // $(spotifyAddons).each(function(i, e){ // const spotifyLink = $(this).find(".spotifyLink").val() // const spotifySong = $(this).find(".spotifySong").val() // const spotifyArtist = $(this).find(".spotifyArtist").val() // const spotifyFotoAddon = $(this).find(".resultPhotoSpotify").val() // if(spotifyLink !== '') { // spotifyAddon = `
// // spotify link // ${spotifyLink} //
//// uploaded photo // ${spotifyFotoAddon} //
//// song / playlist name // ${spotifySong} //
//// artist name // ${spotifyArtist} //
//upload photo
Add your Spotify link here
${data?.song}
` : ''}${data?.artist ? `
${data?.artist}
` : ''}
Make sure you copy the complete and correct link from Spotify. Ex: https://open.spotify.com/track/0C3xZJueyBvvMSsl0cETA6
`) $("#personalizeBtnSpotify .btn").attr("disabled", true) return } $(this).parent().removeClass("error") // $(this).parent().remove("txt-error") $("#personalizeBtnSpotify .btn").attr("disabled", false) } else { $("#personalizeBtnSpotify .btn").attr("disabled", true) } }) $(".purchaseAddon").delegate(".next-addon", "click", function(){ const parent = $(this).parents(".purchaseAddon") const next = parent.next(".sectionPurchase") if(next.hasClass("purchaseAddress")) { if(productType !== '') { console.log("clarity event " + productType + ' purchaseDelivery') window.clarity("event", `${productType} purchaseDelivery`) // window.clarity("set", productType, `purchaseDelivery - ${productDate}`) } } const data = $("#itemAddons").find(".selected") const length = $(".quantity-cart-46067682607319").val() const checked = data.length; if(checked > 0) { if(length > 0) { $(".purchaseAddon").addClass("purchaseAddonSpotify") customSpotify(1, length, 'addon') } else { listAddon() } } else { parent.addClass("hide") next.removeClass("hide") } }) $("#personalizeBtnSpotify .btn").click(async function(){ const isCity = $("#cities[required]") const isDate = $("#propDeliveryDate[required]") if((isDate.length > 0 && isCity.length > 0) && (isCity.val() === '' || isDate.val() === '')) { alert('Please choose Delivery City & Delivery Date') return } const data = await customSpotify(1, 1, 'product') if(data) { $("#backgroundPopup").fadeIn("slow"); $(".purchasePopupSpotify").fadeIn("slow"); if(productType !== '') { console.log("clarity event " + productType + ' spotify') window.clarity("event", `${productType} spotify`) // window.clarity("set", productType, `purchaseDelivery - ${productDate}`) } } }) function formatBytes(bytes, decimals = 2) { if (!+bytes) return '0 Bytes' const k = 1024 const dm = decimals < 0 ? 0 : decimals const sizes = ['B', 'KB', 'MB'] const i = Math.floor(Math.log(bytes) / Math.log(k)) return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}` } async function trackUrl(link){ try { let trackId = link.split('/').pop().split('?')[0]; let type = '' if(link.includes("spotify:")) { const uri = link.split('spotify:')[1] trackId = uri.split(':')[1] type = uri.split(':')[0] + 's' } else { if(link.match('track')){ type = 'tracks' } else if(link.match('playlist')) { type = 'playlists' } else if(link.match('artist')) { type = 'artists' } else if(link.match('album')) { type = 'albums' } } console.log(`${host}/api/spotify/${type}/${trackId}`) const data = await getFetch(`${host}/api/spotify/${type}/${trackId}`) console.log(data, 'DATA') const song = data?.data?.name const artist = data?.data?.artist return { song, artist, type, trackId, status: data.status } } catch(err) { console.log(err) } } $(".spotifyAddons").delegate(".uploadPhotoSpotify", "change", async function(){ const parent = $(this).parents("[data-index]") const preview = parent.find(".previewImage") const file = $(this)[0].files[0]; if (file) { const reader = new FileReader(); reader.onload = async function(e) { parent.find(".uploadResult label").hide() parent.find(".uploadedResult").remove() parent.find(".uploadResult").append(`(${formatBytes(file.size)}) is uploaded
spotify link ${spotifyLink}
Upload Photo ${spotifyPhoto}
song / playlist name ${spotifySong}
artist name ${spotifyArtist}
${items[i].title}
For the money arrangement, please transfer IDR ${money(total_all)} to Bank Mandiri 1020001234522 (PT Modern Mekar Abadi) and contact our Customer Service to confirm with proof of payment.
`) } async function removeImage() { const data = JSON.stringify({ "ID": $("#properties-properties-qrId").val(), "Kartu Nama Penerima": $("#properties-kartu-nama-penerima").val(), "Kartu Nama Pengirim": $("#properties-kartu-nama-pengirim").val(), "Kartu Ucapan": $("[data-properties=ucapan]").val(), "Nama Penerima": $("#properties-nama-penerima").val(), "Order Number":"", "Status":"Product", "Foto": "", "Media": $("#properties-video").val(), "Image": "8144957800663" }) const remove = updateCard(data) if(remove) { $(this).hide() $("#properties-photo").val("-") $(".placeholder-image").show() $(".preview-image").attr("src", "") } } async function removeVideo() { const data = JSON.stringify({ "ID": $("#properties-properties-qrId").val(), "Kartu Nama Penerima": $("#properties-kartu-nama-penerima").val(), "Kartu Nama Pengirim": $("#properties-kartu-nama-pengirim").val(), "Kartu Ucapan": $("[data-properties=ucapan]").val(), "Nama Penerima": $("#properties-nama-penerima").val(), "Order Number":"", "Status":"Product", "Foto": $("#properties-photo").val(), "Media": "", "Image": "8144957800663" }) const remove = updateCard(data) if(remove) { $("#properties-video").val("-") $(this).find("img").hide() $(this).hide() $(this).prev("p").text("Add video to make it more special (optional)") $("#label-input-video").show() $("#label-input-video span").text("Upload Video") $(".case-video-preview p span").remove() } } async function loadItemOccasion(t, occasion) { const name = occasion?.replace('greeting-card-', '') $("#kartu-ucapan").val("") $("[data-occassion]").removeClass("selected") $("[data-properties=ucapan]").val("") $("#save-card").attr("disabled", true) t.addClass("selected") $("#show_note").attr("data-card-occassion", name) $.get(`https://outerbloom.com/collections/${occasion}/products.json`, function(data, status){ const products = data.products const html = [] for(let i = 0; i < products.length; i++) { const id = products[i].id const variantId = products[i].variants[0].id const img = products[i].images[0].src const title = products[i].title const price = products[i].variants[0].price const qty = products[i].variants[0].inventory_quantity const body = `
No Item available
' : html.join("")) }); } $(document).ready(function(){ // Observer to auto-trigger addon loading when addon section becomes visible const addonObserver = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { const target = $(mutation.target) if(target.hasClass('purchaseAddon') && mutation.type === 'attributes' && mutation.attributeName === 'class') { if(!target.hasClass('hide')) { // Addon section just became visible, ensure items are loaded setTimeout(function() { if($("#itemAddons .row").children().length === 0 || $("#itemAddons .row").text().includes("No Item available")) { console.log("Auto-triggering addon load...") $("[data-addon=upsell-all]").trigger("click") } }, 150) } } }) }) // Start observing addon section const addonSection = document.querySelector('.purchaseAddon') if(addonSection) { addonObserver.observe(addonSection, { attributes: true, attributeFilter: ['class'] }) } $(".purchasePopup").delegate("#addtocart-card", "click", async function(){ $(this).find("span").addClass("loading") let isValid = true $(".formAddressPurchase [required]").each(function(){ const t = $(this) const input = t.val() const p = t.parent() if(input === '') { p.addClass("error") isValid = false } }) if(!isValid) { $(this).find("span").removeClass("loading") return } let items = [] const mainProps = { "Delivery Date": $("#propDeliveryDate").val(), "Delivery Time": $("#propDeliveryTime").val() !== '' ? $("#propDeliveryTime").val() : '-' , "Kota Pengiriman": $("#cities").val(), "Nama Penerima": $("[data-properties=nama-penerima]").val() !== '' ? $("[data-properties=nama-penerima]").val() : '-' , "Alamat Penerima": $("[data-properties=alamat-penerima]").val() !== '' ? $("[data-properties=alamat-penerima]").val() : '-' , "Kodepos": $("#zip").val() !== '' ? $("#zip").val() : '-' , "Telepon Penerima": $("[data-properties=telepon-penerima").val() !== '' ? $("[data-properties=telepon-penerima").val() : '-' , "Papan Nama Penerima": $("[data-properties=penerima]").val() !== '' ? $("[data-properties=penerima]").val() : '-' , "Papan Ucapan": $("[data-properties=ucapan]").val() !== '' ? $("[data-properties=ucapan]").val() : '-' , "Papan Nama Pengirim": $("[data-properties=pengirim]").val() !== '' ? $("[data-properties=pengirim]").val() : '-' , "Papan Logo": $("[data-properties=papan-logo]").val() !== '' ? $("[data-properties=papan-logo]").val() : '-' , "Foto Alamat": $("[data-properties=foto-alamat]").val() !== '' ? $("[data-properties=foto-alamat]").val() : '-' , "Province": $("#province").val() !== '' ? $("#province").val() : '-' , "Country": $("#properties-kota-pengiriman-country").val() !== '' ? $("#properties-kota-pengiriman-country").val() : '-' , "Shipping": $("#properties-shipping").val() !== '' ? $("#properties-shipping").val() : '-' , "Company": $("[data-properties=company]").val() !== '' ? $("[data-properties=company]").val() : '-' , "id": $("#properties-time").val() !== '' ? $("#properties-time").val() : '-', "type": 'product' } const props = await propItems() properties = {...mainProps, ...props }; const id = $("#productSelect").find('option:selected').val() console.log(id, 'main ID') const mainItem = { id: Number(id), quantity: 1, properties } items.push(mainItem) const cardId = $("#itemCards").find(".selected input").val() const cardItem = { id: Number(cardId), quantity: 1, properties: { "id": $("#properties-time").val() !== '' ? $("#properties-time").val() : '-', type: 'card' } } console.log(cardId, 'cardId') if(cardId) { items.push(cardItem) } const addon = await addons() if(addon) { for(let i = 0; i < addon.length; i++){ items.push({ id: addon[i].id, quantity: addon[i].quantity, properties: addon[i].properties }) } } const addItems = await additem(items) console.log(addItems.items, 'add items') if(addItems) { $(this).find("span").removeClass("loading") disablePopup() showPopupCart(addItems.items) localStorage.setItem("items", JSON.stringify(addItems.items)) } }) $("#addtocart-cart .btn").click(async function(){ const id = $("#productSelect").find('option:selected').val() const mainProps = { id: $("#properties-time").val() !== '' ? $("#properties-time").val() : '-', type: 'product' } const props = await propItems() const properties = { ...mainProps, ...props }; const items = { id: Number(id), quantity: 1, properties } const addItems = await additem(items) if(addItems) { showPopupCart(addItems.items) localStorage.setItem("items", JSON.stringify(addItems)) } }) $(".formAddressPurchase [required]").change(function(){ const t = $(this) const p = t.parent() const v = t.val() if(v !== '') { p.removeClass("error") } }) $("#save-card").click(async function(){ const parent = $(this).parents(".sectionPurchase") const next = parent.next(".sectionPurchase") $(this).find("span").addClass("loading") const card = await saveCard() console.log(card, 'ssaveCCC') if(card?.status === 200 || card?.status === 201) { $(".scanCard").removeClass("hide") $(this).find("span").removeClass("loading") parent.addClass("hide") next.removeClass("hide") if(next.hasClass("purchaseAddon")) { $("[data-addon=upsell-all]").click() console.log("clarity event addons") window.clarity("event", `${productType} add-ons`) // Ensure addon items are loaded when entering addon popup setTimeout(function() { if($("#itemAddons .row").children().length === 0 || $("#itemAddons .row").text().includes("No Item available")) { $("[data-addon=upsell-all]").trigger("click") } }, 100) } if(next.hasClass("purchaseAddress")) { $("#zip").select2() } } }) $("#skip-card").click(async function(){ $("#greetingCard [data-properties]").val("") $("#properties-photo").val("") $("#properties-video").val("") const parent = $(this).parents(".sectionPurchase") const next = parent.next(".sectionPurchase") parent.addClass("hide") next.removeClass("hide") // $("#itemCards").html("") removeImage() removeVideo() if(next.hasClass("purchaseAddon")) { $("[data-addon='upsell-all']").click() console.log("clarity event addons") window.clarity("event", `${productType} add-ons`) // Ensure addon items are loaded when entering addon popup setTimeout(function() { if($("#itemAddons .row").children().length === 0 || $("#itemAddons .row").text().includes("No Item available")) { $("[data-addon='upsell-all']").trigger("click") } }, 100) } if(next.hasClass("purchaseAddress")) { $("#zip").select2() } }) $("#msgCard").click(async function(){ $(this).parent().addClass("loading") let occasion = $(".selected[data-occassion]").data("occassion") occasion = occasion?.replace("greeting-card-", "") const { data } = await getFetch(`${host}/api/card/template/occasion?name=${occasion}`); const d = data?.data for(let i = 0; i < d.length; i++) { const num = Math.floor(Math.random() * (d.length - 1 + 1) + 1); const greeting = d[num]?.Greeting $(".greetingCard textarea").val(greeting) $(this).parent().removeClass("loading") } $("#save-card").attr("disabled", false) }) $(".sectionPurchaseBoard .next-purchase-button").click(function(){ const parent = $(this).parents(".sectionPurchase") const next = parent.next(".sectionPurchase") parent.addClass("hide") next.removeClass("hide") }) $("#editCard").click(function(){ $(".custom-card").show() $(".preview-card").hide() }) $("#first_name, #last_name").change(function(){ const v = $(this).val() const first_name = $("#first_name").val() const last_name = $("#last_name").val() !== '' ? ' ' + $("#last_name").val() : '' $("[data-properties=nama-penerima]").val(first_name+last_name) }) $("[data-occassion]").click(function(){ const t = $(this) const p = t.parents(".sectionPurchase") // $(".greetingCard").addClass("disabled") const occasion = t.data("occassion") loadItemOccasion(t, occasion) }) $("#itemCards").delegate(".item-card:not(.item-without-card) label", "click", function(){ const id = $(this).parent(".item-card").data("id") const t = $(this).parent(".item-card") const target = t.find("input") const v = $('.item-card input[type="radio"]:checked').val(); $("#itemCards .item-card").removeClass("selected") t.addClass("selected") $("#itemCards .item-card").find("input").attr("name", "") if(target.length > 0) { target.attr("name", "id[]") $("#properties-card").val(id) $(".greetingCard").removeClass("disabled") $("#skip-card").attr("disabled", false) } else { $("#properties-card").val("") } }) $("#itemCards").delegate(".item-without-card label", "click", function(){ const parent = $(this).parents(".sectionPurchase") const next = parent.next(".sectionPurchase") $(".greetingCard").addClass("disabled") parent.addClass("hide") next.removeClass("hide") $("[data-addon=upsell-all]").click() $("#zip").select2() }) $("[data-properties=ucapan]").keyup(function(){ const v = $(this).val() const p = $(this).parents(".sectionPurchase") $(".purchaseAddress").find(".greetingCard textarea").val(v) if(v.length > 3) { p.find(".next-purchase-button").attr("disabled", false) } else { p.find(".next-purchase-button").attr("disabled", true) } }) $("[data-properties=penerima]").keyup(function(){ const v = $(this).val() $(".purchaseAddress").find("[data-properties=penerima]").val(v) }) $("[data-properties=pengirim]").keyup(function(){ const v = $(this).val() $(".purchaseAddress").find("[data-properties=pengirim]").val(v) }) $(document).click(function(e){ if($(e.target).closest('.wrapperPopupCart').length != 0) return false; // $('#popupCart').fadeOut('slow'); // location.reload() }); $(".toggleAddonCart").click(function(){ const p = $(this).parent(".itemAddonCart") p.toggleClass("open") }) $(".btnViewCart").click(function(){ window.location.href = "https://outerbloom.com/cart"; }) $(".btnViewCheckout").click(async function(){ $(this).find("span").addClass("loading") let zip = $("#zip").val() const first_name = $("#first_name").val() const last_name = $("#last_name").val() const company = $("#company").val() !== '' ? $("#company").val() : '' const address1 = $("#delivery_address").val() const address2 = zip && zip !== '' ? zip?.split(' - ')[1] : '' zip = zip && zip !== '' ? zip?.split(' - ')[0] : '' const phone = $("#recipient_number").val() const city = $("#cities").val() const province = $("#province").val() const country = 'Indonesia' const ver = Date.parse(new Date()) const params = `checkout[email]=&checkout[shipping_address][first_name]=${first_name}&checkout[shipping_address][last_name]=${last_name}&checkout[shipping_address][company]=${company}&checkout[shipping_address][address1]=${address1}&checkout[shipping_address][address2]=${address2}&checkout[shipping_address][city]=${city}&checkout[shipping_address][country]=${country}&checkout[shipping_address][province]=${province}&checkout[shipping_address][zip]=${zip}&checkout[shipping_address][phone]=${phone}&v=${ver}` const clear = await fetch(`/cart/clear.js`, {method: 'POST'}) if(clear.status === 200) { const savedItem = window.localStorage.getItem("items"); const items = JSON.parse(savedItem) const addItems = await additem(items) console.log(addItems, 'new addItems') if(addItems) { window.location.href = `https://outerbloom.com/checkout?${params}`; } } }) $(".btnContinueShopping").click(function(){ window.location.href = "https://outerbloom.com/"; }) if (isIOS) { $(".empty-state-card").click(function(){ $("#input-foto").trigger("click") }) $(".btn-upload-image").click(function(){ $("#input-foto").trigger("click") }) $("[for=input-video]").click(function(){ $("#input-video").trigger("click") }) $(".btn-upload-papan").click(function(){ $("#logoPapan").trigger("click") }) } $("[data-properties]").each(function(){ const select = $(this).parents(".form-group").find("select") $(this).change(function(){ const name = $(this).data("properties") const v = $(this).val() if (name == 'telepon-penerima') { let phone = v.replace(/[^0-9]/g, '') $(this).val(phone); $("#properties-telepon-penerima").val(phone) $('.iti__search-input').val('-') } else { $("#properties-" + name).val(v) } }) select.on("change", function(){ const name = $(this).data("properties") const v = $(this).val() $("#properties-" + name).val(v) }) }) $("#show_note").click(function(){ nameq = $("#properties-nama-penerima").val() dear = $("#properties-kartu-nama-penerima").val() card = $("[data-properties=ucapan]").val() sender = $("#properties-kartu-nama-pengirim").val() photo = $("#properties-photo").val() video = $("#properties-video").val() updateCard(nameq, dear, card, sender, photo, video, status) }) $(".remove-image").click(function(e){ e.preventDefault() $(this).find("img").show() removeImage() }) $(".remove-media").click(function(e){ e.preventDefault() $(this).find("img").show() removeVideo() }) $("[data-delivery_method]").click(function(e){ e.preventDefault() const t = $(this) const data = t.data("delivery_method") $("[data-delivery_method]").removeClass("selected") t.addClass("selected") $("#cities").val("") $("#properties-delivery-date").val("-") $("#deliveryDate button").removeClass("selected") $("#full-date").val("Full Calendar →") $("#propDeliveryDate").val("") const step3 = $("#step-3") if(data.match('PickUp')) { $(".selfpickup-point").show() step3.find("[data-finished=false]").hide() $("#panel-4").hide() step3.find("[data-finished=true]").show() $("#cities").attr("required", false) $("#form-group-city").hide() $("#row-delivery-time").hide() $("#propDeliveryTime, #properties-delivery-time, #properties-nama-penerima, #properties-alamat-penerima, #properties-kodepos, #properties-kodepos, #properties-telepon-penerima").val("-") $("#propDeliveryTime").attr("required", false) // $("#deliveryDate").find("button:first-child").addClass("stop") $(".form-selfpickup").show() $(".form-delivery").hide() $(".form-delivery").find("input, textarea, select").val("") $(".form-delivery").find("input, textarea, select").attr("required", false) $("#properties-shipping").val("0") $("#noteDeliveryDate").hide() $(".form-delivery .form-control").attr("required", false) $("#stepNav4").hide() $("#deliveryDate").find("button:nth-child(1)").addClass("stop") if(timeOfDay >= 16.01){ $("#deliveryDate").find("button:nth-child(2)").addClass("stop") } } else { $("#deliveryDate").find("button:nth-child(1)").removeClass("stop") step3.find("[data-finished=false]").show() $("#panel-4").show() step3.find("[data-finished=true]").hide() $("#cities").attr("required", true) $(".selfpickup-point").hide() $("#form-group-city").show() $("#cities").val('').trigger('change'); $("#properties-kota-pengiriman").val("-") $("#row-delivery-date, #row-delivery-time").show() $("#propDeliveryDate, #propDeliveryTime").attr("required", true) $("#deliveryDate").find("button").removeClass("stop") $(".form-selfpickup").hide() $(".form-delivery").show() $(".form-delivery").find("input, textarea, select").attr("required", true) $(".form-delivery [data-properties]").attr("readonly", false) $("#properties-kodepos").val("-") $("#properties-alamat-penerima").val("-") $(".form-delivery .form-control").attr("required", true) $(this).parents(".setup-content").attr("id", "step-1") $("#stepNav4").show() } }) $("[name=selfpickup]").click(function(){ const p = $(this).parents(".row-pickup") const pickupCity = $("input[name='selfpickup']:checked").val(); const pickupAddress = $("input[name='selfpickup']:checked").data("address"); const pickupZip = $("input[name='selfpickup']:checked").data("zip"); $(".row-pickup").removeClass("selected") p.addClass("selected") $("#properties-kota-pengiriman").val(pickupCity) $("#province").val("Jakarta") $("#properties-alamat-penerima").val(pickupAddress) $("#properties-kodepos").val(pickupZip) }) $("#cities").change(function(e){ e.preventDefault() $(this).parent(".row").find("p.error").remove() $("#full-date").val("Full Calendar") $("#deliveryDate, #deliveryDateFull label ").show() $("#deliveryDateFull").removeClass("filled") $(".btnChangeDeliveryDate").addClass("hide") $("#full-date").prop('disabled', false); $("#stepNav2, #stepNav3, #stepNav4").removeClass("btn-success") $("#stepNav2, #stepNav3, #stepNav4").find("a").attr("disabled", true) const step3 = $("#step-3") $("#cityNote").remove() $("#noteDeliveryDate").hide() $("#noteDeliveryDate").empty() let v = $(this).val() let v2 = $('option:selected', this).attr('data-city'); let v3 = $('option:selected', this).attr('data-province'); let price = $('option:selected', this).attr('data-price'); $("#country").val(v) $("#properties-kota-pengiriman").val(v) $("#properties-shipping").val(price) $("#deliveryDate button, #deliveryTime button, .calendarseasonal .button").removeClass("selected") $("#properties-delivery-date, #properties-delivery-time").val("-") $("#propDeliveryDate, #propDeliveryTime").val("") let note = $('option:selected', this).attr('data-note'); if(v === 'Kota Lainnya') { $("#noteDeliveryDate").show() $("#noteDeliveryDate").text("Order akan segera dikirim. Estimasi tanggal diterima akan disesuaikan dengan waktu pengiriman oleh pihak ekspedisi ke lokasi Anda.") $("#zip").attr("required", false) $("#zip").hide() $("#propDeliveryDate, #propDeliveryTime").attr("required", false) $("#propDeliveryDate, #properties-delivery-date, #propDeliveryTime, #properties-delivery-time").val("-") $("#row-delivery-date, #row-delivery-time").hide() $("#properties-shipping").val("") // $(this).parents(".setup-content").attr("id", "step-2") } else { $("#noteDeliveryDate").hide() $("#zip").attr("required", true) $("#zip").show() $("#row-delivery-date, #row-delivery-time").show() $("#propDeliveryDate, #propDeliveryTime").attr("required", true) $("#deliveryDate").find("button").removeClass("stop") // $(this).parents(".setup-content").attr("id", "step-1") } // if(v !== 'Jakarta') { // $("[data-type=upsell]").hide() // } else { // $("[data-type=upsell]").show() // } // $('.collection-addons')[0].swiper.update(); getProvince(v) $("#zip").html(``) renderZip(v, v2, v3) disabledSameDay() if(v !== 'Jakarta' && v !== 'Depok' && v !== 'Bekasi' && v !== 'Tangerang') { $("#cardOccasion, #navAddon, .collection-addons").hide() $("[data-addon=giftcard]").show() $("[data-addon=giftcard]").click() $("#itemAddons").show() $("#flower-step").addClass("nonjadetabek") } else { $("#cardOccasion, #navAddon, .collection-addons").show() $("[data-addon=all]").click() $("#flower-step").removeClass("nonjadetabek") } if(v !== '') { $("#personalizeBtn .btn").attr("disabled", false) } else { $("#personalizeBtn .btn").attr("disabled", true) } }) $("#zip").change(function(e){ let v = $(this).val() var city = $("#cities").find('option:selected'); $("#properties-kodepos").val(v) if(city === 'Kota Lainnya') { $(this).attr("required", true) $("#recipient-address").val("") } }) var minDate = +7 $("#full-date").datepicker({ minDate, dateFormat: 'Mdd_yy', //Nop22_2021, beforeShowDay: disabledays, onSelect: function (date) { $("#deliveryDate, #deliveryDateFull label ").hide() $("#deliveryDateFull").addClass("filled") $(".btnChangeDeliveryDate").removeClass("hide") $("#full-date").prop('disabled', true); $('#propDeliveryDate, #properties-delivery-date').val('Kirim_'+date); $(".date-full").addClass("selected") $(".date-single, .calendar-group").removeClass("selected") $("#propDeliveryTime").val('') $("#properties-delivery-time").val('-') $(".time-single").removeClass("selected") } }); $(".btnChangeDeliveryDate").click(function(){ $("#deliveryDate, #deliveryDateFull label ").show() $("#deliveryDateFull").removeClass("filled") $(".btnChangeDeliveryDate").addClass("hide") $("#full-date").prop('disabled', false); }) $("#deliveryDate").delegate(".calendarbutton:not(.date-full)", "click", function(e){ e.preventDefault() $(this).parents("#row-delivery-date").find("p.error").remove() const fulldate = $(this).data("fulldate") const day = $(this).data("day") const date = $(this).data("date") const month = $(this).data("month") const year = $(this).data("year") const off_pagi = $(this).data("offpagi") const off_siang = $(this).data("offsiang") const off_Malam = $(this).data("offMalam") $(".calendarbutton").removeClass("selected") $(this).addClass("selected") $("#propDeliveryDate, #properties-delivery-date").val(`Kirim_${month}${date}_${year}`) $("#propDeliveryTime").val('') $("#properties-delivery-time").val('-') $(".calendarbutton2").removeClass("selected") $("#full-date").val("Full Calendar") if(off_pagi && timeOfDay > off_pagi) { $("[data-time=Morning]").attr("disabled", true) } else { $("[data-time=Morning]").attr("disabled", false) } if(off_siang && timeOfDay > off_siang) { $("[data-time=Afternoon]").attr("disabled", true) } else { $("[data-time=Afternoon]").attr("disabled", false) } }) if(today === 14 && timeOfDay > 17.00) { $("#deliveryDate button:first-child").attr("disabled", true) } $("#deliveryTime").delegate(".calendarbutton2", "click", function(e){ e.preventDefault() const time = $(this).data("time") const date = $("#propDeliveryDate").val() if(date == '') { return alert('Silakan pilih tanggal terlebih dahulu') } $(".calendarbutton2").removeClass("selected") $(this).addClass("selected") $("#propDeliveryTime, #properties-delivery-time").val(`KirimJam_${date.replace('Kirim_','')}_${time}`) }) $('textarea.has-limit, input.has-limit').keyup(function () { max = this.getAttribute("maxlength"); let len = $(this).val().length; let limit = $(this).siblings(".limit"); if (len > max) { alert('you have reached the limit'); } else { limit.text(`${len}/${max}`); } }); $("#button-action-step .btn").click(function(){ $(this).find("span").text("Processing..."); }); $(".finishBtn").on('click', function() { $(this).addClass("is-adding"); // $(this).click(); }); $('.setup-panel .nav-item a.btn-success').trigger('click'); $("#button-action .btn").click(function(){ $("#flower-step").addClass("block"); $("#button-action").hide(); }); $(".close-how-order").click(function(){ $("#flower-step").removeClass("block"); $("#button-action").show(); }); $("#input-foto, #input-video").change(function(e){ readURL(this); }); $("#logoPapan").change(function(){ readURLPapan(this); }); $("#address-upload").change(async function(){ const upload_address = await readURLAddress(this) if(upload_address) { const url = upload_address.url $(".props-address-upload").val(url) $(".form-address").addClass("address-uploaded") $(".form-address-upload").addClass("uploaded") $(this).parents(".form-group").siblings(".form-group").find("[required]").attr("required", false) } }) $(".address-manualy").click(function(){ $(".form-address-upload").removeClass("uploaded"); $(".photo-address").hide(); $(".form-address").removeClass("address-uploaded") $("#formAddressPurchase").find(".form-control").attr("required", true) }); $(".case-video-preview").delegate(".replace-video", "click", function(){ $("#input-video").trigger("click") }) $('.date-single').click(function(e) { e.preventDefault(); $('.date-single').removeClass('selected'); $('#full-date').removeClass('selected'); $(this).addClass('selected'); $('#full-date').html('Full' + '' + 'Calendar'); }); $('#full-date').click(function(e){ e.preventDefault(); $('.date-single').removeClass('selected'); $(this).addClass('selected'); }); // $("tr").each(function(){ // if($(this).text().match('SKU')) { // $(".sku-product").html($(this).parents("table").html()) // } // }) $("#product-image").scroll(function(){ $(".desc-add").each(function(){ const img = $(this).find("img") const src = img.data("src") img.attr("src", src) }) }) $(".product-fixed").hide() let target = $("#personalizeBtn") $(".product-meta").scroll(function() { if ($(window).scrollTop() >= target.offset().top ) { $(".product-fixed").addClass("show") } else { $(".product-fixed").removeClass("show") } }); $(window).scroll(function() { if ($(window).scrollTop() >= target.offset().top ) { $(".product-fixed").addClass("show") } else { $(".product-fixed").removeClass("show") } }); });
{{name}} {{#if variation}} {{/if}} {{#properties}} {{#each this}} {{#if this}} {{/if}} {{/each}} {{/properties}}
{{{linePrice}}} {{else}} {{{linePrice}}} {{/if}}
{{/each}}


PROMO
LOGIN
DAFTAR
WHATSAPP
Live Chat