$product = {"id":7408494182499,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 死星-黑白條紋","handle":"iphone-12-mini-mod-nx-printable-pb21","description":null,"published_at":"2024-06-11T16:38:48+08:00","created_at":"2024-05-03T15:37:37+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":41886117265507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31472419471459,"product_id":7408494182499,"position":2,"created_at":"2024-05-03T15:37:42+08:00","updated_at":"2024-05-03T15:37:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862","variant_ids":[41886117265507]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB21","featured_media":{"alt":null,"id":23877336399971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0e7c6728df2dd7e5394fad61c2d461667dce377_9b3e0a72-471d-4b31-a67d-e32cd86f198d.webp?v=1714721859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99d27663143405f671b654e642d62aef6f127850_118b0507-c040-4887-88bc-5e5f5183bed6.webp?v=1714721864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/accf4003995d54351257212ceaa17bd9c84007b8_6a21d495-f4de-4372-87d1-ed4986d9beb0.webp?v=1714721867","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f435e57dce50f176de91e1d1d237889fa4081ba5_583ef826-72f3-4749-ac8f-536c98530d6d.webp?v=1714721869","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a74bf6780f213ce4e75db87e4afdf1c8e9b0d55_f5343063-2231-435d-adb3-7544a806dbcd.webp?v=1714721872","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/386ed1cf1f3c30751fd98d591de23d1ecc8ac52c_8601a9d9-c240-4953-893e-79e4f85153c2.webp?v=1714721874","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80bd1fe8f512cdfd09d37087529779387eb888f0_e58b5847-a6fe-4463-9a9b-fd58b320c5b0.webp?v=1714721877","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4550df529be12b8ab8e875543f94ea4f75e19b31_022d599f-00a0-4a1e-a743-302cb9db29b4.webp?v=1714721879","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e803157c245f8acdbb44e4ebf3d8e72dd6532926_a526b7d4-6309-497f-8a20-be115d32ef39.webp?v=1714721882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27093c264069f49cf80796801b7fe9cdfb114417_49857038-9c4e-4f35-ac81-8346fa1bb37c.webp?v=1714721885"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0e7c6728df2dd7e5394fad61c2d461667dce377_9b3e0a72-471d-4b31-a67d-e32cd86f198d.webp?v=1714721859","options":["color"],"media":[{"alt":null,"id":23877336039523,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0e7c6728df2dd7e5394fad61c2d461667dce377_9b3e0a72-471d-4b31-a67d-e32cd86f198d.webp?v=1714721859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0e7c6728df2dd7e5394fad61c2d461667dce377_9b3e0a72-471d-4b31-a67d-e32cd86f198d.webp?v=1714721859","width":2000},{"alt":null,"id":23877336399971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862","width":2000},{"alt":null,"id":23877337088099,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99d27663143405f671b654e642d62aef6f127850_118b0507-c040-4887-88bc-5e5f5183bed6.webp?v=1714721864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99d27663143405f671b654e642d62aef6f127850_118b0507-c040-4887-88bc-5e5f5183bed6.webp?v=1714721864","width":2000},{"alt":null,"id":23877337514083,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/accf4003995d54351257212ceaa17bd9c84007b8_6a21d495-f4de-4372-87d1-ed4986d9beb0.webp?v=1714721867"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/accf4003995d54351257212ceaa17bd9c84007b8_6a21d495-f4de-4372-87d1-ed4986d9beb0.webp?v=1714721867","width":2000},{"alt":null,"id":23877338267747,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f435e57dce50f176de91e1d1d237889fa4081ba5_583ef826-72f3-4749-ac8f-536c98530d6d.webp?v=1714721869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f435e57dce50f176de91e1d1d237889fa4081ba5_583ef826-72f3-4749-ac8f-536c98530d6d.webp?v=1714721869","width":2000},{"alt":null,"id":23877338890339,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a74bf6780f213ce4e75db87e4afdf1c8e9b0d55_f5343063-2231-435d-adb3-7544a806dbcd.webp?v=1714721872"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a74bf6780f213ce4e75db87e4afdf1c8e9b0d55_f5343063-2231-435d-adb3-7544a806dbcd.webp?v=1714721872","width":2000},{"alt":null,"id":23877339414627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/386ed1cf1f3c30751fd98d591de23d1ecc8ac52c_8601a9d9-c240-4953-893e-79e4f85153c2.webp?v=1714721874"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/386ed1cf1f3c30751fd98d591de23d1ecc8ac52c_8601a9d9-c240-4953-893e-79e4f85153c2.webp?v=1714721874","width":2000},{"alt":null,"id":23877340004451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80bd1fe8f512cdfd09d37087529779387eb888f0_e58b5847-a6fe-4463-9a9b-fd58b320c5b0.webp?v=1714721877"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80bd1fe8f512cdfd09d37087529779387eb888f0_e58b5847-a6fe-4463-9a9b-fd58b320c5b0.webp?v=1714721877","width":2000},{"alt":null,"id":23877340594275,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4550df529be12b8ab8e875543f94ea4f75e19b31_022d599f-00a0-4a1e-a743-302cb9db29b4.webp?v=1714721879"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4550df529be12b8ab8e875543f94ea4f75e19b31_022d599f-00a0-4a1e-a743-302cb9db29b4.webp?v=1714721879","width":2000},{"alt":null,"id":23877341085795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e803157c245f8acdbb44e4ebf3d8e72dd6532926_a526b7d4-6309-497f-8a20-be115d32ef39.webp?v=1714721882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e803157c245f8acdbb44e4ebf3d8e72dd6532926_a526b7d4-6309-497f-8a20-be115d32ef39.webp?v=1714721882","width":2000},{"alt":null,"id":23877341773923,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27093c264069f49cf80796801b7fe9cdfb114417_49857038-9c4e-4f35-ac81-8346fa1bb37c.webp?v=1714721885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27093c264069f49cf80796801b7fe9cdfb114417_49857038-9c4e-4f35-ac81-8346fa1bb37c.webp?v=1714721885","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886117265507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31472419471459,"product_id":7408494182499,"position":2,"created_at":"2024-05-03T15:37:42+08:00","updated_at":"2024-05-03T15:37:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862","variant_ids":[41886117265507]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB21","featured_media":{"alt":null,"id":23877336399971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886117265507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31472419471459,"product_id":7408494182499,"position":2,"created_at":"2024-05-03T15:37:42+08:00","updated_at":"2024-05-03T15:37:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862","variant_ids":[41886117265507]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB21","featured_media":{"alt":null,"id":23877336399971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b9db3668c9c5ee51173e3a7c36f88906389911_96af81ce-7146-4df2-a9ee-5dfa1040a030.webp?v=1714721862"}},"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: "停產" }