$product = {"id":7408442343523,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 2-俠盜一號","handle":"iphone-12-mini-mod-nx-printable-pb69","description":null,"published_at":"2024-06-11T16:37:20+08:00","created_at":"2024-05-03T15:27:16+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 12 mini","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":41885530357859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB69","requires_shipping":true,"taxable":true,"featured_image":{"id":31472291741795,"product_id":7408442343523,"position":5,"created_at":"2024-05-03T15:27:30+08:00","updated_at":"2024-05-03T15:27:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250","variant_ids":[41885530357859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 2-俠盜一號 - 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":"NPB0118424-PB69","featured_media":{"alt":null,"id":23877208080483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a46eb7daae3dd6cda5ab3a52115953fb1d605ce_30347610-41c7-493b-968c-dc4ee1cc3c0b.webp?v=1714721239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a404fbfc9146baccc868647b80c1dc308cba51ef_c3d26ec0-162e-4f03-9b23-cc843c93bd06.webp?v=1714721242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/687fd07c0ba7bd0754ac578fcca40ade9448e3a9_c9d499cd-e0e3-4c64-aea9-22d18a8b4872.webp?v=1714721245","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ac5b32e28ddff929200a91faf5c35cabfef61f_6b5e7a41-8db4-45c1-9d9a-a10cfb8c0025.webp?v=1714721247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e77810fd06c4881158a900fc6c9cdde8026a3e1_c69d1442-e2e4-44cc-afce-ec29bf09d12e.webp?v=1714721253","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/332406e0fe02060a053aa979bdb76f55aa0509c0_7bb9472d-e72b-42ad-91a8-47f8d31d5832.webp?v=1714721256","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dac586b20cff910f7c4d3615986be55b813e70b_3380b9b7-5f66-4cab-994d-3758e70b57f2.webp?v=1714721258","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb5148b0808f29a990e2b9d31ab821089b9cd75d_f839d228-8639-4756-a9b4-8f9b67297cea.webp?v=1714721260","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8364e2d98d1575127d9a3c7d6d4eac0daa493cd4_e9265a32-b244-4248-b4e1-4d22c41df496.webp?v=1714721263","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e468d6be20281f94d21d08d9872ab41795fb91c_78a709f0-054b-44bf-a88f-ef60b16c6ad9.webp?v=1714721266"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a46eb7daae3dd6cda5ab3a52115953fb1d605ce_30347610-41c7-493b-968c-dc4ee1cc3c0b.webp?v=1714721239","options":["color"],"media":[{"alt":null,"id":23877206016099,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a46eb7daae3dd6cda5ab3a52115953fb1d605ce_30347610-41c7-493b-968c-dc4ee1cc3c0b.webp?v=1714721239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a46eb7daae3dd6cda5ab3a52115953fb1d605ce_30347610-41c7-493b-968c-dc4ee1cc3c0b.webp?v=1714721239","width":2000},{"alt":null,"id":23877206540387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a404fbfc9146baccc868647b80c1dc308cba51ef_c3d26ec0-162e-4f03-9b23-cc843c93bd06.webp?v=1714721242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a404fbfc9146baccc868647b80c1dc308cba51ef_c3d26ec0-162e-4f03-9b23-cc843c93bd06.webp?v=1714721242","width":2000},{"alt":null,"id":23877207064675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/687fd07c0ba7bd0754ac578fcca40ade9448e3a9_c9d499cd-e0e3-4c64-aea9-22d18a8b4872.webp?v=1714721245"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/687fd07c0ba7bd0754ac578fcca40ade9448e3a9_c9d499cd-e0e3-4c64-aea9-22d18a8b4872.webp?v=1714721245","width":2000},{"alt":null,"id":23877207457891,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ac5b32e28ddff929200a91faf5c35cabfef61f_6b5e7a41-8db4-45c1-9d9a-a10cfb8c0025.webp?v=1714721247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ac5b32e28ddff929200a91faf5c35cabfef61f_6b5e7a41-8db4-45c1-9d9a-a10cfb8c0025.webp?v=1714721247","width":2000},{"alt":null,"id":23877208080483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250","width":2000},{"alt":null,"id":23877208506467,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e77810fd06c4881158a900fc6c9cdde8026a3e1_c69d1442-e2e4-44cc-afce-ec29bf09d12e.webp?v=1714721253"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e77810fd06c4881158a900fc6c9cdde8026a3e1_c69d1442-e2e4-44cc-afce-ec29bf09d12e.webp?v=1714721253","width":2000},{"alt":null,"id":23877209096291,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/332406e0fe02060a053aa979bdb76f55aa0509c0_7bb9472d-e72b-42ad-91a8-47f8d31d5832.webp?v=1714721256"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/332406e0fe02060a053aa979bdb76f55aa0509c0_7bb9472d-e72b-42ad-91a8-47f8d31d5832.webp?v=1714721256","width":2000},{"alt":null,"id":23877209456739,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dac586b20cff910f7c4d3615986be55b813e70b_3380b9b7-5f66-4cab-994d-3758e70b57f2.webp?v=1714721258"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dac586b20cff910f7c4d3615986be55b813e70b_3380b9b7-5f66-4cab-994d-3758e70b57f2.webp?v=1714721258","width":2000},{"alt":null,"id":23877209948259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb5148b0808f29a990e2b9d31ab821089b9cd75d_f839d228-8639-4756-a9b4-8f9b67297cea.webp?v=1714721260"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb5148b0808f29a990e2b9d31ab821089b9cd75d_f839d228-8639-4756-a9b4-8f9b67297cea.webp?v=1714721260","width":2000},{"alt":null,"id":23877210505315,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8364e2d98d1575127d9a3c7d6d4eac0daa493cd4_e9265a32-b244-4248-b4e1-4d22c41df496.webp?v=1714721263"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8364e2d98d1575127d9a3c7d6d4eac0daa493cd4_e9265a32-b244-4248-b4e1-4d22c41df496.webp?v=1714721263","width":2000},{"alt":null,"id":23877210800227,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e468d6be20281f94d21d08d9872ab41795fb91c_78a709f0-054b-44bf-a88f-ef60b16c6ad9.webp?v=1714721266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e468d6be20281f94d21d08d9872ab41795fb91c_78a709f0-054b-44bf-a88f-ef60b16c6ad9.webp?v=1714721266","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885530357859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB69","requires_shipping":true,"taxable":true,"featured_image":{"id":31472291741795,"product_id":7408442343523,"position":5,"created_at":"2024-05-03T15:27:30+08:00","updated_at":"2024-05-03T15:27:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250","variant_ids":[41885530357859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 2-俠盜一號 - 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":"NPB0118424-PB69","featured_media":{"alt":null,"id":23877208080483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885530357859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB69","requires_shipping":true,"taxable":true,"featured_image":{"id":31472291741795,"product_id":7408442343523,"position":5,"created_at":"2024-05-03T15:27:30+08:00","updated_at":"2024-05-03T15:27:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250","variant_ids":[41885530357859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 2-俠盜一號 - 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":"NPB0118424-PB69","featured_media":{"alt":null,"id":23877208080483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc4cf89e850482fddb7fc2cbf449b61fc1d0bab8_1c055f5a-2b1c-449f-8310-e870f637b2de.webp?v=1714721250"}},"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: "停產" }