$product = {"id":7411379503203,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 人在做 峇里島在看","handle":"iphone-14-plus-mod-nx-magsafe-printable-af06","description":null,"published_at":"2024-06-11T17:43:22+08:00","created_at":"2024-05-05T00:18:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41898145611875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31480275730531,"product_id":7411379503203,"position":1,"created_at":"2024-05-05T00:18:28+08:00","updated_at":"2024-05-05T00:18:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508","variant_ids":[41898145611875]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 人在做 峇里島在看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-AF06","featured_media":{"alt":null,"id":23885527056483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cba92e808d6a852e735faa823206ad2da4e90455_c3825b58-32d4-4c32-9b3b-800b413e5965.webp?v=1714839511","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688d9fded3464ed42bce76e8ab77699a6b8e29d1_31dcd186-c0cf-413e-b4f3-03ed9d6adc26.webp?v=1714839513","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d3acd61af0926be008d8f33261ba9e648cb1e69_4bee9df0-9c40-4c53-b5ff-a54dd241cc73.webp?v=1714839515","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16e0bf0a1918cc8a54cc780dd32b6774cc9182a_ea2f4db6-26bc-4bfc-b904-d7ac3eb3475c.webp?v=1714839518","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bca4c9b3706b4919e649480a66644015021d478_d0cc8929-210d-40e7-96be-864c87b67387.webp?v=1714839520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b0e23edd0ac59913515b5a0a0c6dc635875556f_6aa9c46f-17d2-4d89-ba2a-dcc2346c495c.webp?v=1714839523","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd3dd5ce351d20a340021accd97d313125eb1d78_9e75947f-0c4a-43f4-8d15-2ead5eb24a81.webp?v=1714839525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a200283026540b167bf1f0acc74b67580a3b59f6_d01aefb8-d897-4f1c-a028-74da15710b14.webp?v=1714839527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc71028d642f39ddff3b4392944c214e38830d08_3bcc7cf5-a9e5-4ce9-b171-f66465da965a.webp?v=1714839530"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508","options":["color"],"media":[{"alt":null,"id":23885527056483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508","width":2000},{"alt":null,"id":23885527646307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cba92e808d6a852e735faa823206ad2da4e90455_c3825b58-32d4-4c32-9b3b-800b413e5965.webp?v=1714839511"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cba92e808d6a852e735faa823206ad2da4e90455_c3825b58-32d4-4c32-9b3b-800b413e5965.webp?v=1714839511","width":2000},{"alt":null,"id":23885528137827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688d9fded3464ed42bce76e8ab77699a6b8e29d1_31dcd186-c0cf-413e-b4f3-03ed9d6adc26.webp?v=1714839513"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688d9fded3464ed42bce76e8ab77699a6b8e29d1_31dcd186-c0cf-413e-b4f3-03ed9d6adc26.webp?v=1714839513","width":2000},{"alt":null,"id":23885529219171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d3acd61af0926be008d8f33261ba9e648cb1e69_4bee9df0-9c40-4c53-b5ff-a54dd241cc73.webp?v=1714839515"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d3acd61af0926be008d8f33261ba9e648cb1e69_4bee9df0-9c40-4c53-b5ff-a54dd241cc73.webp?v=1714839515","width":2000},{"alt":null,"id":23885529776227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16e0bf0a1918cc8a54cc780dd32b6774cc9182a_ea2f4db6-26bc-4bfc-b904-d7ac3eb3475c.webp?v=1714839518"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16e0bf0a1918cc8a54cc780dd32b6774cc9182a_ea2f4db6-26bc-4bfc-b904-d7ac3eb3475c.webp?v=1714839518","width":2000},{"alt":null,"id":23885530234979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bca4c9b3706b4919e649480a66644015021d478_d0cc8929-210d-40e7-96be-864c87b67387.webp?v=1714839520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bca4c9b3706b4919e649480a66644015021d478_d0cc8929-210d-40e7-96be-864c87b67387.webp?v=1714839520","width":2000},{"alt":null,"id":23885530857571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b0e23edd0ac59913515b5a0a0c6dc635875556f_6aa9c46f-17d2-4d89-ba2a-dcc2346c495c.webp?v=1714839523"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b0e23edd0ac59913515b5a0a0c6dc635875556f_6aa9c46f-17d2-4d89-ba2a-dcc2346c495c.webp?v=1714839523","width":2000},{"alt":null,"id":23885531349091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd3dd5ce351d20a340021accd97d313125eb1d78_9e75947f-0c4a-43f4-8d15-2ead5eb24a81.webp?v=1714839525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd3dd5ce351d20a340021accd97d313125eb1d78_9e75947f-0c4a-43f4-8d15-2ead5eb24a81.webp?v=1714839525","width":2000},{"alt":null,"id":23885532233827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a200283026540b167bf1f0acc74b67580a3b59f6_d01aefb8-d897-4f1c-a028-74da15710b14.webp?v=1714839527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a200283026540b167bf1f0acc74b67580a3b59f6_d01aefb8-d897-4f1c-a028-74da15710b14.webp?v=1714839527","width":2000},{"alt":null,"id":23885532627043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc71028d642f39ddff3b4392944c214e38830d08_3bcc7cf5-a9e5-4ce9-b171-f66465da965a.webp?v=1714839530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc71028d642f39ddff3b4392944c214e38830d08_3bcc7cf5-a9e5-4ce9-b171-f66465da965a.webp?v=1714839530","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41898145611875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31480275730531,"product_id":7411379503203,"position":1,"created_at":"2024-05-05T00:18:28+08:00","updated_at":"2024-05-05T00:18:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508","variant_ids":[41898145611875]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 人在做 峇里島在看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-AF06","featured_media":{"alt":null,"id":23885527056483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41898145611875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31480275730531,"product_id":7411379503203,"position":1,"created_at":"2024-05-05T00:18:28+08:00","updated_at":"2024-05-05T00:18:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508","variant_ids":[41898145611875]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 人在做 峇里島在看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-AF06","featured_media":{"alt":null,"id":23885527056483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95e3ed1208bf0825583f7c1d503249fa63743bdd_2b8d3c64-faf0-4689-992c-72698b552691.webp?v=1714839508"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(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: "停產" }