$product = {"id":1424439607395,"title":"iPhone XS Max Mod NX - 邊框","handle":"iphone-xs-max-crashguard-nx","description":"\u003cmeta charset=\"utf-8\"\u003e\u003cmeta charset=\"utf-8\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cspan style=\"color: #ff0000;\" data-mce-style=\"color: #ff0000;\"\u003e\u003cspan\u003e1、CrashGuard NX與ModNX的飾條、按鈕皆可共用。\u003c\/span\u003e\u003c\/span\u003e\u003c\/strong\u003e\u003cbr\u003e\u003cspan style=\"color: #ff0000;\" data-mce-style=\"color: #ff0000;\"\u003e\u003cstrong\u003e2、未附背板,\u003c\/strong\u003e\u003c\/span\u003e\u003cspan style=\"color: #ff0000;\" data-mce-style=\"color: #ff0000;\"\u003e\u003cstrong\u003e若需透明背板搭配,請選購ModNX系列。\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cspan style=\"color: #ff0000;\"\u003e\u003cimg src=\"\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/files\/unnamed_large.png?v=1535958095\" alt=\"\" width=\"572\" height=\"356\"\u003e\u003c\/span\u003e\u003c\/strong\u003e\u003c\/p\u003e","published_at":"2018-08-31T18:43:47+08:00","created_at":"2018-08-31T15:29:49+08:00","vendor":"Rhinoshieldtaiwan","type":"CrashGuard NX","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","45degree","50%","brand-Apple","bundle-addition","crashguard","device-iphone XS Max","discountable-item","dropdownDevice-Apple iPhone XS Max","member","quickbuy","refresh-2023","reseller","reseller-asus","reseller-crashguard-nx","Top50"],"price":60000,"price_min":60000,"price_max":60000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":12499206340707,"title":"黑色","option1":"黑色","option2":null,"option3":null,"sku":"CGN0108624","requires_shipping":true,"taxable":true,"featured_image":{"id":3886229192803,"product_id":1424439607395,"position":3,"created_at":"2018-09-07T17:27:54+08:00","updated_at":"2021-09-02T17:21:04+08:00","alt":null,"width":1500,"height":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464","variant_ids":[12499206340707]},"available":true,"name":"iPhone XS Max Mod NX - 邊框 - 黑色","public_title":"黑色","options":["黑色"],"price":60000,"weight":100,"compare_at_price":null,"inventory_quantity":-4448,"inventory_management":null,"inventory_policy":"continue","barcode":"4710227231540","featured_media":{"alt":null,"id":948246118499,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/016e1a445f0b751bfbc94868c169e32b_6a1acbd5-31e6-44f2-82ef-b111523ee3e2.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/359e3405eae85c772cf26dec24d300ba_054b4fed-9d42-495e-a9c3-c165a6bb6454.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/24f1c3a32e15a61b74acfd6d27e74693_b4f02d49-ffec-4766-9833-3a7fb37ad097.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/1bd0d722fef6418b9e501b7f9c63dff4_164a6ece-f3b4-46fb-a198-2460df8c6df3.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max_Space_Gray_-CrashGuardNX-Combined-Camo_Green-Frame.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max_Space_Gray_-CrashGuardNX-Combined-Platinum_Gray-Frame.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max-Dark_Teal-Bumper-XS_Max-Dark_Teal-Rim-XS_Max-Dark_Teal-Button_a9803685-2ac6-4d06-8560-2f0c3aee66e9.png?v=1630574464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/xsmax_phone-NPB01086J5T-Bumper-iphone-xs-max-mod-nx-rim-Navy_Blue.png?v=1636424421"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/016e1a445f0b751bfbc94868c169e32b_6a1acbd5-31e6-44f2-82ef-b111523ee3e2.png?v=1630574464","options":["Color"],"media":[{"alt":null,"id":948245954659,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/016e1a445f0b751bfbc94868c169e32b_6a1acbd5-31e6-44f2-82ef-b111523ee3e2.png?v=1630574464"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/016e1a445f0b751bfbc94868c169e32b_6a1acbd5-31e6-44f2-82ef-b111523ee3e2.png?v=1630574464","width":1500},{"alt":null,"id":948245332067,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/359e3405eae85c772cf26dec24d300ba_054b4fed-9d42-495e-a9c3-c165a6bb6454.png?v=1630574464"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/359e3405eae85c772cf26dec24d300ba_054b4fed-9d42-495e-a9c3-c165a6bb6454.png?v=1630574464","width":1500},{"alt":null,"id":948246118499,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464","width":1500},{"alt":null,"id":948246249571,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/24f1c3a32e15a61b74acfd6d27e74693_b4f02d49-ffec-4766-9833-3a7fb37ad097.png?v=1630574464"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/24f1c3a32e15a61b74acfd6d27e74693_b4f02d49-ffec-4766-9833-3a7fb37ad097.png?v=1630574464","width":1500},{"alt":null,"id":948245168227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/1bd0d722fef6418b9e501b7f9c63dff4_164a6ece-f3b4-46fb-a198-2460df8c6df3.png?v=1630574464"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/1bd0d722fef6418b9e501b7f9c63dff4_164a6ece-f3b4-46fb-a198-2460df8c6df3.png?v=1630574464","width":1500},{"alt":null,"id":1423545335907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":3000,"width":3000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max_Space_Gray_-CrashGuardNX-Combined-Camo_Green-Frame.png?v=1630574464"},"aspect_ratio":1.0,"height":3000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max_Space_Gray_-CrashGuardNX-Combined-Camo_Green-Frame.png?v=1630574464","width":3000},{"alt":null,"id":1423545368675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":3000,"width":3000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max_Space_Gray_-CrashGuardNX-Combined-Platinum_Gray-Frame.png?v=1630574464"},"aspect_ratio":1.0,"height":3000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max_Space_Gray_-CrashGuardNX-Combined-Platinum_Gray-Frame.png?v=1630574464","width":3000},{"alt":null,"id":20821810151523,"position":8,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max-Dark_Teal-Bumper-XS_Max-Dark_Teal-Rim-XS_Max-Dark_Teal-Button_a9803685-2ac6-4d06-8560-2f0c3aee66e9.png?v=1630574464"},"aspect_ratio":1.333,"height":1500,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/XS_Max-Dark_Teal-Bumper-XS_Max-Dark_Teal-Rim-XS_Max-Dark_Teal-Button_a9803685-2ac6-4d06-8560-2f0c3aee66e9.png?v=1630574464","width":1999},{"alt":null,"id":20980611219555,"position":9,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/xsmax_phone-NPB01086J5T-Bumper-iphone-xs-max-mod-nx-rim-Navy_Blue.png?v=1636424421"},"aspect_ratio":1.333,"height":1500,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/xsmax_phone-NPB01086J5T-Bumper-iphone-xs-max-mod-nx-rim-Navy_Blue.png?v=1636424421","width":1999}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cmeta charset=\"utf-8\"\u003e\u003cmeta charset=\"utf-8\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cspan style=\"color: #ff0000;\" data-mce-style=\"color: #ff0000;\"\u003e\u003cspan\u003e1、CrashGuard NX與ModNX的飾條、按鈕皆可共用。\u003c\/span\u003e\u003c\/span\u003e\u003c\/strong\u003e\u003cbr\u003e\u003cspan style=\"color: #ff0000;\" data-mce-style=\"color: #ff0000;\"\u003e\u003cstrong\u003e2、未附背板,\u003c\/strong\u003e\u003c\/span\u003e\u003cspan style=\"color: #ff0000;\" data-mce-style=\"color: #ff0000;\"\u003e\u003cstrong\u003e若需透明背板搭配,請選購ModNX系列。\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cspan style=\"color: #ff0000;\"\u003e\u003cimg src=\"\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/files\/unnamed_large.png?v=1535958095\" alt=\"\" width=\"572\" height=\"356\"\u003e\u003c\/span\u003e\u003c\/strong\u003e\u003c\/p\u003e"}; $isMerge = null; $variants = [{"id":12499206340707,"title":"黑色","option1":"黑色","option2":null,"option3":null,"sku":"CGN0108624","requires_shipping":true,"taxable":true,"featured_image":{"id":3886229192803,"product_id":1424439607395,"position":3,"created_at":"2018-09-07T17:27:54+08:00","updated_at":"2021-09-02T17:21:04+08:00","alt":null,"width":1500,"height":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464","variant_ids":[12499206340707]},"available":true,"name":"iPhone XS Max Mod NX - 邊框 - 黑色","public_title":"黑色","options":["黑色"],"price":60000,"weight":100,"compare_at_price":null,"inventory_quantity":-4448,"inventory_management":null,"inventory_policy":"continue","barcode":"4710227231540","featured_media":{"alt":null,"id":948246118499,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":12499206340707,"title":"黑色","option1":"黑色","option2":null,"option3":null,"sku":"CGN0108624","requires_shipping":true,"taxable":true,"featured_image":{"id":3886229192803,"product_id":1424439607395,"position":3,"created_at":"2018-09-07T17:27:54+08:00","updated_at":"2021-09-02T17:21:04+08:00","alt":null,"width":1500,"height":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464","variant_ids":[12499206340707]},"available":true,"name":"iPhone XS Max Mod NX - 邊框 - 黑色","public_title":"黑色","options":["黑色"],"price":60000,"weight":100,"compare_at_price":null,"inventory_quantity":-4448,"inventory_management":null,"inventory_policy":"continue","barcode":"4710227231540","featured_media":{"alt":null,"id":948246118499,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/094f8605f8cc14b2756129c276432086_21dfaa10-6452-40c3-af32-057fc27369b3.png?v=1630574464"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (mergedImg) { $('.merged-img').attr('src', mergedImg); }); }); }; var sellingStatusData window.fetchSellingStatus().then(data => { try { sellingStatusData = data; } catch (error) { sellingStatusData = null console.error('Unable to parse selling status', error) } $(document).ready(function() { handleSellingStatus($defaultVariant.sku); }); }) function handleSellingStatus(currentSku) { if (!sellingStatusData) { console.error('No selling status available!') return } const sellingStatusElement = document.getElementById('selling-status') const addToCartButton = document.getElementById('AddToCart-product-template') const currentProductSku = currentSku.replace(/-(.*)$/, '-') if ($variants) { const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder] const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku) if (matchSellingStatusProduct.length > 0) { const isProductPending = matchSellingStatusProduct[0].status === 'pending' const matchDate = matchSellingStatusProduct[0].date sellingStatus = isProductPending ? "缺貨中" : "預購完成出貨日:" + matchDate sellingStatusElement.textContent = sellingStatus if (sellingStatus.includes("缺貨中")){ addToCartButton.disabled ='true'; addToCartButton.textContent = "缺貨中無法加入購物車" } else { addToCartButton.textContent = "加到購物車" } } else { sellingStatusElement.textContent = '' addToCartButton.textContent = "加到購物車" }; }; }; document.addEventListener('DOMContentLoaded', function () { var currentVariantSelect = document.getElementById('SingleOptionSelector-0') currentVariantSelect.addEventListener('change', function() { var currentSku = $('#current_sku').text() var skuElement = document.getElementById('current-sku') skuElement.textContent = currentSku handleSellingStatus(currentSku) }); });
// Override default values of shop.strings for each template. // Alternate product templates can change values of // add to cart button, sold out, and unavailable states here. theme.productStrings = { addToCart: "加到購物車", soldOut: "售完", unavailable: "停產" }