$product = {"id":7411465486435,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 夜空星語","handle":"iphone-14-plus-mod-nx-magsafe-printable-yb12","description":null,"published_at":"2024-06-11T17:45:45+08:00","created_at":"2024-05-05T00:35:05+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","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":41899206410339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31480490623075,"product_id":7411465486435,"position":8,"created_at":"2024-05-05T00:35:19+08:00","updated_at":"2024-05-05T00:35:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519","variant_ids":[41899206410339]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 夜空星語 - 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-YB12","featured_media":{"alt":null,"id":23885742506083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ec9f5e6192fb8f1f1668ecf4ad729944248591_484d3728-b363-482a-a7f3-b508da7e7bcf.webp?v=1714840507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf3cf5bc5f43b384685ca0304ec0e3b63f47842b_a3d3621c-007e-4c34-bbe0-0d95c5e66dca.webp?v=1714840508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/693dba83df61f40203ee39b5bf6b067aff82c027_a622872c-fc07-49d6-b534-9e318fd3f5e3.webp?v=1714840510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4032da670e65fd9aaadee3d23e4c588f0e41873e_9bee263c-4df5-4ebd-ac9d-d2f755d06be4.webp?v=1714840512","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a658f53192fab0c2061ec7bc45388e25e885e06_5137a046-4803-4a1e-9fe9-4d4539b359f5.webp?v=1714840514","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cbcc72a5b3e4ffa80ffa732badb81bfdf24036f_11e06265-e562-40fc-8ac9-0e3c4e194a2c.webp?v=1714840515","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f6db25d4a79afc68199f87d99e252e1cdfe3d44_45f2b49b-8ed0-42f8-a3aa-980e1efc9257.webp?v=1714840517","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6354f5da2c662b01b1b13d8670764885700b4347_1491ef67-175b-494e-a01a-caaa6e59ed79.webp?v=1714840521","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8dbb9ae04ee36bd8e7f443e6443c799652ea776_40ff8e12-4b51-44e6-b0b0-fff131bcfae2.webp?v=1714840523"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ec9f5e6192fb8f1f1668ecf4ad729944248591_484d3728-b363-482a-a7f3-b508da7e7bcf.webp?v=1714840507","options":["color"],"media":[{"alt":null,"id":23885740441699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ec9f5e6192fb8f1f1668ecf4ad729944248591_484d3728-b363-482a-a7f3-b508da7e7bcf.webp?v=1714840507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ec9f5e6192fb8f1f1668ecf4ad729944248591_484d3728-b363-482a-a7f3-b508da7e7bcf.webp?v=1714840507","width":2000},{"alt":null,"id":23885740802147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf3cf5bc5f43b384685ca0304ec0e3b63f47842b_a3d3621c-007e-4c34-bbe0-0d95c5e66dca.webp?v=1714840508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf3cf5bc5f43b384685ca0304ec0e3b63f47842b_a3d3621c-007e-4c34-bbe0-0d95c5e66dca.webp?v=1714840508","width":2000},{"alt":null,"id":23885741162595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/693dba83df61f40203ee39b5bf6b067aff82c027_a622872c-fc07-49d6-b534-9e318fd3f5e3.webp?v=1714840510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/693dba83df61f40203ee39b5bf6b067aff82c027_a622872c-fc07-49d6-b534-9e318fd3f5e3.webp?v=1714840510","width":2000},{"alt":null,"id":23885741523043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4032da670e65fd9aaadee3d23e4c588f0e41873e_9bee263c-4df5-4ebd-ac9d-d2f755d06be4.webp?v=1714840512"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4032da670e65fd9aaadee3d23e4c588f0e41873e_9bee263c-4df5-4ebd-ac9d-d2f755d06be4.webp?v=1714840512","width":2000},{"alt":null,"id":23885741752419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a658f53192fab0c2061ec7bc45388e25e885e06_5137a046-4803-4a1e-9fe9-4d4539b359f5.webp?v=1714840514"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a658f53192fab0c2061ec7bc45388e25e885e06_5137a046-4803-4a1e-9fe9-4d4539b359f5.webp?v=1714840514","width":2000},{"alt":null,"id":23885742014563,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cbcc72a5b3e4ffa80ffa732badb81bfdf24036f_11e06265-e562-40fc-8ac9-0e3c4e194a2c.webp?v=1714840515"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cbcc72a5b3e4ffa80ffa732badb81bfdf24036f_11e06265-e562-40fc-8ac9-0e3c4e194a2c.webp?v=1714840515","width":2000},{"alt":null,"id":23885742243939,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f6db25d4a79afc68199f87d99e252e1cdfe3d44_45f2b49b-8ed0-42f8-a3aa-980e1efc9257.webp?v=1714840517"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f6db25d4a79afc68199f87d99e252e1cdfe3d44_45f2b49b-8ed0-42f8-a3aa-980e1efc9257.webp?v=1714840517","width":2000},{"alt":null,"id":23885742506083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519","width":2000},{"alt":null,"id":23885742571619,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6354f5da2c662b01b1b13d8670764885700b4347_1491ef67-175b-494e-a01a-caaa6e59ed79.webp?v=1714840521"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6354f5da2c662b01b1b13d8670764885700b4347_1491ef67-175b-494e-a01a-caaa6e59ed79.webp?v=1714840521","width":2000},{"alt":null,"id":23885742899299,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8dbb9ae04ee36bd8e7f443e6443c799652ea776_40ff8e12-4b51-44e6-b0b0-fff131bcfae2.webp?v=1714840523"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8dbb9ae04ee36bd8e7f443e6443c799652ea776_40ff8e12-4b51-44e6-b0b0-fff131bcfae2.webp?v=1714840523","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41899206410339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31480490623075,"product_id":7411465486435,"position":8,"created_at":"2024-05-05T00:35:19+08:00","updated_at":"2024-05-05T00:35:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519","variant_ids":[41899206410339]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 夜空星語 - 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-YB12","featured_media":{"alt":null,"id":23885742506083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41899206410339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31480490623075,"product_id":7411465486435,"position":8,"created_at":"2024-05-05T00:35:19+08:00","updated_at":"2024-05-05T00:35:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519","variant_ids":[41899206410339]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 夜空星語 - 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-YB12","featured_media":{"alt":null,"id":23885742506083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510ff88bb4ab502da8ed69fe7d4d9112ca892ad1_e13109bf-e97b-4c0e-ac6e-841d54a2b404.webp?v=1714840519"}},"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: "停產" }