X
Pencarian
Menu
Best Deals
Multimedia
True Wireless
Brands
AKG
Audiobank
Audio Research
Defunc
Denon
Harman Kardon
Ibanez
Infinity Lab
JBL
JBL
JBL Professional
JBL Quantum
Korg
Marantz
M Intosh
Nakamichi
Pioneer
Polk Audio
Q Acoustic
QED
Sennheiser
Sengled
Shure
Sonus Faber
Soundcraft
Ultimate Ears
Categories
Accessories
Automation
AV Receivers
Headphone
Bluetooth
Cable
Gaming
Google Assistant
Noise Cancelling
Sport Headphone
True Wireless
Home Theater
Amplifier
Floor Standing
Speaker
Karaoke
Touchscreen
Speaker
Mixer
Player
Lightbulb
Microphone
Subwoofer
Soundbar
Wireless Speaker
Store Location
Article & Events
About Us
Best Deals
Multimedia
True Wireless
Brands
AKG
Audiobank
Audio Research
Defunc
Denon
Harman Kardon
Ibanez
Infinity Lab
JBL
JBL
JBL Professional
JBL Quantum
Korg
Marantz
M Intosh
Nakamichi
Pioneer
Polk Audio
Q Acoustic
QED
Sennheiser
Sengled
Shure
Sonus Faber
Soundcraft
Ultimate Ears
Categories
Accessories
Automation
AV Receivers
Headphone
Bluetooth
Cable
Gaming
Google Assistant
Noise Cancelling
Sport Headphone
True Wireless
Home Theater
Amplifier
Floor Standing
Speaker
Karaoke
Touchscreen
Speaker
Mixer
Player
Lightbulb
Microphone
Subwoofer
Soundbar
Wireless Speaker
Store Location
Article & Events
About Us
Best Deals
Multimedia
True Wireless
Brands
AKG
Audiobank
Audio Research
Defunc
Denon
Harman Kardon
Ibanez
Infinity Lab
JBL
JBL
JBL Professional
JBL Quantum
Korg
Marantz
M Intosh
Nakamichi
Pioneer
Polk Audio
Q Acoustic
QED
Sennheiser
Sengled
Shure
Sonus Faber
Soundcraft
Ultimate Ears
Categories
Accessories
Automation
AV Receivers
Headphone
Bluetooth
Cable
Gaming
Google Assistant
Noise Cancelling
Sport Headphone
True Wireless
Home Theater
Amplifier
Floor Standing
Speaker
Karaoke
Touchscreen
Speaker
Mixer
Player
Lightbulb
Microphone
Subwoofer
Soundbar
Wireless Speaker
Store Location
Article & Events
About Us
{stock_status_text}
{selected_variant.price | * exchange_rate | currency}
{selected_variant.final_price | * exchange_rate | currency}
{'o => Math.round(o)' | fx selected_variant.discount_percentage}%
{option.name}
{value.value}
{value.value}
Jumlah
Stok tersisa:
Tambahkan ke keranjang
Product yang berhubungan
Baru
Low Stock
Out of Stock
IDR {'(o) => o * parseFloat("1")' | fx item.selected_variant.price | number}
IDR {'(o) => o * parseFloat("1")' | fx item.selected_variant.final_price | number}
{'o => Math.round(o)' | fx item.selected_variant.discount_percentage}%
+ Tambahkan ke keranjang
Ditambahkan ke keranjang.
Lihat Keranjang
Maaf, Stok tidak mencukupi.
Minggu" break; case 1: full_day = "Senin" break; case 2: full_day = "Selasa" break; case 3: full_day = "Rabu" break; case 4: full_day = "Kamis" break; case 5: full_day = "Jum'at" break; case 6: full_day = "Sabtu" break; } switch (dt.getMonth()) { case 0: full_month = "Januari" break; case 1: full_month = "Februari" break; case 2: full_month = "Maret" break; case 3: full_month = "April" break; case 4: full_month = "Mei" break; case 5: full_month = "Juni" break; case 6: full_month = "Juli" break; case 7: full_month = "Agustus" break; case 8: full_month = "September" break; case 9: full_month = "Oktober" break; case 10: full_month = "November" break; case 11: full_month = "Desember" break; } full_date = 'Tersedia sampai: ' + full_day + ', ' + dt.getDate() + ' ' + full_month + ' ' + dt.getFullYear() + ' ' + (dt.getHours()<10?'0':'') + dt.getHours() + ':' + (dt.getMinutes()<10?'0':'') + dt.getMinutes(); return full_date; } var product = {"id":"78eaf143-8f85-485b-9b45-51fac6a40769","product_id":"05c42332-1054-4369-bde1-41c88b5e1592","default_product_id":"a21be6cb-7e65-bce3-d91b-00b499865419","available":false,"created_at":"2024-08-08T06:45:10.467Z","published_at":"2024-08-08T06:45:10.45Z","published_until":null,"handle":"jbl-soundgear-frames-open-wireless-bluetooth-audio-glasses-speaker","has_only_default_variant":false,"price":3299000.0,"price_max":3299000.0,"price_min":3299000.0,"price_varies":false,"title":"JBL Soundgear Frames Open Wireless Bluetooth Audio Glasses Speaker","type":null,"vendor":"JBL","kind":"standard","in_wishlist":false,"wishlist_type":null,"stock_status":"out-of-stock","sold_count":0.0,"view_count":177,"rating":null,"rating_count":0,"outlet_id":null,"form_id":null,"object_type":"product","featured_image":{"attached_to_variant":false,"src":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","preview_image":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","width":null,"height":null,"aspect_ratio":null,"id":"b9198987-29ab-1b7a-0caa-169dfbe7ebf1","header_id":"78eaf143-8f85-485b-9b45-51fac6a40769","product_id":null,"alt":null,"position":-1,"media_type":"image"},"description":"JBL Soundgear Frames are the perfect fusion of sound and fashion. Made with the latest thermoplastic materials, the slim, flexible, lightweight frames are comfortable enough to wear all day, and come in three unique translucent colors and two stylish designs. (And yes, you can get prescription lenses installed in them by your optician.) Open the temples to turn the speakers on and close them to turn them off. When you’re wearing them, just tap the JBL logo on either temple to adjust the volume, answer a call, or skip a song. JBL’s unique ultra-thin 25mm*9mm high amplitude speakers—powered by JBL OpenSound technology—are mounted inside the slim temples to enhance aesthetics and comfort. They deliver an immersive and engaging audio experience while still letting you hear the sounds around you. Connect the Soundgear Frames to the JBL Headphones app and customize the sound to your own preferences, or choose from 6 preset EQ curves. The JBL Soundgear Frames are where style meets sound\n\n***\n\nFeatures\n\nJBL OpenSound Technology\nHands-free, crystal clear calls\n8 hours of play time, plus more\nRugged and water resistant\nStyle and comfort\nWear and play\nConvenient USB Type-C charging\nInstant and precise control\nJBL Headphones app\n\n**\n\nFeatures and Benefits\n1. JBL OpenSound Technology\nEach temple cleverly conceals JBL’s unique ultra-thin 25mm*9mm high amplitude rectangular speaker with a three-layer diaphragm, featuring a special algorithm for bass enhancement and frequency division processing.\n\n2. The JBL Soundgear Frames deliver an immersive, engaging and no\u0002compromise sound experience while leaving your ears completely open, so you can still hear everything that’s happening around you.\n\n3. Hands-free, crystal clear calls\nThe advanced beamforming 2-mic array on one temple, with dual-module environmental noise cancellation and nonlinear echo suppression algorithms, ensure you’ll always have high-quality conversations. Plus, the hydrodynamic wind-proof design significantly reduces distortion from air friction. Simply put: enjoy crystal clear calls, wherever you are.\n\n4. 8 hours of play time, plus more\n8 hours of playtime gives you music and calls throughout an entire day of work or fun. And if you need some more time, a quick 10-minute charge gives you another 2 hours.\n\n5. Rugged and water resistant\nNot only are JBL Soundgear Frames lightweight and comfortable enough to wear all day long, they’re also IP54 certified water resistant. So a little rain doesn’t mean you have to cut your afternoon jog short.\n\n6. Style and comfort\nThe newly designed ultra-thin rectangular speakers are mounted inside the slim temples, greatly enhancing aesthetics and comfort. The durable, flexible, lightweight frames come in three trendy translucent colors—Onyx, Pearl, and Amber—all with a choice of square or round frames. The semi-transparent lenses feature UV A/B blocking. You can also have a professional optician fit your Soundgear Frames with prescription lenses.\n\n7. Wear and play\nNo need to find the power button. The speakers turn on when you open the frames and off when you close them.\n\n8. Convenient USB Type-C charging Running out of juice? Quickly recharge both temples of the JBL Soundgear\nFrames at the same time with the USB Type-C Y-shaped cable provided in the box, or any other standard USB Type-C cable.\n\n9. Instant and precise control\nThe JBL logo doubles as an easy-to-find control panel that gives you fast, accurate control over your frames.\n\n10. JBL Headphones app\nUse the JBL Headphones app on your device to tweak your sound and customize the gestures according to your needs. Choose from six EQ presets or a fully customizable 10-band equalizer to adjust highs, mids, and lows—so your music is just right for you\n\n**\n\nTechnical Specifications\n\nPower supply: 5 V = 0.5 A *2\nMaterial: Frame-Plastic (TR90), Hinge-metal (SUS316), Temple housing- Plastic (PC)\nIPX rate: IP54\nDriver size: 25mm x 9 mm/0.98” x 0.35” Dynamic Driver\nFrequency response: 100 Hz - 18kHz\nImpedance: 20 ohm\nSensitivity: 114 dB SPL@1 kHz\nMaximum SPL: 90 dB\nMicrophone sensitivity: -38 dBV/Pa@1 kHz\nMaximum operation temperature: 45 °C\n\n\nBluetooth version: 5.2\nBluetooth transmitter frequency range: 2.4 GHz – 2.4835 GHz\nBluetooth transmitter power: <12 dBm (EIRP)\nBluetooth transmitter modulation: GFSK, π/4-DQPSK, 8DPSK\nDimensions Round shape (L x W x H): 160.87mm * 150.54mm * 53.68mm / 6.33” 5.93” 2.11”\nDimensions Square shape (L x W x H): 160.21 mm x 152.54 mm x 50.83 mm/6.31” x 6.01” x 2.00”\nBattery type: Lithium-ion battery (110 mAh/ 3.8 V)\nCharging time: 2 hrs from empty\n\nWhat’s in the Box\n\n1 x Soundgear Frame audio glasses\n1 x Carrying case\n1 x USB Type-C Y-shaped charging cable\n1 x product QSG/ Safety Sheet","featured_media":{"attached_to_variant":false,"src":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","preview_image":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","width":null,"height":null,"aspect_ratio":null,"id":"b9198987-29ab-1b7a-0caa-169dfbe7ebf1","header_id":"78eaf143-8f85-485b-9b45-51fac6a40769","product_id":null,"alt":null,"position":-1,"media_type":"image"},"collections":null,"images":[{"attached_to_variant":false,"src":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","preview_image":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","width":null,"height":null,"aspect_ratio":null,"id":"b9198987-29ab-1b7a-0caa-169dfbe7ebf1","header_id":"78eaf143-8f85-485b-9b45-51fac6a40769","product_id":null,"alt":null,"position":-1,"media_type":"image"}],"media":[{"attached_to_variant":false,"src":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","preview_image":"https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/65dd631ca21b431fa10d4876719a2686.png","width":null,"height":null,"aspect_ratio":null,"id":"b9198987-29ab-1b7a-0caa-169dfbe7ebf1","header_id":"78eaf143-8f85-485b-9b45-51fac6a40769","product_id":null,"alt":null,"position":-1,"media_type":"image"}],"selected_variant":{"image":null,"featured_media":null,"options":[],"descriptions":[],"media":[],"discount":0.0,"discount_percentage":0.0,"final_price":3299000.0,"id":"a21be6cb-7e65-bce3-d91b-00b499865419","header_id":"78eaf143-8f85-485b-9b45-51fac6a40769","available":false,"barcode":"","inventory_policy":"deny","inventory_quantity":0.0,"price":3299000.0,"requires_shipping":true,"sku":"JBL SNDGEARFMS SABR","taxable":true,"title":"Square/Kotak / Pearl/White","track_inventory":true,"weight_in_unit":1.0,"position":330,"weight_unit":"kg","sold_count":0.0,"stock_status":"out-of-stock"},"selected_or_first_available_variant":null,"variants":[{"image":null,"featured_media":null,"options":[],"descriptions":[],"media":[],"discount":0.0,"discount_percentage":0.0,"final_price":3299000.0,"id":"a21be6cb-7e65-bce3-d91b-00b499865419","header_id":"78eaf143-8f85-485b-9b45-51fac6a40769","available":false,"barcode":"","inventory_policy":"deny","inventory_quantity":0.0,"price":3299000.0,"requires_shipping":true,"sku":"JBL SNDGEARFMS SABR","taxable":true,"title":"Square/Kotak / Pearl/White","track_inventory":true,"weight_in_unit":1.0,"position":330,"weight_unit":"kg","sold_count":0.0,"stock_status":"out-of-stock"}],"options_with_values":[],"modifier_options":[],"bundles":[],"bundle_options":{},"tags":[],"url":"/product/jbl-soundgear-frames-open-wireless-bluetooth-audio-glasses-speaker","related_products":null,"descriptions":[],"wishlist_count":null,"page_title":null,"page_description":null,"outlet":null,"outlet_ids":["66d75a69-c56f-07fa-5b75-01af56538ca4","883a3722-ef31-d596-3513-0acd9beed80c","77fc5ad3-3562-2f5a-c23e-0d456a50b650","7e2697b6-d6f0-7ac5-11ff-0e2695c599a4","cdfc3bfa-95a8-741f-369a-136ea71c643a","3c86baab-e8a2-6d29-e539-1f7e9a1dc400","410446dd-f58a-32a8-c4cb-25340d4e1b84","e2fdbf96-82a4-9ba0-1d90-27da64ba9543","d693f211-9609-3dc3-fe26-285a5cf6e03c","269cef26-efd5-1b04-73eb-2bcbe1debb0f","8161ae19-6467-e6e0-5bfa-2e51e809b42a","67bd6e93-5e8b-0cc2-e390-314877434045","b1654a05-0b21-045e-a85e-32a1cc547a79","514a63d3-89c1-68c9-83f3-3b20b6a9b267","6f63f9c8-a795-3893-eb0d-3d78c5598f21","69f3229d-f032-6e9b-38ba-430726cd95df","0f38ccf1-38ef-638f-4203-45e9ca52f566","66cdf9ea-0b90-30d0-76e8-48600d8b5446","60d0d38e-6ee8-23d2-2888-4c1f00000126","d3d9cf09-b943-3148-af40-54a6d4d1db3e","4c8b8e46-cfdb-75ba-6355-5aeff1d9b761","9567a88a-bfc7-f769-c2c0-5d5296518d9b","c88d6b57-d46d-9c7b-c80e-6484b90647f5","8c6a6e7e-42d8-932c-c264-6ce3d0e6a464","d5b29874-461a-93b2-9ab1-6e70adb628cc","6b2880b0-acbf-404a-3762-78ff6ade7836","764d8056-712f-c692-dc4f-7df41dc56568","6b726c94-a478-bd77-08aa-8306805c12e9","8faf67d9-c849-4c81-b2c4-a8279ff40301","47c7d584-6e01-8bf3-d378-c9052cb85d67","938e4dc2-a5bf-35c5-9935-d2ffe2312ac9","8db7dacf-5481-b537-99a0-dd941f07ed6a","c31d317d-1f43-4343-1f7f-de800c4ef8db","38d660d9-a3db-61e7-c50b-f7c9ff32759d","558cf6ac-5f82-892d-dfad-fa34a82f9e8e","867703cb-a1a5-1a94-894a-fa3a19da126c","bcd3488c-e521-9591-43a7-fdaec23439ed"],"outlets":null,"discount":0.0,"discount_percentage":0.0,"final_price":3299000.0,"can_rate":false,"ratings":[]}; product.__entityType = "Product"; product.has_images = ""; product.quantity = 1; product.available_quantity_info = ""; product.maximum_reached = false; product.maximum_reached_disabled = false; product.minimum_reached = false; product.exchange_rate = 1; //product.media = []; //if (product.selected_variant) // product.selected_variant.media = []; //else // product.selected_variant = { media: [] }; var model = new EntityBase(product); model.notify_email = ''; model.notify_email_error_message = ''; model.notify_clicked = false; model.ProductLoading = true; model.ShoppingCart = iSeller.ShoppingCart; //var productImage = new Image(); //productImage.onload = function(){ // $(".image-loading").fadeOut(); //}; //productImage.src = model.selected_variant.images[0].Src; LoadOptions(); if(("unit_stock" == "unit_stock" || "unit_stock" == "manual") && model.selected_variant.track_inventory){ model.selected_variant.maximum_quantity = model.selected_variant.inventory_quantity; } var availableQuantity = model.selected_variant.maximum_quantity; var remainingAvailableQuantity = 0; var cartItems = iSeller.ShoppingCart.items; remainingAvailableQuantity = availableQuantity; for (var i = 0; i < cartItems.length; i++) { if (cartItems[i].id == model.selected_variant.id) { var productInCartQuantity = cartItems[i].quantity; remainingAvailableQuantity = remainingAvailableQuantity - productInCartQuantity; } } if (remainingAvailableQuantity <= 0 && model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory) { model.quantity = 1; model.maximum_reached = true; model.maximum_reached_disabled = true; if (remainingAvailableQuantity < 0) remainingAvailableQuantity = 0; model.selected_variant.available = remainingAvailableQuantity + " Stok Tersisa"; } model.dropdown_quantity = []; if('default' == "dropdown" && remainingAvailableQuantity > 0 && model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory){ for (var i = 1 ; i <= remainingAvailableQuantity; i++) { model.dropdown_quantity.push(i); } } else if('default' == "dropdown" && (model.selected_variant.inventory_policy == "continue" || !model.selected_variant.track_inventory)){ for (var i = 1 ; i <= 99; i++) { model.dropdown_quantity.push(i); } } else{ model.dropdown_quantity.push(0); } model.show_stock_status = false; if (model.stock_status == "in-stock" && 'false' == "true") { model.show_stock_status = true; model.stock_status_text = "In Stock"; } else if (model.stock_status == "out-of-stock" && model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory && 'true' == "true") { model.show_stock_status = true; model.minimum_reached = true; model.stock_status_text = "Out of Stock"; } else if (model.stock_status == "low-stock" && 'true' == "true") { model.show_stock_status = true; model.stock_status_text = "Low Stock"; } else if (model.stock_status == "incoming-stock" && 'false' == "true") { model.show_stock_status = true; model.stock_status_text = "Incoming Stock"; } model.onQuantityChange = function(){ if(model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory){ if (model.quantity >= remainingAvailableQuantity || remainingAvailableQuantity == 0) { model.quantity = remainingAvailableQuantity; } if(model.quantity <= 0){ model.quantity = 1; } } } model.OnPropertyChanged = function (property, oldValue, newValue) { if(property == "quantity") { if(model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory){ if (model.quantity >= remainingAvailableQuantity || remainingAvailableQuantity == 0) { if(remainingAvailableQuantity <= 0){ model.maximum_reached_disabled = true; } model.maximum_reached = true; model.selected_variant.available = remainingAvailableQuantity + " Stok Tersisa"; } else{ model.maximum_reached = false; } } } else if(property == "selected_variant"){ if(("unit_stock" == "unit_stock" || "unit_stock" == "manual") && model.selected_variant.track_inventory){ model.selected_variant.maximum_quantity = model.selected_variant.inventory_quantity; } availableQuantity = model.selected_variant.maximum_quantity; remainingAvailableQuantity = availableQuantity; for (var i = 0; i < cartItems.length; i++) { if (cartItems[i].id == model.selected_variant.id) { var productInCartQuantity = cartItems[i].quantity; remainingAvailableQuantity = remainingAvailableQuantity - productInCartQuantity; } } if(remainingAvailableQuantity <= 0 && model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory){ model.maximum_reached_disabled = true; model.maximum_reached = true; model.selected_variant.available = remainingAvailableQuantity + " Stok Tersisa"; } else{ model.maximum_reached_disabled = false; model.maximum_reached = false; model.selected_variant.available = ''; } model.dropdown_quantity = []; if('default' == "dropdown" && remainingAvailableQuantity > 0 && model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory){ for (var i = 1 ; i <= remainingAvailableQuantity; i++) { model.dropdown_quantity.push(i); } } else if('default' == "dropdown" && (model.selected_variant.inventory_policy == "continue" || !model.selected_variant.track_inventory)){ for (var i = 1 ; i <= 99; i++) { model.dropdown_quantity.push(i); } } else{ model.dropdown_quantity.push(0); } model.quantity = 1; //var productImage = new Image(); //productImage.onload = function(){ // $(".image-loading").fadeOut(); //}; //productImage.src = model.selected_variant.images[0].Src; } App.BindingService.TriggerChange(this, property); }; model.invalidate = function (a, b, c) { var item = b.value; var nodes = model.findTreeNodes(item); if (nodes.length > 0) { var level = nodes[0].Level; var selectedVariantValues = []; for (var i = 0 ; i < model.selected_variant.options.length; i++) { selectedVariantValues.push(model.selected_variant.options[i]); } selectedVariantValues[level] = item; var matches = []; var mostMatch = 0; for (var i = 0 ; i < nodes.length ; i++) { var node = nodes[i]; var counter = 0; var parentNode = node.Parent; for (var j = level ; j >= 1 ; j--) { var parentSelectedVariantValue = selectedVariantValues[j - 1]; var parentNodeVariantValue = parentNode.VariantValue; if (model.isVariantMatch(parentNodeVariantValue, parentSelectedVariantValue)) { counter++; parentNode = parentNode.Parent; } else { break;; } } if (mostMatch < counter) { mostMatch = counter; } matches.push(counter); } var candidates = []; for (var i = 0 ; i < matches.length; i++) { var match = matches[i]; if (match == mostMatch) { candidates.push(nodes[i]); } } var matchedCandidate = null; for (var i = 0 ; i < candidates.length; i++) { var candidate = candidates[i]; if (model.isChildrenMatch(candidate, selectedVariantValues, level)) { matchedCandidate = candidate; } } if (matchedCandidate != null) { var currentNode = matchedCandidate; for (var j = level ; j >= 0 ; j--) { selectedVariantValues[j] = currentNode.VariantValue; currentNode = currentNode.Parent; } } else { matchedCandidate = candidates[0]; var root = matchedCandidate; var position = level; while (true) { if (!root.Parent.IsRoot) { root = root.Parent; position--; selectedVariantValues[position] = root.VariantValue; } else { break; } } position = level; var node = matchedCandidate; while (true) { selectedVariantValues[position] = node.VariantValue; if (node.Children.length > 0) { var childSelectedVariantValue = selectedVariantValues[position + 1]; var matchNode = null; for (var i = 0 ; i < node.Children.length; i++) { var childNode = node.Children[i]; if (model.isVariantMatch(childNode.VariantValue, childSelectedVariantValue)) { matchNode = childNode; break; } } if (matchNode != null) node = childNode; else node = node.Children[0]; position++; } else { break; } } } for (var i = 0 ; i < model.variants.length; i++) { var variant = model.variants[i]; var isMatch = true; for (var j = 0 ; j < selectedVariantValues.length; j++) { if (!model.isVariantMatch(variant.options[j], selectedVariantValues[j])) { isMatch = false; break; } } if (isMatch) { model.selected_variant = variant; model.has_images = variant.media.length <= 1 && model.media.length <= 1 ? "hide" : ""; } } model.updateStates(); InitializeFlexSlider(); } }; model.isChildrenMatch = function (node, selectedVariantValues, level) { if (node.Children.length == 0) { return true; } var childSelectedVariantValue = selectedVariantValues[level + 1]; for (var i = 0 ; i < node.Children; i++) { var childNode = node.Children[i]; if (this.isVariantMatch(childNode.VariantValue, childSelectedVariantValue)) { return this.isChildrenMatch(childNode, selectedVariantValues, level + 1); } } return false; } model.buildTree = function () { var root = new VariantNode(); root.IsRoot = true; for (var i = 0 ; i < this.variants.length; i++) { var variant = this.variants[i]; var node = root; if (variant.options) { for (var j = 0 ; j < variant.options.length; j++) { var variantValue = variant.options[j]; var childNode = node.findChildren(variantValue); if (childNode == null) { var childNode = new VariantNode(); childNode.VariantValue = variantValue; node.Children.push(childNode); childNode.Parent = node; } node = childNode; } } } this.Tree = root; }; model.buildTreeMap = function () { var level = 0; var array = []; model.TreeMap = []; model.TreeMap[0] = array; for (var i = 0 ; i < this.Tree.Children.length; i++) { var node = this.Tree.Children[i]; node.Level = level; array.push(node); this.buildTreeMapChild(node, level + 1); } }; model.buildTreeMapChild = function (node, level) { if (node.Children.length > 0) { var array = model.TreeMap[level]; if (typeof array == "undefined") { array = []; model.TreeMap[level] = array; } for (var i = 0 ; i < node.Children.length; i++) { var childNode = node.Children[i]; childNode.Level = level; array.push(childNode); this.buildTreeMapChild(childNode, level + 1); } } }; model.isVariantMatch = function (source, target) { return source.option_id == target.option_id && source.id.toLowerCase().trim() == target.id.toLowerCase().trim(); }; model.getActiveVariantValues = function () { var activeVariantValues = []; var level = 0; model.getActiveChildVariantValues(this.Tree, activeVariantValues, level); return activeVariantValues; } model.getActiveChildVariantValues = function (node, activeVariantValues, level) { if (this.selected_variant != null && this.selected_variant.options != null && this.selected_variant.options.length >= level + 1) { var selectedVariantValue = this.selected_variant.options[level]; for (var i = 0 ; i < node.Children.length; i++) { var childNode = node.Children[i]; activeVariantValues.push(childNode); if (this.isVariantMatch(childNode.VariantValue, selectedVariantValue)) { this.getActiveChildVariantValues(childNode, activeVariantValues, level + 1); } } } } model.updateStates = function () { var activeVariantValues = this.getActiveVariantValues(); // model.selected_variant.variant_name = ""; for (var i = 0 ; i < this.options_with_values.length; i++) { var option = this.options_with_values[i]; for (var j = 0 ; j < option.values.length; j++) { var variantValue = option.values[j]; variantValue.ClassName = ""; for (var k = 0 ; k < model.selected_variant.options.length; k++) { var selectedVariantValue = model.selected_variant.options[k]; if (this.isVariantMatch(variantValue, selectedVariantValue)) { variantValue.ClassName = "selected"; // model.selected_variant.variant_name += selectedVariantValue.value + " "; } } var match = false; for (var k = 0 ; k < activeVariantValues.length; k++) { var selectedVariantValue = activeVariantValues[k]; if (this.isVariantMatch(variantValue, selectedVariantValue.VariantValue)) { match = true; break; } } if (!match) { variantValue.ClassName = "disabled"; } } } // $("#selectedVariantDiscount").text((Math.round(model.selected_variant.discount_percentage * 100)) + "%") }; model.findTreeNodes = function (variantValue) { var nodes = []; for (var i = 0 ; i < model.TreeMap.length; i++) { var array = model.TreeMap[i]; for (var j = 0 ; j < array.length; j++) { var node = array[j]; if (this.isVariantMatch(node.VariantValue, variantValue)) { nodes.push(node); } } } return nodes; }; var default_image_url = "https://cdn.isellercommerce.com/caeb16622d404ae5b33c907f934ee6ed/Themes/exceed529bb37a/assets/images/product-placeholder.png"; model.addToCart = new DelegateCommand({ Command: function (model) { iSeller.ShoppingCart.isCartUpdated = false; if (model.selected_variant.inventory_quantity != null && model.quantity > remainingAvailableQuantity && model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory) { //if (model.selected_variant.inventory_quantity != null && model.quantity > model.selected_variant.inventory_quantity) { $(".add-to-cart-fail-info-container").addClass("show-info-container").delay(5000).queue(function () { $(this).removeClass("show-info-container").dequeue(); }); $("#close-add-to-cart-fail-info").click(function () { $(".add-to-cart-fail-info-container ").stop(); $(".add-to-cart-fail-info-container ").removeClass("show-info-container"); }); model.selected_variant.available = remainingAvailableQuantity + " Stok Tersisa"; } else { var self = this; self.IsProcessing = true; var preOrderStock = 0; if(model.quantity > remainingAvailableQuantity && model.selected_variant.track_inventory){ if(remainingAvailableQuantity > 0){ preOrderStock = model.quantity - remainingAvailableQuantity; } else{ preOrderStock = model.quantity; } } var readyStock = model.quantity - preOrderStock; if(preOrderStock > 0){ iSeller.ShoppingCart.AddItem({ title: model.title, sku: model.selected_variant.sku, product_id: model.selected_variant.id, id: model.selected_variant.id, original_price: model.selected_variant.price, discount: model.selected_variant.discount, image: { src: model.featured_media ? model.featured_media.preview_image : default_image_url }, variant_name: model.selected_variant.title, image_scale: "contain", properties: { has_only_default_variant: product.has_only_default_variant, options_with_values: product.options_with_values, selected_variant: product.selected_variant, inventory_policy: product.selected_variant.inventory_policy, inventory_quantity: product.selected_variant.inventory_quantity, track_inventory: product.selected_variant.track_inventory, stock_status: product.selected_variant.stock_status } }, preOrderStock); } if(readyStock > 0){ iSeller.ShoppingCart.AddItem({ title: model.title, sku: model.selected_variant.sku, product_id: model.selected_variant.id, id: model.selected_variant.id, original_price: model.selected_variant.price, discount: model.selected_variant.discount, image: { src: model.featured_media ? model.featured_media.preview_image : default_image_url }, variant_name: model.selected_variant.title, image_scale: "contain", status: 'ready', properties: { has_only_default_variant: product.has_only_default_variant, options_with_values: product.options_with_values, selected_variant: product.selected_variant, inventory_policy: product.selected_variant.inventory_policy, inventory_quantity: product.selected_variant.inventory_quantity, track_inventory: product.selected_variant.track_inventory, stock_status: product.selected_variant.stock_status } }, readyStock, false); } var promise = iSeller.SaveShoppingCart(); promise.done(function(){ iSeller.ShoppingCart.isCartUpdated = true; App.BindingService.TriggerChange(iSeller.ShoppingCart, "FinalAmount"); $(".add-to-cart-success-info-container").addClass("show-info-container").delay(5000).queue(function () { $(this).removeClass("show-info-container").dequeue(); }); $("#close-add-to-cart-success-info").click(function () { $(".add-to-cart-success-info-container").stop(); $(".add-to-cart-success-info-container").removeClass("show-info-container"); }); if(model.selected_variant.inventory_policy == "deny" && model.selected_variant.track_inventory){ remainingAvailableQuantity = remainingAvailableQuantity - model.quantity; if('default' == "dropdown" && remainingAvailableQuantity > 0 && model.selected_variant.inventory_policy == "deny"){ model.dropdown_quantity = []; for (var i = 1 ; i <= remainingAvailableQuantity; i++) { model.dropdown_quantity.push(i); model.quantity = 1; } } if(remainingAvailableQuantity <= 0){ model.maximum_reached_disabled = true; if('default' == "dropdown"){ model.dropdown_quantity = []; model.dropdown_quantity.push(0); model.quantity = 0; } } } if(model.selected_variant.inventory_policy == "continue" && 'default' == "dropdown"){ remainingAvailableQuantity = remainingAvailableQuantity - model.quantity; } }).always(function(){ self.IsProcessing = false; App.BindingService.TriggerChange(model, "maximum_reached_disabled") App.BindingService.TriggerChange(iSeller.ShoppingCart, "items") }) } } }); model.AddToWishList = new DelegateCommand({ Command: function (model) { var self = this; self.IsProcessing = true; var enableRestock = false; if('false' == 'true'){ enableRestock = true; } var qualifiedRestockNotification = enableRestock && remainingAvailableQuantity <= 0; iSeller.AddWishlist(model, qualifiedRestockNotification) .done(function (result) { if (result.IsSuccess) { model.in_wishlist = true; } }) .fail(function (result) { }) .always(function (result) { self.IsProcessing = false; }); } }); model.RemoveFromWishList = new DelegateCommand({ Command: function (model) { var self = this; self.IsProcessing = true; iSeller.RemoveWishlist(model) .done(function (result) { if (result.IsSuccess) { model.in_wishlist = false; } }) .fail(function (result) { }) .always(function (result) { self.IsProcessing = false; }); } }); model.RegisterEmailNotification = new DelegateCommand({ Command: function (model) { var self = this; self.IsProcessing = true; App.HttpService.Post("Wishlist", "RegisterEmailNotification", { productId: model.product_id, emailAddress: model.notify_email }) .done(function (result) { model.notify_email_error_message = result.IsSuccess ? '' : result.Message; }) .fail(function (result) { }) .always(function (result) { self.IsProcessing = false; model.notify_clicked = true; }); } }); model.increaseQty = function () { model.quantity++; } model.decreaseQty = function () { if (model.quantity > 1) { model.quantity--; } } model.resolveLazyImage = function(mod){ var l = this; var imageUrl = mod.item.featured_media ? mod.item.featured_media.preview_image : default_image_url; SetImgDataSrc(l, imageUrl, $(l).outerWidth(), l); } model.ProcessWishListProductDetail = new DelegateCommand({ Command: function (model) { var self = this; self.IsProcessing = true; if(model.in_wishlist) { iSeller.RemoveWishlist(model) .done(function (result) { if (result.IsSuccess) { model.in_wishlist = false; } }) .fail(function (result) { }) .always(function (result) { self.IsProcessing = false; }); } else { iSeller.AddWishlist(model) .done(function (result) { if (result.IsSuccess) { model.in_wishlist = true; } }) .fail(function (result) { }) .always(function (result) { self.IsProcessing = false; }); } } }); model.ProcessWishList = new DelegateCommand({ Command: function (mod) { var enableRestock = false; if('false' == 'true'){ enableRestock = true; } var isQualifiedNotify = !mod.item.available && enableRestock; var self = this; self.IsProcessing = true; if(mod.item.in_wishlist) { iSeller.RemoveWishlist(mod.item) .done(function (result) { if (result.IsSuccess) { mod.item.in_wishlist = false; } }) .fail(function (result) { }) .always(function (result) { self.IsProcessing = false; }); } else { iSeller.AddWishlist(mod.item, isQualifiedNotify) .done(function (result) { if (result.IsSuccess) { mod.item.in_wishlist = true; } }) .fail(function (result) { }) .always(function (result) { self.IsProcessing = false; }); } } }); model.related_items = []; model.new_product_ids = []; model.IsLoading = false; var pageSizeData = 10; model.LoadRelatedProducts = function (pageSizeData) { var self = this; model.IsLoading = true; if (pageSizeData < 0) { return { done: function(fn){fn()}, fail: function(fn){}, always: function(fn){fn()}, }; } var param = { related_to: product.id, pageSize: pageSizeData, lang: page.Language, includes: ["discount", "selected_variant", "featured_media"] }; return $.ajax({ url: "/services/Liquid/Products", type: "POST", data: param }).done(function (result) { if (result && result.IsSuccess && result.Data) { model.related_items = model.related_items.concat(result.Data); result.Data.each(function(item){ for (var i = 0; i < item.descriptions.length; i++ ) { var current_desc = item.descriptions[i]; if (current_desc.name == "Additional Product Info") { item.additional_product_info = current_desc.description; break; } } }); InitializeRelatedFlexSlider(); } }); }; model.LoadRelatedProducts(pageSizeData) .always(function () { model.IsLoading = false; }); var variants = [] || []; variants = variants.reduce(function(res, v){ res[v.header_id] = v; return res; }, {}); model.DirectAddToCart = new DelegateCommand({ Command: function (model) { var self = this; self.IsProcessing = true; iSeller.ShoppingCart.AddItem({ title: model.item.title, sku: model.item.selected_variant.sku, product_id: model.item.selected_variant.id, id: model.item.selected_variant.id, original_price: model.item.selected_variant.price, discount: model.item.selected_variant.discount, image: { src: model.item.featured_media ? model.item.featured_media.preview_image : default_image_url }, variant_name: model.item.selected_variant.title, image_scale: "contain", status: 'ready', properties: { has_only_default_variant: product.has_only_default_variant, options_with_values: product.options_with_values, selected_variant: product.selected_variant, inventory_policy: product.selected_variant.inventory_policy, inventory_quantity: product.selected_variant.inventory_quantity, track_inventory: product.selected_variant.track_inventory, stock_status: product.selected_variant.stock_status } }, 1, false); var promise = iSeller.SaveShoppingCart(); promise.done(function() { page.Notification.Show({ Type: 'success' }); }).always(function(){ self.RaiseCanExecuteChange(); self.IsProcessing = false; }) }, CanExecuteCommand: function(model) { if (!model.item) return false; return model.item.available; } });