$product = {"id":7416370462819,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - G本款","handle":"iphone-8-mod-nx-printable-iv07","description":null,"published_at":"2024-06-11T16:57:12+08:00","created_at":"2024-05-06T14:43:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41919002312803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31491963617379,"product_id":7416370462819,"position":7,"created_at":"2024-05-06T14:44:08+08:00","updated_at":"2024-05-06T14:44:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848","variant_ids":[41919002312803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - G本款 - 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":"NPB0105424-IV07","featured_media":{"alt":null,"id":23897376817251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b1322ce5d75010f6300f95f677b9a39011d1f0e_81e316b9-16ac-48ce-ba1e-c0d3d12f9020.webp?v=1714977834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef0a04c2cdebed251acdbe45adb45166ded92dd_5e10367a-1908-4443-84ac-851af489ea9c.webp?v=1714977836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0caa3375678152e6b89587edc27225685fa67963_5735061e-a625-42cc-ab39-0f6c5140be1d.webp?v=1714977839","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffea1d887b1332bc2a9778c05a365d82269c5199_8072b6f7-ab12-462a-84af-423ca0089a00.webp?v=1714977841","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90d3087afe16b032f1ebe8306446ec01177730ff_eb5f0e01-6273-4bb7-85c3-197bcddf8c91.webp?v=1714977843","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76b9012aa73ab0e2675e9affd0ce11d49c47906f_1ac2d5a2-cd00-435d-af14-257dcaa4a4ca.webp?v=1714977846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91d5bf0c060a93398bfabfe6d5fd3daf97ae7072_47ae9e8e-0e8e-4933-b182-b910535c8b1e.webp?v=1714977851","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fd195975f26c8964cc996d1aa574843be6f1287_cb7b9f38-19f8-444a-a102-866cfa605264.webp?v=1714977855"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b1322ce5d75010f6300f95f677b9a39011d1f0e_81e316b9-16ac-48ce-ba1e-c0d3d12f9020.webp?v=1714977834","options":["color"],"media":[{"alt":null,"id":23897373474915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b1322ce5d75010f6300f95f677b9a39011d1f0e_81e316b9-16ac-48ce-ba1e-c0d3d12f9020.webp?v=1714977834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b1322ce5d75010f6300f95f677b9a39011d1f0e_81e316b9-16ac-48ce-ba1e-c0d3d12f9020.webp?v=1714977834","width":2000},{"alt":null,"id":23897374261347,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef0a04c2cdebed251acdbe45adb45166ded92dd_5e10367a-1908-4443-84ac-851af489ea9c.webp?v=1714977836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aef0a04c2cdebed251acdbe45adb45166ded92dd_5e10367a-1908-4443-84ac-851af489ea9c.webp?v=1714977836","width":2000},{"alt":null,"id":23897374720099,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0caa3375678152e6b89587edc27225685fa67963_5735061e-a625-42cc-ab39-0f6c5140be1d.webp?v=1714977839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0caa3375678152e6b89587edc27225685fa67963_5735061e-a625-42cc-ab39-0f6c5140be1d.webp?v=1714977839","width":2000},{"alt":null,"id":23897375244387,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffea1d887b1332bc2a9778c05a365d82269c5199_8072b6f7-ab12-462a-84af-423ca0089a00.webp?v=1714977841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffea1d887b1332bc2a9778c05a365d82269c5199_8072b6f7-ab12-462a-84af-423ca0089a00.webp?v=1714977841","width":2000},{"alt":null,"id":23897375637603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90d3087afe16b032f1ebe8306446ec01177730ff_eb5f0e01-6273-4bb7-85c3-197bcddf8c91.webp?v=1714977843"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90d3087afe16b032f1ebe8306446ec01177730ff_eb5f0e01-6273-4bb7-85c3-197bcddf8c91.webp?v=1714977843","width":2000},{"alt":null,"id":23897376391267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76b9012aa73ab0e2675e9affd0ce11d49c47906f_1ac2d5a2-cd00-435d-af14-257dcaa4a4ca.webp?v=1714977846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76b9012aa73ab0e2675e9affd0ce11d49c47906f_1ac2d5a2-cd00-435d-af14-257dcaa4a4ca.webp?v=1714977846","width":2000},{"alt":null,"id":23897376817251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848","width":2000},{"alt":null,"id":23897377308771,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91d5bf0c060a93398bfabfe6d5fd3daf97ae7072_47ae9e8e-0e8e-4933-b182-b910535c8b1e.webp?v=1714977851"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91d5bf0c060a93398bfabfe6d5fd3daf97ae7072_47ae9e8e-0e8e-4933-b182-b910535c8b1e.webp?v=1714977851","width":2000},{"alt":null,"id":23897378193507,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fd195975f26c8964cc996d1aa574843be6f1287_cb7b9f38-19f8-444a-a102-866cfa605264.webp?v=1714977855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fd195975f26c8964cc996d1aa574843be6f1287_cb7b9f38-19f8-444a-a102-866cfa605264.webp?v=1714977855","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919002312803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31491963617379,"product_id":7416370462819,"position":7,"created_at":"2024-05-06T14:44:08+08:00","updated_at":"2024-05-06T14:44:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848","variant_ids":[41919002312803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - G本款 - 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":"NPB0105424-IV07","featured_media":{"alt":null,"id":23897376817251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919002312803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31491963617379,"product_id":7416370462819,"position":7,"created_at":"2024-05-06T14:44:08+08:00","updated_at":"2024-05-06T14:44:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848","variant_ids":[41919002312803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - G本款 - 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":"NPB0105424-IV07","featured_media":{"alt":null,"id":23897376817251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d05712e15a2d4f26a16a2ac0601be053a308b4a_dce51b1a-e7e0-4d71-b508-3e2a1bd836e1.webp?v=1714977848"}},"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: "停產" }