$product = {"id":7416068997219,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-經典","handle":"iphone-xs-max-mod-nx-printable-pb23","description":null,"published_at":"2024-06-11T16:51:54+08:00","created_at":"2024-05-06T12:52:24+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 XS Max","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":41917111271523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31491134685283,"product_id":7416068997219,"position":1,"created_at":"2024-05-06T12:52:26+08:00","updated_at":"2024-05-06T12:52:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146","variant_ids":[41917111271523]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB23","featured_media":{"alt":null,"id":23896542117987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56fdda65c920b0233d9ffe99cca445bc218ffda8_bf1c1470-c207-44ef-8e24-f8fc352379c2.webp?v=1714971148","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f723dcc32294c9b1f8c64a62d66378d539b1f9d_75262056-38d1-40c9-a18a-a45be9aff118.webp?v=1714971151","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b37a7cecdc69941b8509dd4945b0ca2100e11a8a_2ead7c81-d288-4c55-b042-825372302ba0.webp?v=1714971153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/122d75931bc2af20f5bfcba032dd47f8f7339068_5b270596-d79e-4294-9c7d-653b50b32064.webp?v=1714971155","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9915cc3526a562007020ac17fe513ed3d9bb5a99_f9e4415c-c85c-4267-91bf-382f123bd349.webp?v=1714971158","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd28e901b4542f822eda854e468dee0c1d3d58e2_27e66500-2230-4b70-9b04-05ee3f91502f.webp?v=1714971160","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55835115d973b4f9230331f740e19187f4c1f8c2_4859f00c-05ff-4a4d-afdc-92edc77d6814.webp?v=1714971162","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9f615206f41f699ec91cee01c2d5baea5b39b23_72a6993c-16b2-4916-a5d1-795aa3487e3a.webp?v=1714971164","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b081814a6eeeacfc8e5c39003801eb583e3c3541_83ad3f17-ad61-4378-ae7b-0385a6ace924.webp?v=1714971167"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146","options":["color"],"media":[{"alt":null,"id":23896542117987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146","width":2000},{"alt":null,"id":23896542707811,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56fdda65c920b0233d9ffe99cca445bc218ffda8_bf1c1470-c207-44ef-8e24-f8fc352379c2.webp?v=1714971148"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56fdda65c920b0233d9ffe99cca445bc218ffda8_bf1c1470-c207-44ef-8e24-f8fc352379c2.webp?v=1714971148","width":2000},{"alt":null,"id":23896543133795,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f723dcc32294c9b1f8c64a62d66378d539b1f9d_75262056-38d1-40c9-a18a-a45be9aff118.webp?v=1714971151"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f723dcc32294c9b1f8c64a62d66378d539b1f9d_75262056-38d1-40c9-a18a-a45be9aff118.webp?v=1714971151","width":2000},{"alt":null,"id":23896543690851,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b37a7cecdc69941b8509dd4945b0ca2100e11a8a_2ead7c81-d288-4c55-b042-825372302ba0.webp?v=1714971153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b37a7cecdc69941b8509dd4945b0ca2100e11a8a_2ead7c81-d288-4c55-b042-825372302ba0.webp?v=1714971153","width":2000},{"alt":null,"id":23896544510051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/122d75931bc2af20f5bfcba032dd47f8f7339068_5b270596-d79e-4294-9c7d-653b50b32064.webp?v=1714971155"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/122d75931bc2af20f5bfcba032dd47f8f7339068_5b270596-d79e-4294-9c7d-653b50b32064.webp?v=1714971155","width":2000},{"alt":null,"id":23896545034339,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9915cc3526a562007020ac17fe513ed3d9bb5a99_f9e4415c-c85c-4267-91bf-382f123bd349.webp?v=1714971158"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9915cc3526a562007020ac17fe513ed3d9bb5a99_f9e4415c-c85c-4267-91bf-382f123bd349.webp?v=1714971158","width":2000},{"alt":null,"id":23896545525859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd28e901b4542f822eda854e468dee0c1d3d58e2_27e66500-2230-4b70-9b04-05ee3f91502f.webp?v=1714971160"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd28e901b4542f822eda854e468dee0c1d3d58e2_27e66500-2230-4b70-9b04-05ee3f91502f.webp?v=1714971160","width":2000},{"alt":null,"id":23896546476131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55835115d973b4f9230331f740e19187f4c1f8c2_4859f00c-05ff-4a4d-afdc-92edc77d6814.webp?v=1714971162"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55835115d973b4f9230331f740e19187f4c1f8c2_4859f00c-05ff-4a4d-afdc-92edc77d6814.webp?v=1714971162","width":2000},{"alt":null,"id":23896546967651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9f615206f41f699ec91cee01c2d5baea5b39b23_72a6993c-16b2-4916-a5d1-795aa3487e3a.webp?v=1714971164"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9f615206f41f699ec91cee01c2d5baea5b39b23_72a6993c-16b2-4916-a5d1-795aa3487e3a.webp?v=1714971164","width":2000},{"alt":null,"id":23896547623011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b081814a6eeeacfc8e5c39003801eb583e3c3541_83ad3f17-ad61-4378-ae7b-0385a6ace924.webp?v=1714971167"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b081814a6eeeacfc8e5c39003801eb583e3c3541_83ad3f17-ad61-4378-ae7b-0385a6ace924.webp?v=1714971167","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41917111271523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31491134685283,"product_id":7416068997219,"position":1,"created_at":"2024-05-06T12:52:26+08:00","updated_at":"2024-05-06T12:52:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146","variant_ids":[41917111271523]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB23","featured_media":{"alt":null,"id":23896542117987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917111271523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31491134685283,"product_id":7416068997219,"position":1,"created_at":"2024-05-06T12:52:26+08:00","updated_at":"2024-05-06T12:52:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146","variant_ids":[41917111271523]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB23","featured_media":{"alt":null,"id":23896542117987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712948439fe25840864c1a45baf28c06b8cbac91_5d180922-9abc-49c4-b1d2-0de5d09ca7d9.webp?v=1714971146"}},"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: "停產" }