$product = {"id":7415893819491,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 史迪奇 - 貼紙系列-夏威夷舞蹈","handle":"iphone-xs-max-mod-nx-printable-yf07","description":null,"published_at":"2024-06-11T16:47:15+08:00","created_at":"2024-05-06T12:20:01+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41915276755043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490676064355,"product_id":7415893819491,"position":3,"created_at":"2024-05-06T12:20:09+08:00","updated_at":"2024-05-06T12:20:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209","variant_ids":[41915276755043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 史迪奇 - 貼紙系列-夏威夷舞蹈 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-YF07","featured_media":{"alt":null,"id":23896082743395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b966f06df06f143e4ddc5b28a5e9746b83b92ac_653b031c-7b09-4458-bad8-78a0b00032b2.webp?v=1714969204","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc742a245f6e2f563ff1751486128832984b3a03_7e3f3f71-1ea5-478c-af17-9d5671e35d2d.webp?v=1714969206","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b00cf47e324ae45916e3b8aaa0b7f476c507734_29f41fad-b139-48c9-9859-c60f02a6c3bd.webp?v=1714969211","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa51770ef13bc8886a9ed1c98f27d8391e96529_7aee7bab-77d9-47cc-a8ba-15f3440a3152.webp?v=1714969214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96c205f5c448fa60978c0b6be94d8833b7dcf6e3_385f9075-9d15-4eae-b089-a56d9de16488.webp?v=1714969216","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2680f1892dd2a6858292c9d3a591bcee5fa0eb_8735e752-2e0b-490d-9406-0cb48a086deb.webp?v=1714969219","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecc91a091dd7999db94414dc84bad08a8d884681_1464d0c5-0762-4673-9bf3-7f158fdd1b19.webp?v=1714969221","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91f4a758545462244849eb95582a210642d6fbb1_98412970-75e4-4039-ad85-8974773e7c57.webp?v=1714969224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f7142843c337c386fd8fe1ad6fae76dae108fe8_eda7728f-e1b8-46ae-bca9-1bedbcc9f81e.webp?v=1714969226"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b966f06df06f143e4ddc5b28a5e9746b83b92ac_653b031c-7b09-4458-bad8-78a0b00032b2.webp?v=1714969204","options":["color"],"media":[{"alt":null,"id":23896081825891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b966f06df06f143e4ddc5b28a5e9746b83b92ac_653b031c-7b09-4458-bad8-78a0b00032b2.webp?v=1714969204"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b966f06df06f143e4ddc5b28a5e9746b83b92ac_653b031c-7b09-4458-bad8-78a0b00032b2.webp?v=1714969204","width":2000},{"alt":null,"id":23896082350179,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc742a245f6e2f563ff1751486128832984b3a03_7e3f3f71-1ea5-478c-af17-9d5671e35d2d.webp?v=1714969206"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc742a245f6e2f563ff1751486128832984b3a03_7e3f3f71-1ea5-478c-af17-9d5671e35d2d.webp?v=1714969206","width":2000},{"alt":null,"id":23896082743395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209","width":2000},{"alt":null,"id":23896083103843,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b00cf47e324ae45916e3b8aaa0b7f476c507734_29f41fad-b139-48c9-9859-c60f02a6c3bd.webp?v=1714969211"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b00cf47e324ae45916e3b8aaa0b7f476c507734_29f41fad-b139-48c9-9859-c60f02a6c3bd.webp?v=1714969211","width":2000},{"alt":null,"id":23896083628131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa51770ef13bc8886a9ed1c98f27d8391e96529_7aee7bab-77d9-47cc-a8ba-15f3440a3152.webp?v=1714969214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa51770ef13bc8886a9ed1c98f27d8391e96529_7aee7bab-77d9-47cc-a8ba-15f3440a3152.webp?v=1714969214","width":2000},{"alt":null,"id":23896084021347,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96c205f5c448fa60978c0b6be94d8833b7dcf6e3_385f9075-9d15-4eae-b089-a56d9de16488.webp?v=1714969216"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96c205f5c448fa60978c0b6be94d8833b7dcf6e3_385f9075-9d15-4eae-b089-a56d9de16488.webp?v=1714969216","width":2000},{"alt":null,"id":23896084414563,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2680f1892dd2a6858292c9d3a591bcee5fa0eb_8735e752-2e0b-490d-9406-0cb48a086deb.webp?v=1714969219"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2680f1892dd2a6858292c9d3a591bcee5fa0eb_8735e752-2e0b-490d-9406-0cb48a086deb.webp?v=1714969219","width":2000},{"alt":null,"id":23896084873315,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecc91a091dd7999db94414dc84bad08a8d884681_1464d0c5-0762-4673-9bf3-7f158fdd1b19.webp?v=1714969221"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecc91a091dd7999db94414dc84bad08a8d884681_1464d0c5-0762-4673-9bf3-7f158fdd1b19.webp?v=1714969221","width":2000},{"alt":null,"id":23896085332067,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91f4a758545462244849eb95582a210642d6fbb1_98412970-75e4-4039-ad85-8974773e7c57.webp?v=1714969224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91f4a758545462244849eb95582a210642d6fbb1_98412970-75e4-4039-ad85-8974773e7c57.webp?v=1714969224","width":2000},{"alt":null,"id":23896085889123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f7142843c337c386fd8fe1ad6fae76dae108fe8_eda7728f-e1b8-46ae-bca9-1bedbcc9f81e.webp?v=1714969226"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f7142843c337c386fd8fe1ad6fae76dae108fe8_eda7728f-e1b8-46ae-bca9-1bedbcc9f81e.webp?v=1714969226","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915276755043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490676064355,"product_id":7415893819491,"position":3,"created_at":"2024-05-06T12:20:09+08:00","updated_at":"2024-05-06T12:20:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209","variant_ids":[41915276755043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 史迪奇 - 貼紙系列-夏威夷舞蹈 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-YF07","featured_media":{"alt":null,"id":23896082743395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915276755043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490676064355,"product_id":7415893819491,"position":3,"created_at":"2024-05-06T12:20:09+08:00","updated_at":"2024-05-06T12:20:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209","variant_ids":[41915276755043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 史迪奇 - 貼紙系列-夏威夷舞蹈 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-YF07","featured_media":{"alt":null,"id":23896082743395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2368878c78df1e2e4ed7c529e94eeb8648c177a7_49fb87c0-a20e-421a-a9ce-6764215b9927.webp?v=1714969209"}},"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: "停產" }