$product = {"id":7407659712611,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號","handle":"iphone-14-plus-mod-nx-printable-pb67","description":null,"published_at":"2024-06-11T16:21:39+08:00","created_at":"2024-05-03T10:38:33+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41877313618019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31470172438627,"product_id":7407659712611,"position":7,"created_at":"2024-05-03T10:38:52+08:00","updated_at":"2024-05-03T10:38:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932","variant_ids":[41877313618019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0126124-PB67","featured_media":{"alt":null,"id":23875075342435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/081c923eac91a8681020599ac645cb3cfecd4602_fac55f6a-06d4-406e-acf0-9fb3cd04d19d.webp?v=1714703916","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09f3a0abc91a171e802365747661e08305faba9c_a2574a02-b459-401b-841d-97a807de5964.webp?v=1714703918","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c01e48c06c4f9db1ada33e61c2698fdd00daa7af_fa4ef851-a2ed-49ab-b33f-cc1ee00c3582.webp?v=1714703921","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9b2a6b152da410335a3a7f1e72cd631e36393_f09633d9-0c49-42a6-8033-a71a9102f050.webp?v=1714703923","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0509f7950bff373ebc5e3b6d4449f184f85a2f2a_a61f2e13-0a0a-4ea9-8dcb-f5403da1666d.webp?v=1714703926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb59b0fdf358cc1f2055429429c5df76d44e251_683d51b9-1f29-4c2c-b646-99c3822187b1.webp?v=1714703929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cf7dae13757b23cd94b6010d4bae14e83aa8d75_1989c131-0be0-48ff-826d-5d745f36eed1.webp?v=1714703935","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65cfb4dcabedd945306e4323761eeba630d701b_ad71e9e2-7208-4cd1-9e1b-688df59e47a0.webp?v=1714703938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67186c8a4454cf8f4cc28b529a71e17aeaa29dc7_8bc69c15-cb17-49d9-8380-f4b4d60309bd.webp?v=1714703940"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/081c923eac91a8681020599ac645cb3cfecd4602_fac55f6a-06d4-406e-acf0-9fb3cd04d19d.webp?v=1714703916","options":["color"],"media":[{"alt":null,"id":23875071443043,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/081c923eac91a8681020599ac645cb3cfecd4602_fac55f6a-06d4-406e-acf0-9fb3cd04d19d.webp?v=1714703916"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/081c923eac91a8681020599ac645cb3cfecd4602_fac55f6a-06d4-406e-acf0-9fb3cd04d19d.webp?v=1714703916","width":2000},{"alt":null,"id":23875072262243,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09f3a0abc91a171e802365747661e08305faba9c_a2574a02-b459-401b-841d-97a807de5964.webp?v=1714703918"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09f3a0abc91a171e802365747661e08305faba9c_a2574a02-b459-401b-841d-97a807de5964.webp?v=1714703918","width":2000},{"alt":null,"id":23875072753763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c01e48c06c4f9db1ada33e61c2698fdd00daa7af_fa4ef851-a2ed-49ab-b33f-cc1ee00c3582.webp?v=1714703921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c01e48c06c4f9db1ada33e61c2698fdd00daa7af_fa4ef851-a2ed-49ab-b33f-cc1ee00c3582.webp?v=1714703921","width":2000},{"alt":null,"id":23875073310819,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9b2a6b152da410335a3a7f1e72cd631e36393_f09633d9-0c49-42a6-8033-a71a9102f050.webp?v=1714703923"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9b2a6b152da410335a3a7f1e72cd631e36393_f09633d9-0c49-42a6-8033-a71a9102f050.webp?v=1714703923","width":2000},{"alt":null,"id":23875073966179,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0509f7950bff373ebc5e3b6d4449f184f85a2f2a_a61f2e13-0a0a-4ea9-8dcb-f5403da1666d.webp?v=1714703926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0509f7950bff373ebc5e3b6d4449f184f85a2f2a_a61f2e13-0a0a-4ea9-8dcb-f5403da1666d.webp?v=1714703926","width":2000},{"alt":null,"id":23875074687075,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb59b0fdf358cc1f2055429429c5df76d44e251_683d51b9-1f29-4c2c-b646-99c3822187b1.webp?v=1714703929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb59b0fdf358cc1f2055429429c5df76d44e251_683d51b9-1f29-4c2c-b646-99c3822187b1.webp?v=1714703929","width":2000},{"alt":null,"id":23875075342435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932","width":2000},{"alt":null,"id":23875075932259,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cf7dae13757b23cd94b6010d4bae14e83aa8d75_1989c131-0be0-48ff-826d-5d745f36eed1.webp?v=1714703935"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cf7dae13757b23cd94b6010d4bae14e83aa8d75_1989c131-0be0-48ff-826d-5d745f36eed1.webp?v=1714703935","width":2000},{"alt":null,"id":23875076554851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65cfb4dcabedd945306e4323761eeba630d701b_ad71e9e2-7208-4cd1-9e1b-688df59e47a0.webp?v=1714703938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65cfb4dcabedd945306e4323761eeba630d701b_ad71e9e2-7208-4cd1-9e1b-688df59e47a0.webp?v=1714703938","width":2000},{"alt":null,"id":23875077111907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67186c8a4454cf8f4cc28b529a71e17aeaa29dc7_8bc69c15-cb17-49d9-8380-f4b4d60309bd.webp?v=1714703940"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67186c8a4454cf8f4cc28b529a71e17aeaa29dc7_8bc69c15-cb17-49d9-8380-f4b4d60309bd.webp?v=1714703940","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41877313618019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31470172438627,"product_id":7407659712611,"position":7,"created_at":"2024-05-03T10:38:52+08:00","updated_at":"2024-05-03T10:38:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932","variant_ids":[41877313618019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0126124-PB67","featured_media":{"alt":null,"id":23875075342435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877313618019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31470172438627,"product_id":7407659712611,"position":7,"created_at":"2024-05-03T10:38:52+08:00","updated_at":"2024-05-03T10:38:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932","variant_ids":[41877313618019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0126124-PB67","featured_media":{"alt":null,"id":23875075342435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/299edf5b8184bc077cdd962cfa2ebb4d3fa36b0f_6326eaa8-2a44-46b2-9d2b-470832102992.webp?v=1714703932"}},"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: "停產" }