$product = {"id":7408554901603,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-溜溜球炫技-幽默系列","handle":"iphone-12-pro-max-mod-nx-printable-pc11","description":null,"published_at":"2024-06-11T16:40:34+08:00","created_at":"2024-05-03T15:49:43+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 pro 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":41886813126755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472577249379,"product_id":7408554901603,"position":2,"created_at":"2024-05-03T15:49:48+08:00","updated_at":"2024-05-03T15:49:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588","variant_ids":[41886813126755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PC11","featured_media":{"alt":null,"id":23877494636643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffbc43072a3e9ca5181b8c446a175f433ae9c4c1_e13a6e7d-94be-4147-93d6-7c7d4c017cfd.webp?v=1714722586","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31deb0feca22374ae1e8fea1c23e6dc3411362b2_f9f3d184-7294-4780-ba8f-f38c95832d1b.webp?v=1714722591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186a733155a4c0a640d39cd0a3a2063f9f63b1b8_f788e32d-a072-487d-a9c4-f7a1878686da.webp?v=1714722593","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64c2f36447cd75eda26aec5796b81bb9c474294b_3f52ae6d-1d44-45ae-a34e-f7bf62b14941.webp?v=1714722595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e06051e36014acff8c780a231fce2e96bc14b9f6_01b58b1a-4c3b-4199-964a-074398adc71d.webp?v=1714722597","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59bb38b9911d823e7aea4d37424f7021d992bcd0_9c8a91c8-9e31-4643-a461-22c3bb7aa866.webp?v=1714722600","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d5c085816776e9b9a5fc49f2d12febbffa31f56_c94f4855-0495-4516-8113-0a23cde40d0e.webp?v=1714722602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2805b0ea99757c669db4f47b19b7f067082e131b_14b9dde4-9c69-40c2-b626-730c9affd1fa.webp?v=1714722604","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3984bbc4dd21fa6d8b9bff370ab6d18fc8a75443_580140d6-4620-409b-9dc3-f6e6a8378204.webp?v=1714722606"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffbc43072a3e9ca5181b8c446a175f433ae9c4c1_e13a6e7d-94be-4147-93d6-7c7d4c017cfd.webp?v=1714722586","options":["color"],"media":[{"alt":null,"id":23877494112355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffbc43072a3e9ca5181b8c446a175f433ae9c4c1_e13a6e7d-94be-4147-93d6-7c7d4c017cfd.webp?v=1714722586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffbc43072a3e9ca5181b8c446a175f433ae9c4c1_e13a6e7d-94be-4147-93d6-7c7d4c017cfd.webp?v=1714722586","width":2000},{"alt":null,"id":23877494636643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588","width":2000},{"alt":null,"id":23877495292003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31deb0feca22374ae1e8fea1c23e6dc3411362b2_f9f3d184-7294-4780-ba8f-f38c95832d1b.webp?v=1714722591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31deb0feca22374ae1e8fea1c23e6dc3411362b2_f9f3d184-7294-4780-ba8f-f38c95832d1b.webp?v=1714722591","width":2000},{"alt":null,"id":23877495849059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186a733155a4c0a640d39cd0a3a2063f9f63b1b8_f788e32d-a072-487d-a9c4-f7a1878686da.webp?v=1714722593"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186a733155a4c0a640d39cd0a3a2063f9f63b1b8_f788e32d-a072-487d-a9c4-f7a1878686da.webp?v=1714722593","width":2000},{"alt":null,"id":23877496307811,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64c2f36447cd75eda26aec5796b81bb9c474294b_3f52ae6d-1d44-45ae-a34e-f7bf62b14941.webp?v=1714722595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64c2f36447cd75eda26aec5796b81bb9c474294b_3f52ae6d-1d44-45ae-a34e-f7bf62b14941.webp?v=1714722595","width":2000},{"alt":null,"id":23877496766563,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e06051e36014acff8c780a231fce2e96bc14b9f6_01b58b1a-4c3b-4199-964a-074398adc71d.webp?v=1714722597"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e06051e36014acff8c780a231fce2e96bc14b9f6_01b58b1a-4c3b-4199-964a-074398adc71d.webp?v=1714722597","width":2000},{"alt":null,"id":23877497258083,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59bb38b9911d823e7aea4d37424f7021d992bcd0_9c8a91c8-9e31-4643-a461-22c3bb7aa866.webp?v=1714722600"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59bb38b9911d823e7aea4d37424f7021d992bcd0_9c8a91c8-9e31-4643-a461-22c3bb7aa866.webp?v=1714722600","width":2000},{"alt":null,"id":23877497749603,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d5c085816776e9b9a5fc49f2d12febbffa31f56_c94f4855-0495-4516-8113-0a23cde40d0e.webp?v=1714722602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d5c085816776e9b9a5fc49f2d12febbffa31f56_c94f4855-0495-4516-8113-0a23cde40d0e.webp?v=1714722602","width":2000},{"alt":null,"id":23877498306659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2805b0ea99757c669db4f47b19b7f067082e131b_14b9dde4-9c69-40c2-b626-730c9affd1fa.webp?v=1714722604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2805b0ea99757c669db4f47b19b7f067082e131b_14b9dde4-9c69-40c2-b626-730c9affd1fa.webp?v=1714722604","width":2000},{"alt":null,"id":23877498699875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3984bbc4dd21fa6d8b9bff370ab6d18fc8a75443_580140d6-4620-409b-9dc3-f6e6a8378204.webp?v=1714722606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3984bbc4dd21fa6d8b9bff370ab6d18fc8a75443_580140d6-4620-409b-9dc3-f6e6a8378204.webp?v=1714722606","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886813126755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472577249379,"product_id":7408554901603,"position":2,"created_at":"2024-05-03T15:49:48+08:00","updated_at":"2024-05-03T15:49:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588","variant_ids":[41886813126755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PC11","featured_media":{"alt":null,"id":23877494636643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886813126755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472577249379,"product_id":7408554901603,"position":2,"created_at":"2024-05-03T15:49:48+08:00","updated_at":"2024-05-03T15:49:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588","variant_ids":[41886813126755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PC11","featured_media":{"alt":null,"id":23877494636643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06def6e61b76ae33abb7f6937c5d2d9e017f069_30c4b635-ed99-4bbf-8a74-b23d221e3d08.webp?v=1714722588"}},"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: "停產" }