Galaxy Z Fold4
- REVIEWS
- SPECIFICATIONS
- SUPPORT
- COMPARE
Buy now
- Highlights
- Showroom
- Accessories
- My Fold4
- REVIEWS
- SPECIFICATIONS
- SUPPORT
- COMPARE
*Accessories sold separately.
*Image simulated for illustrative purposes.
Make it yours, however you fold it
S PEN
S Pen goes where you go1
Standing Cover with Pen
Keep your S Pen Fold Edition handy while protecting the front and rear of your Galaxy Z Fold4. This cover has an adjustable kickstand to hold your screen up to a comfy 55° angle.
BUY NOWBUY NOWBUY NOW
S Pen Fold Edition
Optimised for Galaxy Z Fold4, the new S Pen Fold Edition makes it easy to stay productive with the expansive Main Screen.1 It's got a precise 1.5mm tip and low latency for a natural feeling while you write, sketch or take down notes.
BUY NOW
S Pen Pro
Write naturally and control your phone with ease. The S Pen Pro has all the comfort of your favourite pen, with the convenience of Bluetooth built in so you can use it as a remote, too.1
BUY NOW
ESSENTIALS
Boost your productivity game
Galaxy Watch5
Achieve wellness right from your wrist.
A durable design gets you through the day, helping you track your health data with ease.2Go to Galaxy Watch5
BUY NOWBUY NOWBUY NOW
BUY NOWBUY NOWBUY NOW
Galaxy Watch5 Pro
From tracking workouts to checking performance, this watch can help you hit your goals.2 It's highly durable too, to stand up to intense days outdoors.
Go to Galaxy Watch5 Pro
BUY NOWBUY NOW
Galaxy Buds2 Pro
Amplify your playlists with crystal clear sound and a design that gives your ears comfort track after track. ANC tunes out the noise to put your music in focus.
Go to Galaxy Buds2 Pro
BUY NOW BUY NOW BUY NOW
Galaxy SmartTag
Track down lost items fast. Attach the tag to important things, like your wallet, to spot its last-known location via the SmartThings Find app.3
BUY NOWBUY NOW
Keyboard
Add more flex to your phone in Flex mode. This Bluetooth keyboard makes it even more convenient to type up an email or text.
BUY NOWBUY NOW
CHARGERS
Bring on more power
*Charger/adapter and data cable may be sold separately.
15W Wireless Charger Duo
Slim but powerful, one side charges your phone or Buds, while a magnet on the other holds Galaxy Watch. A built-in cooling system enables Fast Wireless Charging.4
BUY NOWBUY NOW
25W Power Adapter
25W of power enables Super Fast Charging to get your phone back to 100% quickly.5 The USB Type-C port allows you to charge other devices too.
BUY NOWBUY NOW
CASES
Comfort and style, folded into one
*Image simulated for illustrative purposes.
Introducing Collaboration Cases
Galaxy Z Fold4 | Z Flip4: Introducing Collaboration Cases for Galaxy Z Fold4 and Z Flip4 | Samsung
Collaboration cases for Galaxy Z Fold4 and Z Flip4. Playful cartoons representing Star Wars, Mickey Mouse, Iron Man, and the Smurfs decorate the text. Next, a collage of brand logos including Pepsi, Star Wars, Disney & Marvel, the Simpsons, and Frida Kahlo. Then, the logos flip to show their corresponding collaboration cases on Galaxy foldable devices. Disclaimer: Model availability may vary by country or carrier. Case and device are sold separately. Iconic collaborations to elevate your vibe. Ring type. Galaxy Z Flip4 equipped with a Mickey Mouse themed case with ring. Then, a series of sample case designs from other brands. Disclaimer: Ring palettes sold separately. Model availability may vary by country or carrier. Case and device are sold separately. Clear case. Galaxy Z Flip4 equipped with a Smurfs themed clear case. Then, a variety of sample case designs from other brands form a circle. Disclaimer: Model availability may vary by country or carrier. Case and device are sold separately. Card holder. Galaxy Z Fold4 equipped with a Pepsi themed card holder case. A payment card slips into the holder. Disclaimer: Card holder sold separately. Model availability may vary by country or carrier. Case and device are sold separately. Strap type. Galaxy Z Flip 4 with a case equipped with a Simpsons themed strap and Galaxy Z Fold4 with a Star Wars themed strap. Then, a flat lay of many Galaxy foldable devices featuring sample strap designs from various brands. Disclaimer: Straps sold separately. Model availability may vary by country or carrier. Case and device are sold separately. Skin film. Galaxy Z Flip4 with Muzik Tiger skin film and Galaxy Z Fold4 with Odung skin film. Followed by designs from Knotted, Baduck Kim, Star Wars, the Simpsons, Cheese Duck and Muzik Tiger. Disclaimer: Skin films sold separately. Model availability may vary by country or carrier. Case and device are sold separately. A comic book style collage of various collaboration cases applied to Galaxy foldables. Disclaimer: Ring palettes sold separately. Card holder sold separately. Straps sold separately. Skin films sold separately. Model availability may vary by country or carrier. Case and device are sold separately. Carry your kind of cool. Get what everyone wants for the holidays. Galaxy Z Fold 4, Galaxy Z Flip4, Galaxy Buds2 Pro and Galaxy Watch5 displayed together in a holiday-themed diorama. Samsung dot com. Samsung logo.
Standing Cover with Pen
Keep your S Pen Fold Edition handy while protecting the front and rear of your Galaxy Z Fold4. This cover has an adjustable kickstand to hold your screen up to a comfy 55° angle.
BUY NOWBUY NOWBUY NOW
Slim Standing Cover
In your hands or hands-free, this soft case with a matte finish adds a layer of comfort and protection to your Galaxy Z Fold4. Fold the case, sit back and watch the open Main Screen.
BUY NOWBUY NOW
Silicone Grip Cover
Get a grip on your phone with soft silicone and a strap on the back for secure handing. You can even swap the strap to match your mood.6
BUY NOWBUY NOW
Leather Cover
Protect your Galaxy Z Fold4 in premium style. This case keeps a slim profile while cradling the front and rear and adding a soft, comfortable grip.
BUY NOWBUY NOW
Clear Edge Cover
Transparent to put your phone's eye-catching hues on display, this sleek and sturdy case delivers optimal protection while gently complementing the dimensions of your device.
Front Protection Film
Embrace sensitivity with this transparent shield for your screen. It deters everyday scratches and fingerprints while staying true to touch.
BUY NOW
Previous pageNext page
- HIGHLIGHTS
- SHOWROOM
- ACCESSORIES
Go to Galaxy Z Flip4
Make the Smart Switch
EXPLORE MORE
BUY NOWPRE-REGISTRATIONPRE-ORDERWHERE TO BUY
Trade in.
Level up.
Get an instant discount when you trade in your old smartphone
LEARN MORE
For creators and storytellers who see the world differently.
EXPLORE MORE
WHY GALAXY
Your Galaxy. Your way.
Galaxy devices give you more ways to connect and the freedom to make your experience exactly how you want it.
EXPLORE MORE
- High bandwidth mode- Low bandwidth mode
- Only use the Samsung S Pen Fold Edition designed exclusively for Galaxy Z Fold3 5G/Fold4 or S Pen Pro. All other S Pens or stylus pens not designed for Galaxy Z Fold4 (including those by other manufacturers) may damage the screen. The Galaxy Z Fold4 does not have a built in slot for the S Pen.
- Galaxy Watch5 must be paired with a Galaxy mobile device. Requires Samsung Galaxy Phone with Android 8.0, minimum 1.5GB RAM and Samsung Health app version 6.22.1 or later. Intended for general wellness and fitness purposes only. Not intended for use in detection, diagnosis, treatment of any medical condition or disease. The measurements are for your personal reference only. Please consult a medical professional for advice.
- Must be registered with SmartThings to receive smart notifications. Requires Samsung Account login, connection to Wi-Fi or data network and configurating settings in the SmartThings Find app.
- Wireless charger requires power connection. Charging speeds may vary by device. Actual charging speed may vary depending on usage, charging conditions and other factors.
- Availability of Super Fast Charging varies according to device.
- Additional straps sold separately.
'); } } else { // coming soon ??? $(cta).closest('.c_btn-area').append('
' + main.comingSoonCopy + '
'); }},xdoDisplaySkuInfo: function(cta, data) { console.log(data); // make sure only one is shown by removing before populating - find parent 'product-detail' var productDetail = cta.closest('.product-detail'); $(cta).closest('.buy-now-btn').removeClass('buy'); $(cta).closest('.buy-now-wrap').find('.price').remove(); // kd // $(productDetail).find('.c_btn_learn_more:visible a').removeClass('on'); // $(productDetail).find('.c_btn_learn_more:visible .price').remove(); if (data.price) { // need to check stock to determine whether to show the cta // need to check if promotion price exists before showing price var text = ''; if (data.stockLevelStatus == 'outOfStock') { text += '' + data.stockLevelStatusDisplay + ''; } if (data.promotionPrice) { if (data.priceFormatted != null && data.promotionPriceFormatted != null) { text += '' + data.priceFormatted + '' + data.promotionPriceFormatted + ''; } } else { if (data.priceFormatted != null) { text += '' + data.priceFormatted + ''; } } if (data.stockLevelStatus != 'outOfStock') { // sku exists AND product is REAL AND != outOfStock - show the button // $(cta).css('visibility', 'visible'); $(cta).closest('.buy-now-btn').addClass('buy'); // TRACKING ... // analytics on add to cart button $(cta).attr('data-omni-type', 'microsite_scAdd'); // var modelName = $(cta).closest('.product-detail').data('product'); var modelName = data.productCode.substr(0, 8); var dataOmni = ';' + modelName; dataOmni += ';' + (data.promotionPrice ? data.promotionPrice : data.price); dataOmni += '|' + data.productCode; console.log('xxx - ' + dataOmni); $(cta).attr('data-omni', dataOmni); } if (text != '') { $(cta).closest('.buy-now-wrap').append('
' + text + '
'); } } else { // remove on class and price div from all parents children $(cta).closest('.buy-now-wrap').append('
' + main.comingSoonCopy + '
'); }}, doGetSkuInfoGpv2: function(sku, cta, cb) { console.log('gpv2 - ' + sku); var result = {}; var skusData = { "skus": [sku], "offset": 0, "count": 0, "component_flags": { "price": true, "promotion": false, "inventory": true, "v2_inventory": false, "delivery_modes": false, "payment_methods": false, "partner_attributes": false, "promotion_price": false } }; var url = '//www.samsung.com' + '/' + main.site + '/api/v4/configurator/syndicated-product'; $.ajax({ url: url, type: 'POST', data: JSON.stringify(skusData), dataType: 'json', contentType: 'application/json; charset=UTF-8', success: function(data) { if (data.products && data.products.length == 1 && data.products[0].price_info && data.products[0].price_info.length > 0) { var prodData = data.products[0]; var productCode = prodData.model_code; var price = null; var priceFormatted = null; var promotionPrice = null; var promotionPriceFormatted = null; if (prodData.price_info && prodData.price_info.length == 1) { price = prodData.price_info[0].msrp_price.value; priceFormatted = prodData.price_info[0].msrp_price.formatted_value; promotionPrice = null; promotionPriceFormatted = null; if (prodData.price_info[0].sale_price.value != prodData.price_info[0].msrp_price.value) { // only populate promotionPrice if sale price differs from msrp price - so we can use the same logic as hybris promotionPrice = prodData.price_info[0].sale_price.value; promotionPriceFormatted = prodData.price_info[0].sale_price.formatted_value; } } // Consider gpv2 values - InStock, OutOfStock, BackOrdered, PreOrder, NoOrder var stockLevelStatus = 'outOfStock'; var stockLevelStatusDisplay = main.outOfStockCopy; if (prodData.inventory) { if (prodData.inventory.status.toLowerCase() == 'instock' || prodData.inventory.status.toLowerCase() == 'backordered' || prodData.inventory.status.toLowerCase() == 'preorder') { stockLevelStatus = 'inStock'; stockLevelStatusDisplay = ''; // not used if not outOfStock } } result.productCode = productCode; result.price = price; result.priceFormatted = priceFormatted; result.promotionPrice = promotionPrice; result.promotionPriceFormatted = promotionPriceFormatted; result.stockLevelStatus = stockLevelStatus; result.stockLevelStatusDisplay = stockLevelStatusDisplay; cb(result); } else { cb(result); } }, error: function(o) { console.log('error! ' + sku, o); cb(result); } })}, doGetSkuInfoHybris2: function(sku, cta, cb) { console.log('hybris2 - ' + sku); var result = {}; var params = "productCodes=" + sku + "&fields=SIMPLE_INFO"; var storeDomain = $('#storeDomain').val(); // returns https://p1-smn2-api-cdn.shop.samsung.com OR https://p1-smn3-api-cdn.shop.samsung.com $.ajax({ url: storeDomain + "/tokocommercewebservices/v2/" + main.site + "/products?" + params, type: "GET", data: {}, dataType: "json", cache: !0, crossDomain: !0, timeout: 1e4, success: function(s) { if (s && s.length == 1) { var data = s[0]; // console.log(data); var productCode = data.code; var price = null; var priceFormatted = null; var promotionPrice = null; var promotionPriceFormatted = null; if (data.price) { price = data.price.value; priceFormatted = data.price.formattedValue; } if (data.promotionPrice) { promotionPrice = data.promotionPrice.value; promotionPriceFormatted = data.promotionPrice.formattedValue; } var stockLevelStatus = 'outOfStock'; var stockLevelStatusDisplay = main.outOfStockCopy; if (data.stock && data.stock.stockLevelStatus && (data.stock.stockLevelStatus.toLowerCase() == 'instock' || data.stock.stockLevelStatus.toLowerCase() == 'backorder' || data.stock.stockLevelStatus.toLowerCase() == 'preorder')) { stockLevelStatus = 'inStock'; stockLevelStatusDisplay = ''; // not used if not outOfStock } result.productCode = productCode; result.price = price; result.priceFormatted = priceFormatted; result.promotionPrice = promotionPrice; result.promotionPriceFormatted = promotionPriceFormatted; result.stockLevelStatus = stockLevelStatus; result.stockLevelStatusDisplay = stockLevelStatusDisplay; cb(result); } else { console.log('fail!'); cb(result); } }, error: function(o) { console.log('error! ' + sku, o); cb(result); } }) }, doGetSkuInfoHybris: function(sku, cta, cb) { // returns // https://p1-smn2-api-cdn.shop.samsung.com OR // https://p1-smn3-api-cdn.shop.samsung.com OR // https://shop.samsung.com var storeDomain = $('#storeDomain').val(); console.log('hybris - ' + sku + ' ' + storeDomain); if (storeDomain.indexOf('https://shop.samsung.com') == 0) { main.doGetSkuInfoHybris1(sku, cta, cb); } else { main.doGetSkuInfoHybris2(sku, cta, cb); } }, doGetSkuInfoHybris1: function(sku, cta, cb) { console.log('hybris1 - ' + sku); var result = {}; var params = "productCodes=" + sku; $.ajax({ url: "https://shop.samsung.com" + "/" + main.site + "/servicesv2/getSimpleProductsInfo?" + params, type: "GET", data: {}, dataType: "jsonp", jsonpCallback: "jQuery12345678901234567890_" + sku.toString().toLowerCase().replace('-', '').replace('/', ''), cache: !0, crossDomain: !0, timeout: 1e4, success: function(s) { if ("0000" == s.resultCode && s.productDatas && s.productDatas.length == 1) { var data = s.productDatas[0]; // console.log(data); if ("0000" == data.resultCode) { // console.log('success workings - ' + data.productCode); result.productCode = data.productCode; result.price = data.price; result.priceFormatted = data.priceFormatted; result.promotionPrice = data.promotionPrice; result.promotionPriceFormatted = data.promotionPriceFormatted; result.stockLevelStatus = data.stockLevelStatus; result.stockLevelStatusDisplay = data.stockLevelStatusDisplay; cb(result); } else { console.log('fail sku!'); cb(result); } } else { console.log('fail!'); cb(result); } }, error: function(o) { console.log('error! ' + sku, o); cb(result); } }) }, getCB: function() { // get cache buster var now = new Date(); var year = now.getFullYear(), month = now.getMonth() + 1, // months are zero indexed day = now.getDate(), hour = now.getHours(), minute = now.getMinutes(), second = now.getSeconds(); month = month < 10 ? "0" + month : month day = day < 10 ? "0" + day : day hour = hour < 10 ? "0" + hour : hour minute = minute < 10 ? "0" + minute : minute second = second < 10 ? "0" + second : second var cb = year + "" + month + "" + day + "" + hour + "" + minute + "" + second; return cb; }, doGetSkuInfoExertis: function(sku, cta, cb) { console.log('exertis - ' + sku); var result = {}; var checkerUrl = 'https://shop.samsung.com/uk/products/' + sku + '.json?cb=' + main.getCB(); $.getJSON(checkerUrl, function(data) { var price = null; var priceFormatted = null; var promotionPrice = null; var promotionPriceFormatted = null; result.productCode = data.reference; result.price = data.price; // need to remove € and , result.priceFormatted = data.price; // var sku = data.reference; // var price = data.price; // var url = data.url;// console.log(data); // need to change 'ADD TO BASKET' to 'SHOP NOW' var stockLevelStatus = 'outOfStock'; var stockLevelStatusDisplay = main.outOfStockCopy; if (data.stock) { stockLevelStatus = 'inStock'; stockLevelStatusDisplay = ''; // not used if not outOfStock } result.url = data.url; cb(result); }) .done(function() { // console.log("XXX - done"); }) .fail(function() { // console.log("XXX - fail"); console.log('error! ' + sku); cb(result); }) .always(function() { // console.log("XXX - always"); }); }, doAddToCart: function(sku) {console.log('doAddToCart - ' + sku + ' ' + main.platform); if (main.platform == 'gpv2') {main.doAddToCartGpv2(sku); }/* else if (main.platform == 'hybris2') {main.doAddToCartHybris2(sku); }*/ else {main.doAddToCartHybris(sku); } }, doAddToCartGpv2: function(sku) { var qs = '&addItem[]=' + sku + ',1'; var url = '//www.samsung.com' + '/' + main.site + '/web/cart/?' + qs; console.log('url for gpv2 - ' + url); window.location.href = url; }, doAddToCartHybris2: function(sku) {var url = 'https://p1-smn2-api-cdn.shop.samsung.com/tokocommercewebservices/v2/' + main.site + '/addToCart/multi?fields=DEFAULT&newCart=false&products%5B0%5D.productCode=' + sku + '&products%5B0%5D.qty=1&redirect=CART';console.log('url for hybris2 - ' + url);window.location.href = url; }, showProgress: function() { // console.log('show progress'); $('.cm-configurator-loader').stop(true, true).show() }, hideProgress: function() { // console.log('hide progress'); $('.cm-configurator-loader').hide() }, doAddToCartHybris2New: function(sku, cb) { var storeDomain = $('#storeDomain').val();var url = storeDomain + '/tokocommercewebservices/v2/' + main.site + '/addToCart/multi?fields=BASIC&newCart=false&products%5B0%5D.productCode=' + sku + '&products%5B0%5D.qty=1';console.log('url for hybris2New - ' + url); main.showProgress(); $.ajax({ url: url, cache: false, crossDomain: true, xhrFields: { withCredentials: true }, dataType: 'json', timeout: 20000, success: function(s) { main.hideProgress(); if (s.length == 1 && s[0].statusCode == 'success') { // don't show popup - go straigh to cart ... main.showProgress(); window.location.href = "https://shop.samsung.com" + "/" + main.site + "/cart";/* // analytics on checkout button // var modelName = $('a[data-sku="' + sku + '"]').closest('.product-detail').data('product'); var modelName = sku.substr(0, 8); var dataOmni = ';' + modelName + '|' + sku; $('.configurator-item-added-popup .cm-configurator-popup__cta-inner a.s-cta-blue').attr('data-omni', dataOmni); $('.configurator-item-added-popup').show(); // $('.pd-popup-add-to-cart').show(); $('.js-empty-cart').hide(); $('.s-btn-utility.js-cart').show(); $('#globalCartCount').show(); updateTotalCartCount(s.cartCount);*/ } else { console.log('fail!'); } }, error: function(o) { main.hideProgress(); console.log('error!'); },complete: function(x) { cb();} }) }, doAddToCartHybris: function(sku) { if (['uk'].indexOf(main.site) != -1) {if (main.clusterAdded && main.netFunnelActionId) {NetFunnel_Action({action_id: main.netFunnelActionId}, function(ev, ret) { main.doAddToCartHybris2New(sku, function() { console.log('doAddToCartHybris2New - done WITH NETFUNNEL');NetFunnel_Complete(); });});}else { main.doAddToCartHybris2New(sku, function() { console.log('doAddToCartHybris2New - done'); });} } else {if (main.clusterAdded && main.netFunnelActionId) {NetFunnel_Action({action_id: main.netFunnelActionId}, function(ev, ret) { main.doAddToCartHybris1(sku, function() { console.log('doAddToCartHybris1 - done WITH NETFUNNEL');NetFunnel_Complete(); });});}else { main.doAddToCartHybris1(sku, function() { console.log('doAddToCartHybris1 - done'); });} } }, doAddToCartHybris1: function(sku, cb) { var params = "products[0].productCode=" + sku + "&products[0].quantity=1"; main.showProgress(); $.ajax({ url: "https://shop.samsung.com" + "/" + main.site + "/ng/p4v1/addToCart?" + params, // type: "GET", // data: {}, // dataType: "jsonp", // jsonp: "callback", // async: !1, // timeout: 1e4, cache: false, crossDomain: true, xhrFields: { withCredentials: true }, dataType: 'json', timeout: 20000, success: function(s) { main.hideProgress(); if ("0000" == s.resultCode) { // don't show popup - go straigh to cart ... main.showProgress(); window.location.href = "https://shop.samsung.com" + "/" + main.site + "/cart";/* // analytics on checkout button // var modelName = $('a[data-sku="' + sku + '"]').closest('.product-detail').data('product'); var modelName = sku.substr(0, 8); var dataOmni = ';' + modelName + '|' + sku; $('.configurator-item-added-popup .cm-configurator-popup__cta-inner a.s-cta-blue').attr('data-omni', dataOmni); $('.configurator-item-added-popup').show(); // $('.pd-popup-add-to-cart').show(); $('.js-empty-cart').hide(); $('.s-btn-utility.js-cart').show(); $('#globalCartCount').show(); updateTotalCartCount(s.cartCount);*/ } else { console.log('fail!'); } }, error: function(o) { main.hideProgress(); console.log('error!'); },complete: function(x) { cb();} }) },// KD START ...resetCta: function(item) {if (main.makeBuyable) { // only do if ...const $accItem = $(item), $optsArea = $accItem.find('.item-options'), $buyArea = $accItem.find('.btn_buy-now'), $colrchipsUL = $optsArea.find('ul.colorchip.on'), $radio = $colrchipsUL.find('input:radio:checked');// selected device index, 0 if noneconst deviceIndex = Math.max($optsArea.find('ul.opts>li.opts-item.on').index(), 0);// selected colour index, 0 if noneconst colorIndex = Math.max($radio.closest('.colorchip-item').index(), 0);// console.log('xxxxx doIt - ' + deviceIndex + ' ' + colorIndex + ' ' + imgName);$buyArea.removeClass('on');$buyArea.eq(deviceIndex).addClass('on');// $buyArea.eq(deviceIndex).find('>a.order-button').removeClass('on');$buyArea.find('>a.order-button').removeClass('on');$buyArea.eq(deviceIndex).find('>a.order-button').eq(colorIndex).addClass('on');var sku = $accItem.find('.btn_buy-now.on').find('>a.order-button.on').data('sku');console.log(sku);// NEED TO GET SKU info ... var cta = $accItem.find('.c_btn_f3:visible'); console.log(cta); if (sku && cta) { main.doGetSkuInfo(sku, cta); }}},// KD END ...xresetCta: function($item) {console.log($item); if (main.makeBuyable) { // only do if ... // $item IS the wrapping acc_list element main.doColor($item); } }, doCluster: function() {if (typeof commonNetFunnelUseYn !== 'undefined' && typeof commonNetFunnelJsStringArea !== 'undefined') {if (commonNetFunnelUseYn == 'Y') {if (main.clusterAdded) {// cluster files already added}else {// need to add cluster files ...var logic = '';for (var i = 0; i < main.clusters.length; i++) {var cluster = main.clusters[i];if (cluster.code == commonNetFunnelJsStringArea) {logic = cluster.logic;main.netFunnelActionId = cluster.actionId;break;}}if (logic) {var skin = "//images.samsung.com/is/content/samsung/p5/common/vp/" + main.site + "/sqs_s.js"// Create new script elementsvar script1 = document.createElement('script');script1.src = logic;var script2 = document.createElement('script');script2.src = skin;// Append to the `head` elementdocument.head.appendChild(script1);document.head.appendChild(script2);console.log('done doCluster');main.clusterAdded = true;}}}} }, doIt: function() { console.log('galaxy.makeAccessoriesBuyable.main.doIt'); $('#contents').addClass('buyable'); if (main.platform == 'gpv2') { // } else { main.doCluster(); $('.configurator-item-added-popup').hide(); // $('.pd-popup-add-to-cart').hide(); main.hideProgress(); $('.cm-configurator-popup__cta-inner .cm-configurator-popup-closer').on('click', function(e) { e.preventDefault(); $('.configurator-item-added-popup').hide(); }); $('.cm-configurator-popup__cta-inner .s-cta-blue').on('click', function(e) { e.preventDefault(); console.log('hide the popup before going to the page'); $('.configurator-item-added-popup').hide(); main.showProgress(); window.location.href = "https://shop.samsung.com" + "/" + main.site + "/cart"; }); } $('.m_content-acc .c_btn-area a.c_btn_f3').off('click'); $('.m_content-acc .c_btn-area a.c_btn_f3').on('click', function(e) { // check if linking or if adding to cart - href vs sku var sku = $(this).data('sku'); var href = $(this).attr('href'); console.log(sku + ' ' + href); if (sku) { e.preventDefault(); // console.log('add to Basket - ' + sku); main.doAddToCart(sku); } else { // console.log('go to ' + href); } }) }, }; return { main: main };})();window.GALAXY_IS_ASYNC=true;;(function(win,doc,callback){'use strict';callback=callback||function(){};function detach(){if(doc.addEventListener){doc.removeEventListener('DOMContentLoaded',completed)}else{doc.detachEvent('onreadystatechange',completed)}}function completed(){if(doc.addEventListener||event.type==='load'||doc.readyState==='complete'){detach();callback(window,window.jQuery)}}function init(){if (doc.addEventListener){doc.addEventListener('DOMContentLoaded',completed)}else{doc.attachEvent('onreadystatechange',completed)}}init()})(window,document,function(win,$){$.ajaxSetup({cache:true});$.ajax('/samsung/resources/global/galaxy-z-fold4/common/js/plugins.min.js').then(function(){return $.ajax('/samsung/resources/global/galaxy-z-fold4/common/js/common.min.js')}).then(function(){return $.ajax('/samsung/resources/global/galaxy-z-fold4/common/js/localization/common.min.js')}).then(function(){ // Call here so that is NOT using - the redundant divs are removed window.galaxy.makeAccessoriesBuyable.main.init();//
var disclaimerInit = false;var disclaimer = function disclaimer() { var anthorTitle; if (!$("#desc-section").length) { return false; } var init = function init() { disclaimerInit = true; var $disclaimer = $("#desc-section"); anthorTitle = $disclaimer.find("ol").data("title") || ""; var $sup = $("article[class^=m_feature] sup:not(.default)"); $disclaimer.find("li").each(function (i) { this.id = "disclaimer" + (this.dataset.sup || i + 1); }); $sup.each(addAnthor); addEvent(); }; var addEvent = function addEvent() { $(document).off("click.disclaimer").on("click.disclaimer", "a.click_sup", action); }; var action = function action(e) { var $target = $($(this).attr("href")); var moveTop = $target.offset().top - GALAXY.navHeight - 40; // padding-top 40; var $accessibility; $target.wrapInner($("", { attr: { tabindex: 0 } })); $accessibility = $target.find("a"); $accessibility.focus().one("blur", function () { $target.html($accessibility.html()); }); GALAXY.setScrollTop(moveTop); e.preventDefault(); }; var addAnthor = function addAnthor() { var $sup = $(this); var valArr = $sup.html().split(","); var lens = valArr.length; var i = 0, arr = []; for (; i < lens; i++) { var num = valArr[i].replace(/\s/g, ""); arr.push('' + num + ""); } $sup.html(arr.join(",")); }; !disclaimerInit && init();};(function () { $('ul.c_desc-lst').each(function () { var $ul = $(this), $li = $ul.find('>li'); if ($li.length > 1) { $ul.attr({ 'role': 'list' }); $li.attr({ 'role': 'listitem' }); } else { $li.attr({ 'role': 'presentation' }); } });})(); // focusInViewvar focusInView = function focusInView() { var interval = null; $(document).on('keyup.focusInView', 'a, button, input, select', function (e) { e.preventDefault(); var $target = $(e.target); if (event.keyCode == 9 && ($target.closest('#contents').length || $target.closest('.m_dotcom_footer').length) && !$target.closest('#subnav').length && !$target.closest('.excellence-list').length) { var $sticky = $target.closest('.sticky-inner'); var scrollValue = Math.floor($target.offset().top - GALAXY.areaHeight / 2); var dataFocus = $target.hasClass('click_sup') ? $target.parent().data('focus') : $target.data('focus'); if ($sticky.length && dataFocus) { var top; switch (dataFocus) { case 'top': top = 0; break; case 'bottom': top = $sticky.parent().height() - $sticky.height(); break; default: dataFocus = Math.max(0, Math.min(1, Number(dataFocus))); top = ($sticky.parent().height() - $sticky.height()) * dataFocus; break; } scrollValue = Math.floor($sticky.parent().offset().top + top + 1); } onAction(scrollValue, true); } }); var onAction = function onAction(scrollValue, force) { // let scrollValue = Math.floor($target.offset().top - GALAXY.areaHeight / 2); GALAXY.setScrollTop(scrollValue); clearTimeout(interval); if (force === true) { interval = setTimeout(function () { if (GALAXY.scrollTop != scrollValue) { onAction(scrollValue); } }, 30); } };}; // floating navigator bugvar floaingNaviScroll = function floaingNaviScroll() { var onScroll = function onScroll() { // let scrollTop = window.pageYOffset || document.documentElement.scrollTop; var oFloatNaviElement = document.querySelector(".floating-navigation"); var offsetTop = oFloatNaviElement.getBoundingClientRect().top; var className = "new-floating-navigation--fixed"; oFloatNaviElement.classList[offsetTop < 0 ? "add" : "remove"](className); }; window.addEventListener("scroll", onScroll, { passive: true });};$(".floating-navigation").length && floaingNaviScroll();window.onSatellite = function (value) { if (typeof _satellite != "undefined" && value) { _satellite.setVar("scrollTrack", value); _satellite.track("section_scroll_end"); }};GALAXY.load(function () { disclaimer(); focusInView();});// jump banner;// youtube modals$('.btn_collaboration-cases').on('click', function(e){ var $this = $(this); var $youtubeModal = null; var $youtubeModalDimd = null; var $youtubeDesc = null; GALAXY.vodPlayer.show(this.dataset.youtubeSrc, this, true); $('.QSIFeedbackButton').css({'z-index': 100}); $('.QSIFeedbackButton, #teconsent, #spr-live-chat-app').find('a, input, button, select, iframe').attr({'tabindex': '-1', 'aria-hidden': 'true'}); $('.m_layer-youtube.show').find('.c_btn_close-type1').one('click', function() { $('.QSIFeedbackButton, #teconsent, #spr-live-chat-app').find('a, input, button, select, iframe').removeAttr('tabindex aria-hidden'); $('html').removeClass('is-modal-opened'); setTimeout(function () { $this.blur(); }, 500); setTimeout(function () { $this.focus(); }, 1500); }); $youtubeModal = $('.m_layer-youtube.show'); $youtubeModalDimd = $youtubeModal.find('.modals_close-area'); $youtubeDesc = $youtubeModal.find('.youtube-desc'); $youtubeModalDimd.one('click', function() { GALAXY.vodPlayer.hide(); $('.QSIFeedbackButton, #teconsent, #spr-live-chat-app').find('a, input, button, select, iframe').removeAttr('tabindex aria-hidden'); $('html').removeClass('is-modal-opened'); setTimeout(function () { $this.blur(); }, 500); setTimeout(function () { $this.focus(); }, 1500); }); setTimeout(function() { $youtubeModal.find('.c_btn_close-type1').removeAttr('tabindex').focus(); }, 500); $('html').addClass('is-modal-opened'); $youtubeDesc.removeAttr('aria-hidden');});(function () { $('.m_feature_banners').each(function () { var visibleLens = $(this).find('>:visible ').length; $(this).removeClass('column1 column2 column3').addClass('column' + visibleLens); }); $('.m_feature_jump').each(function () { var oJump = this; var $jump = $(this); var $list = $('.jump_contents>ul'); var $card = $list.find('.jump_card:visible'); var $prev = $('.jump_arrows a.prev'); var $next = $('.jump_arrows a.next'); var lens = $card.length; var maxView = 4; var isOne = false; var obImageLazy = function obImageLazy(entries, observer) { $.each(entries, function (i, entry) { if (entry.isIntersecting) { var $images = $(entry.target).find('img'); $images.data('lazy', false); bannerResize(true); observer.unobserve(entry.target); } }); }; var bannerResize = function bannerResize(force) { if (force || GALAXY.sizeMode && GALAXY.sizeMode != GALAXY.prevSizeMode) { $card.each(function (i, li) { var $image = $(li).find('img'); if ($image.data('lazy') == false) { var imageUrl = GALAXY.setMediaBaseURL(GALAXY.getImageSources($image)[GALAXY.sizeMode]); if (typeof imageUrl == 'string') { $image.attr({ 'src': imageUrl }); } } }); } }; GALAXY.scroll(function () { if (isOne === false && GALAXY.scrollTop > 2) { isOne = true; var obImageInstance = new IntersectionObserver(obImageLazy, { root: null, rootMargin: '300%', thresholder: [0] }); obImageInstance.observe(oJump); } }); var slide = { init: false, index: 0, animation: false, interavl: null, maxView: lens - maxView, prev: function prev(e) { if (slide.animation) { return false; } slide.animation = true; if (slide.index == 0) { slide.animation = false; return false; } slide.index = slide.index - 1; slide.action(); e.preventDefault(); }, next: function next(e) { if (slide.animation) { return false; } slide.animation = true; if (slide.index >= slide.maxView) { slide.animation = false; return false; } slide.index = slide.index + 1; slide.action(); e.preventDefault(); }, action: function action() { slide.animation = true; slide.btnVisibleCheck(); var w = $card.width() + parseInt($card.eq(1).css('margin-left')); $list.__css({ x: -w * slide.index }); GALAXY.setTransitionEndEvent($list, slide.end); }, btnVisibleCheck: function btnVisibleCheck() { $prev.decideClass('hide', slide.index == 0); $next.decideClass('hide', slide.index >= slide.maxView); }, end: function end() { slide.animation = false; } }; if (lens > 3) { $jump.addClass('cols4'); if (lens > 4) { slide.init = true; $('.m_feature_jump .jump_arrows').show(); slide.index = Math.max($card.filter('.on').index() + 1 - maxView, 0); slide.action(); slide.btnVisibleCheck(); $prev.on('click', slide.prev); $next.on('click', slide.next); } } else { $jump.addClass('cols3'); $card.each(function (i, li) { var $image = $(li).find('img').data('lazy', true); $image.attr({ 'data-media-s4': $image.attr('data-media-s4').replace('.png', '-v2.png') }); }); } GALAXY.resize(function () { if (slide.init && GALAXY.sizeMode > 2) { slide.interavl && clearTimeout(slide.interavl); slide.interavl = setTimeout(slide.action, 150); } bannerResize(); }); bannerResize(true); });})();var oKeyVisual = function () { var $kv = $("#kv-type2"); var $copyArea = null; var _init = function _init() { if (!$kv.length) { return false; } setRollAttr(); return this; }, setRollAttr = function setRollAttr() { if ($kv.find(".desc-area").find(">.kv-desc").length > 1) { $kv.find(".desc-area").attr({ role: "list" }).find(">.kv-desc").attr({ role: "listitem" }); } }; return { init: _init };}(); //var overviewTabControl = function overviewTabControl() { var $tabs = $(".m_content-overview").find(".f_overview-tab a"); var $target = null; var onClick = function onClick(e) { $target = $($(this).attr("href")); if (!$target.length) { $target = null; return false; } var subnavHeight = $("#subnav, .floating-navigation__wrap").height() || 0; var scrollMove = $target.offset().top - subnavHeight; GALAXY.setSmoothScrollTop(scrollMove, 750, scrollMoveEnd); e.preventDefault(); }; var scrollMoveEnd = function scrollMoveEnd() { if (!$target) return; var $moveTarget = $target.find(".c_cate-type1"); if (!$moveTarget.length) { $moveTarget = $target.find(".c_title-type2"); } $moveTarget.attr({ tabindex: 0 }).focus().one("blur", function () { $(this).removeAttr("tabindex"); }); $target = null; }; $tabs.on("click", onClick);};var Accessories = function () { var $section = $(".m_content-acc"), $items = $section.find("li.acc-item"), $images = $items.find(".figure>img"), accPages = $("#contents").data("model"), itemSelectText = $section.find("ul.acc_list").data("select-title"); $productKv = $('.m_feature-acc-kv'); var _init = function _init() { addEvent(); }; var _beginSetup = function _beginSetup() { defaultSelect(); chkRole(); }; var defaultSelect = function defaultSelect() { $items.each(function () { var $item = $(this), $heads = $item.find(".opts-head"), $optsArea = $item.find(".item-options"), $buyArea = $item.find(".btn_buy-now"), colorChipIndex = -1; $optsArea.find("ul.colorchip").each(function (i) { var $colrchipsUL = $(this); // Change ID $colrchipsUL.find(">li.colorchip-item").each(function () { var reId = this.dataset.id; if (reId) { $(this).find("input:radio").attr({ id: reId }); $(this).find("label").attr({ for: reId }); } }); if (!$colrchipsUL.find("input:radio:checked").length) { $colrchipsUL.find("input:radio:first").prop("checked", true); } colorChipIndex = $colrchipsUL.find("input:radio:checked").parent().index(); $buyArea.eq(i).find(">a.order-button").eq(colorChipIndex).addClass("on"); // Remove Role Attribute if ($colrchipsUL.find(">li").length < 2) { $colrchipsUL.removeAttr("role").find(">li").removeAttr("role"); } }); $optsArea.find("ul.opts").each(function () { var $selectOptsList = $(this).find("li.opts-item.on"); if (!$selectOptsList.length) { $(this).find("li.opts-item:first").addClass("on").find("button").attr({ title: itemSelectText }); } else { $selectOptsList.find("button").attr({ title: itemSelectText }); } }); var tabIndex = Math.max($optsArea.find("ul.opts>li.opts-item.on").index(), 0); $optsArea.find("ul.colorchip").removeClass("on").eq(tabIndex).addClass("on"); if ($buyArea.data("buy-type")) { var buyType = $optsArea.find("ul.opts>li.opts-item.on").find(">button").data("buy-type"); $buyArea.removeClass("on").filter('[data-buy-type="' + buyType + '"]').addClass("on"); } else { $buyArea.removeClass("on").eq(tabIndex).addClass("on"); } $heads.get(0) && $heads.hide().eq(tabIndex).show(); changeItem($item, true); }); }; var chkRole = function chkRole() { var $roleList = $items.find('.opts'); $roleList.each(function (index, item) { if ($(item).find('.opts-item').length < 2) { $(item).removeAttr('role'); $(item).find('.opts-item').removeAttr('role'); } }); }; var getImgName = function getImgName(id) { // Image naming Role Check if (id.indexOf("galaxy-z-fold4") < 0 && id.indexOf("galaxy-z-flip4") < 0) { id = accPages + "_" + id; } id = id.replace("galaxy-z-fold4_", "galaxy-z-fold4_").replace("galaxy-z-flip4_", "galaxy-z-flip4_"); return id; }; var changeItem = function changeItem(item, isFirst) { var $accItem = $(item), $image = $accItem.find(".o_figure img:first"), $optsArea = $accItem.find(".item-options"), $selectModel = $optsArea.find(".opts-item.on > button"), $currentColorArea = $optsArea.find(".current-color>span"), $colrchipsUL = $optsArea.find("ul.colorchip.on"), $radio = $colrchipsUL.find("input:radio:checked"), selectColorIndex = $radio.parent().index();console.log('xxxxx changeItem');window.galaxy.makeAccessoriesBuyable.main.resetCta($accItem); var radio = $radio[0]; if (!radio) { if ($selectModel.get(0)) { radio = $selectModel[0]; } else { return false; } } // setup buy button if (selectColorIndex > -1) { $accItem.find(".btn_buy-now.on").find("a.order-button").removeClass("on").eq(selectColorIndex).addClass("on"); } var folder = $accItem.parent("ul.acc_list").data("folder"); var imgName = getImgName(radio.id); var imgPath = "//images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z-fold4/accessories/images/" + folder + "/" + imgName; var imgAttr = { "data-media-s4": imgPath + ".jpg", alt: radio.dataset.imgAlt }; if ($accItem.hasClass("acc-item")) { // wide style imgAttr["data-media-s1"] = imgPath + "_s.jpg"; } var $cloneImage = $image.clone(); $image.attr(imgAttr); if (isFirst) { GALAXY.imgLazyLoad.push({ type: "image", target: $image.parent()[0] }); } else { $image.after($cloneImage.addClass("fake")); $cloneImage.animate({ opacity: 0 }, 250, function () { $(this).remove(); }); GALAXY.sizeMode && $image.attr("src", GALAXY.getImageSources($image)[GALAXY.sizeMode]); } if ($radio.length && $currentColorArea.length) { var colorName = $radio.attr("aria-label"); $currentColorArea.text(colorName); } }; var _onModelChange = function _onModelChange(target) { var $button = $(target); var $item = $button.closest("li.acc-item"); var $optsItem = $button.parent(); var currentIndex = $optsItem.index(); if (!$optsItem.hasClass("on")) { var $heads = $item.find(".opts-head"); var $targetColorChip = $item.find(".opts-lst>.colorchip").eq(currentIndex); var $radio = $item.find(".opts-lst>.colorchip.on").find("input:radio:checked"); var $buyNows = $item.find(".c_btn-area > .btn_buy-now"); $targetColorChip.find("input:radio").each(function (i, oRadio) { if (oRadio.value == $radio[0].value) { oRadio.checked = true; $(oRadio).siblings().prop("checked", false); } }); $heads.get(0) && $heads.hide().eq(currentIndex).show(); $targetColorChip.addClass("on").siblings().removeClass("on"); $optsItem.addClass("on").siblings().removeClass("on").find("button").attr({ title: "" }); $button.attr({ title: itemSelectText }); if ($buyNows.length) { var buyType = $button.data("buy-type"); if (buyType) { $buyNows.removeClass("on").filter('[data-buy-type="' + buyType + '"]').addClass("on"); } else { $buyNows.removeClass("on").eq(currentIndex).addClass("on"); } } changeItem($item); } return false; }; var onColorChange = function onColorChange() { var $item = $(this).closest("li.acc-item"); changeItem($item); GALAXY.isGalaxy && GALAXY.tracking.call(this); return false; }; var addEvent = function addEvent() { $items.find(".item-options .opts-item > button").on("click", function () { _onModelChange(this); }); $items.find(".item-options .colorchip-item > input:radio").on("change", onColorChange); }; var imageChange = function imageChange() { $images.each(function () { var $image = $(this); $image.data("lazy") === false && $image.attr("src", GALAXY.getImageSources($image)[GALAXY.sizeMode]); }); }; var _sizeChange = function _sizeChange() { imageChange(); }; return { init: _init, begin: _beginSetup, modelChange: _onModelChange, sizeChange: _sizeChange };}();Accessories && Accessories.begin();var onResize = function onResize() { if (GALAXY.prevSizeMode > -1 && GALAXY.sizeMode != GALAXY.prevSizeMode) { Accessories && Accessories.sizeChange(); }};var onHashChange = function onHashChange(force) { var hash = document.location.href.split("#")[1]; var target = document.getElementById(hash); var targetItem = document.querySelectorAll('[data-hash]'); var tabArr = []; var delay = 450; targetItem.forEach(function (el) { tabArr.push(el.dataset.hash); }); if (target) { if (tabArr.indexOf(hash) > -1) { var $targetButton = $('[data-hash="' + hash + '"]'); Accessories.modelChange($targetButton); target = $targetButton.closest("li.acc-item")[0]; } var subnavHeight = $("#subnav, .floating-navigation__wrap").height() || 0; var offsetTop = target.getBoundingClientRect().top + window.scrollY - subnavHeight - 50; if (force === true) { GALAXY.setScrollTop(offsetTop); setTimeout(onHashChange, delay); } else { GALAXY.setSmoothScrollTop(offsetTop, delay); } }};onHashChange(true);var onLoad = function onLoad() { overviewTabControl(); oKeyVisual && oKeyVisual.init(); Accessories && Accessories.init(); window.addEventListener("hashchange", onHashChange);};GALAXY.load(onLoad);GALAXY.resize(onResize);//
}).then(function(){GALAXY.initialize()// Call here (second time) because now all default selections should be selected - so can get pricing etc if buyablewindow.galaxy.makeAccessoriesBuyable.main.init();})});