$product = {"id":7407852519523,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-溜溜球炫技-幽默系列","handle":"iphone-14-plus-mod-nx-printable-pc11","description":null,"published_at":"2024-06-11T16:24:38+08:00","created_at":"2024-05-03T11:02:40+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":41879643029603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31470534492259,"product_id":7407852519523,"position":10,"created_at":"2024-05-03T11:03:03+08:00","updated_at":"2024-05-03T11:03:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383","variant_ids":[41879643029603]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-溜溜球炫技-幽默系列 - 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-PC11","featured_media":{"alt":null,"id":23875438280803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb03a37438e7f96ed1c5f034a578e313d29317be_a863d885-b230-4645-ae29-0aaee9c069b9.webp?v=1714705362","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e72e7f2505a5c8dc1e93de34dc36bf57fa9f6a34_d2b64efc-6292-48ea-a257-f77eaffd6392.webp?v=1714705365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9318a969d83c8a783bdc67627cedb23a3ccdd4c1_2f19d9ce-4863-408d-8c82-7d6bf723eaa9.webp?v=1714705367","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29e3f0f8cfb94bc8e60deb2b136fd6c00f2d89be_62fb5175-9ae0-410a-9d9c-9efc51d44ebf.webp?v=1714705369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d043b7c03a8b52d6c039877637c06c82dc7a118_c1a54540-00e6-4ca8-8e55-b1c635fbb047.webp?v=1714705372","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a52fe4ab5b6c7c4d879e3517b6aca37a92162dd_b2ece510-0e7a-4445-b98a-b5b86bd6a6b7.webp?v=1714705374","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7496a47bd182837d72a8dd6d439212326cde66eb_10683275-a579-488f-9027-f38822f5b7ca.webp?v=1714705376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84385ba759a958cfefc400ae22ccb74736764770_5a615436-0208-4eed-afba-659536f32608.webp?v=1714705378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2aec49f627b1a0d7edf0f168c99339d4262ddf34_66447018-f171-4081-915f-45b3290a77a5.webp?v=1714705381","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb03a37438e7f96ed1c5f034a578e313d29317be_a863d885-b230-4645-ae29-0aaee9c069b9.webp?v=1714705362","options":["color"],"media":[{"alt":null,"id":23875428876387,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb03a37438e7f96ed1c5f034a578e313d29317be_a863d885-b230-4645-ae29-0aaee9c069b9.webp?v=1714705362"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb03a37438e7f96ed1c5f034a578e313d29317be_a863d885-b230-4645-ae29-0aaee9c069b9.webp?v=1714705362","width":2000},{"alt":null,"id":23875429171299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e72e7f2505a5c8dc1e93de34dc36bf57fa9f6a34_d2b64efc-6292-48ea-a257-f77eaffd6392.webp?v=1714705365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e72e7f2505a5c8dc1e93de34dc36bf57fa9f6a34_d2b64efc-6292-48ea-a257-f77eaffd6392.webp?v=1714705365","width":2000},{"alt":null,"id":23875429892195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9318a969d83c8a783bdc67627cedb23a3ccdd4c1_2f19d9ce-4863-408d-8c82-7d6bf723eaa9.webp?v=1714705367"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9318a969d83c8a783bdc67627cedb23a3ccdd4c1_2f19d9ce-4863-408d-8c82-7d6bf723eaa9.webp?v=1714705367","width":2000},{"alt":null,"id":23875431039075,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29e3f0f8cfb94bc8e60deb2b136fd6c00f2d89be_62fb5175-9ae0-410a-9d9c-9efc51d44ebf.webp?v=1714705369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29e3f0f8cfb94bc8e60deb2b136fd6c00f2d89be_62fb5175-9ae0-410a-9d9c-9efc51d44ebf.webp?v=1714705369","width":2000},{"alt":null,"id":23875432743011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d043b7c03a8b52d6c039877637c06c82dc7a118_c1a54540-00e6-4ca8-8e55-b1c635fbb047.webp?v=1714705372"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d043b7c03a8b52d6c039877637c06c82dc7a118_c1a54540-00e6-4ca8-8e55-b1c635fbb047.webp?v=1714705372","width":2000},{"alt":null,"id":23875433300067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a52fe4ab5b6c7c4d879e3517b6aca37a92162dd_b2ece510-0e7a-4445-b98a-b5b86bd6a6b7.webp?v=1714705374"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a52fe4ab5b6c7c4d879e3517b6aca37a92162dd_b2ece510-0e7a-4445-b98a-b5b86bd6a6b7.webp?v=1714705374","width":2000},{"alt":null,"id":23875434217571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7496a47bd182837d72a8dd6d439212326cde66eb_10683275-a579-488f-9027-f38822f5b7ca.webp?v=1714705376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7496a47bd182837d72a8dd6d439212326cde66eb_10683275-a579-488f-9027-f38822f5b7ca.webp?v=1714705376","width":2000},{"alt":null,"id":23875434840163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84385ba759a958cfefc400ae22ccb74736764770_5a615436-0208-4eed-afba-659536f32608.webp?v=1714705378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84385ba759a958cfefc400ae22ccb74736764770_5a615436-0208-4eed-afba-659536f32608.webp?v=1714705378","width":2000},{"alt":null,"id":23875435298915,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2aec49f627b1a0d7edf0f168c99339d4262ddf34_66447018-f171-4081-915f-45b3290a77a5.webp?v=1714705381"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2aec49f627b1a0d7edf0f168c99339d4262ddf34_66447018-f171-4081-915f-45b3290a77a5.webp?v=1714705381","width":2000},{"alt":null,"id":23875438280803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879643029603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31470534492259,"product_id":7407852519523,"position":10,"created_at":"2024-05-03T11:03:03+08:00","updated_at":"2024-05-03T11:03:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383","variant_ids":[41879643029603]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-溜溜球炫技-幽默系列 - 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-PC11","featured_media":{"alt":null,"id":23875438280803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879643029603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31470534492259,"product_id":7407852519523,"position":10,"created_at":"2024-05-03T11:03:03+08:00","updated_at":"2024-05-03T11:03:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383","variant_ids":[41879643029603]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-溜溜球炫技-幽默系列 - 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-PC11","featured_media":{"alt":null,"id":23875438280803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3e0bd3c8b671d93d693b35861d836eb12a30c0_3c7be87f-0e9b-4a11-8ffa-0c9f52395636.webp?v=1714705383"}},"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: "停產" }