$product = {"id":7415984521315,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 窯花","handle":"iphone-xs-max-mod-nx-printable-gd14","description":null,"published_at":"2024-06-11T16:49:38+08:00","created_at":"2024-05-06T12:36:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone XS Max","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-chi-po-lin-series","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":41916205564003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490905014371,"product_id":7415984521315,"position":1,"created_at":"2024-05-06T12:36:56+08:00","updated_at":"2024-05-06T12:36:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216","variant_ids":[41916205564003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 窯花 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-GD14","featured_media":{"alt":null,"id":23896312053859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7eb502d574e55049f0fceee071952787530f3ef_a71f4ade-24a7-40ee-af89-170f26cf9989.webp?v=1714970219","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bdfc233dfe38070903d9fe8b325ed10b8fcc1fa_03157423-7cce-43d9-9a01-bfdb7e83c70c.webp?v=1714970221","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab95248f2c8ed72b920aa47996b62fd4b50119d3_673df9e2-9058-4b50-9966-1244775797da.webp?v=1714970223","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d592e4f2a44d70c36f119141e5a40a031719d0_bd7aa7f3-5fc8-434e-b751-78dfa9655fc3.webp?v=1714970226","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/253a07c80b328f9a278dfb3d8843377a0b9f602b_009b35ff-2f35-46fe-99f1-28b38c2b5637.webp?v=1714970229","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f55fdd5b0a635e14b4b93eedc43db91afe90510_bd4a55ec-a37a-4ddd-9c52-26bfd28290cf.webp?v=1714970231","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318a5c3bab1ee6a34c38e05dd61bc6f39ffdb8c1_7316ef55-119c-4bba-a846-5b5e59f36dd5.webp?v=1714970234","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e95fe96938948f2f09ff32d92841106fee01e33e_dfc9666f-def9-4157-9d31-203af7cf01d8.webp?v=1714970236","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e959d4147697b24afb7b6c2305796282a5ed23c_8cbd6a4d-322c-40e5-9c0f-8554af2c6c22.webp?v=1714970238"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216","options":["color"],"media":[{"alt":null,"id":23896312053859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216","width":2000},{"alt":null,"id":23896312610915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7eb502d574e55049f0fceee071952787530f3ef_a71f4ade-24a7-40ee-af89-170f26cf9989.webp?v=1714970219"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7eb502d574e55049f0fceee071952787530f3ef_a71f4ade-24a7-40ee-af89-170f26cf9989.webp?v=1714970219","width":2000},{"alt":null,"id":23896313004131,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bdfc233dfe38070903d9fe8b325ed10b8fcc1fa_03157423-7cce-43d9-9a01-bfdb7e83c70c.webp?v=1714970221"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bdfc233dfe38070903d9fe8b325ed10b8fcc1fa_03157423-7cce-43d9-9a01-bfdb7e83c70c.webp?v=1714970221","width":2000},{"alt":null,"id":23896313593955,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab95248f2c8ed72b920aa47996b62fd4b50119d3_673df9e2-9058-4b50-9966-1244775797da.webp?v=1714970223"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab95248f2c8ed72b920aa47996b62fd4b50119d3_673df9e2-9058-4b50-9966-1244775797da.webp?v=1714970223","width":2000},{"alt":null,"id":23896314019939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d592e4f2a44d70c36f119141e5a40a031719d0_bd7aa7f3-5fc8-434e-b751-78dfa9655fc3.webp?v=1714970226"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d592e4f2a44d70c36f119141e5a40a031719d0_bd7aa7f3-5fc8-434e-b751-78dfa9655fc3.webp?v=1714970226","width":2000},{"alt":null,"id":23896314740835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/253a07c80b328f9a278dfb3d8843377a0b9f602b_009b35ff-2f35-46fe-99f1-28b38c2b5637.webp?v=1714970229"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/253a07c80b328f9a278dfb3d8843377a0b9f602b_009b35ff-2f35-46fe-99f1-28b38c2b5637.webp?v=1714970229","width":2000},{"alt":null,"id":23896315330659,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f55fdd5b0a635e14b4b93eedc43db91afe90510_bd4a55ec-a37a-4ddd-9c52-26bfd28290cf.webp?v=1714970231"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f55fdd5b0a635e14b4b93eedc43db91afe90510_bd4a55ec-a37a-4ddd-9c52-26bfd28290cf.webp?v=1714970231","width":2000},{"alt":null,"id":23896316280931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318a5c3bab1ee6a34c38e05dd61bc6f39ffdb8c1_7316ef55-119c-4bba-a846-5b5e59f36dd5.webp?v=1714970234"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318a5c3bab1ee6a34c38e05dd61bc6f39ffdb8c1_7316ef55-119c-4bba-a846-5b5e59f36dd5.webp?v=1714970234","width":2000},{"alt":null,"id":23896316739683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e95fe96938948f2f09ff32d92841106fee01e33e_dfc9666f-def9-4157-9d31-203af7cf01d8.webp?v=1714970236"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e95fe96938948f2f09ff32d92841106fee01e33e_dfc9666f-def9-4157-9d31-203af7cf01d8.webp?v=1714970236","width":2000},{"alt":null,"id":23896317624419,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e959d4147697b24afb7b6c2305796282a5ed23c_8cbd6a4d-322c-40e5-9c0f-8554af2c6c22.webp?v=1714970238"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e959d4147697b24afb7b6c2305796282a5ed23c_8cbd6a4d-322c-40e5-9c0f-8554af2c6c22.webp?v=1714970238","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916205564003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490905014371,"product_id":7415984521315,"position":1,"created_at":"2024-05-06T12:36:56+08:00","updated_at":"2024-05-06T12:36:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216","variant_ids":[41916205564003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 窯花 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-GD14","featured_media":{"alt":null,"id":23896312053859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916205564003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490905014371,"product_id":7415984521315,"position":1,"created_at":"2024-05-06T12:36:56+08:00","updated_at":"2024-05-06T12:36:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216","variant_ids":[41916205564003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 窯花 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-GD14","featured_media":{"alt":null,"id":23896312053859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/105a3d8a6b1bec3f2cbd10e6010d5f5cfc7c59b9_d35905ce-2ace-4c45-8fff-0a217a636256.webp?v=1714970216"}},"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: "停產" }