$product = {"id":7408416587875,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-噴漆白","handle":"iphone-12-mini-mod-nx-printable-pb06","description":null,"published_at":"2024-06-11T16:36:38+08:00","created_at":"2024-05-03T15:22:20+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":41885239312483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214736995,"product_id":7408416587875,"position":4,"created_at":"2024-05-03T15:22:29+08:00","updated_at":"2024-05-03T15:22:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949","variant_ids":[41885239312483]},"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-PB06","featured_media":{"alt":null,"id":23877130551395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8db59abac63ffdd6a51ed4e6fe71b60316a1a26d_08a15c0d-e2fd-4865-af8a-d52f5ce5b3d9.webp?v=1714720942","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf9a0fc8295a19e52d2499a00b0c3220429e0bda_a91e0b41-0038-4002-b7a8-a621142e4d1e.webp?v=1714720944","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3c9c822082ce50a3387f9e5872155d8f704f08f_223898ea-434d-4e31-b51e-398dcc1aeb7e.webp?v=1714720946","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa63e43c46638aef94935d785664fcb0a3cd44f_bf2e4f95-5f4b-48d3-b1a6-134bb81a4f0e.webp?v=1714720951","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d111b4156c3c82d38c1e5b93faf9929e5ec8c8f5_88b392a7-6008-416c-b85b-f6a0f44ed1e9.webp?v=1714720953","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/346c0afc8d1bf661e72150b1e33f0bef8dc3f3b6_846aadfc-46ed-4989-bfa1-923ea71ded1a.webp?v=1714720956","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/027a96d1a6af5c9d886fd8f1a4094317f3c7ff1d_15623c4b-40ce-4285-b41e-2e67d8774b1b.webp?v=1714720958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43737318807c7ba2fb188d57ffc63da2c9ff74da_bcdc25c3-9911-4301-80cd-9cfd8c115131.webp?v=1714720960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c9ad567787353b3aeeed6dfd2f7814a7591177a_3d751cbc-995b-4bb2-b95f-cf8ccf931e39.webp?v=1714720962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/569c48399a6ca8265d53285cf164a6099fa94284_69b47309-2c5c-45b6-ba02-bff1bb34fa98.webp?v=1714720965"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8db59abac63ffdd6a51ed4e6fe71b60316a1a26d_08a15c0d-e2fd-4865-af8a-d52f5ce5b3d9.webp?v=1714720942","options":["color"],"media":[{"alt":null,"id":23877129207907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8db59abac63ffdd6a51ed4e6fe71b60316a1a26d_08a15c0d-e2fd-4865-af8a-d52f5ce5b3d9.webp?v=1714720942"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8db59abac63ffdd6a51ed4e6fe71b60316a1a26d_08a15c0d-e2fd-4865-af8a-d52f5ce5b3d9.webp?v=1714720942","width":2000},{"alt":null,"id":23877129601123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf9a0fc8295a19e52d2499a00b0c3220429e0bda_a91e0b41-0038-4002-b7a8-a621142e4d1e.webp?v=1714720944"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf9a0fc8295a19e52d2499a00b0c3220429e0bda_a91e0b41-0038-4002-b7a8-a621142e4d1e.webp?v=1714720944","width":2000},{"alt":null,"id":23877130125411,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3c9c822082ce50a3387f9e5872155d8f704f08f_223898ea-434d-4e31-b51e-398dcc1aeb7e.webp?v=1714720946"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3c9c822082ce50a3387f9e5872155d8f704f08f_223898ea-434d-4e31-b51e-398dcc1aeb7e.webp?v=1714720946","width":2000},{"alt":null,"id":23877130551395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949","width":2000},{"alt":null,"id":23877131206755,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa63e43c46638aef94935d785664fcb0a3cd44f_bf2e4f95-5f4b-48d3-b1a6-134bb81a4f0e.webp?v=1714720951"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa63e43c46638aef94935d785664fcb0a3cd44f_bf2e4f95-5f4b-48d3-b1a6-134bb81a4f0e.webp?v=1714720951","width":2000},{"alt":null,"id":23877131665507,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d111b4156c3c82d38c1e5b93faf9929e5ec8c8f5_88b392a7-6008-416c-b85b-f6a0f44ed1e9.webp?v=1714720953"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d111b4156c3c82d38c1e5b93faf9929e5ec8c8f5_88b392a7-6008-416c-b85b-f6a0f44ed1e9.webp?v=1714720953","width":2000},{"alt":null,"id":23877132222563,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/346c0afc8d1bf661e72150b1e33f0bef8dc3f3b6_846aadfc-46ed-4989-bfa1-923ea71ded1a.webp?v=1714720956"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/346c0afc8d1bf661e72150b1e33f0bef8dc3f3b6_846aadfc-46ed-4989-bfa1-923ea71ded1a.webp?v=1714720956","width":2000},{"alt":null,"id":23877132615779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/027a96d1a6af5c9d886fd8f1a4094317f3c7ff1d_15623c4b-40ce-4285-b41e-2e67d8774b1b.webp?v=1714720958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/027a96d1a6af5c9d886fd8f1a4094317f3c7ff1d_15623c4b-40ce-4285-b41e-2e67d8774b1b.webp?v=1714720958","width":2000},{"alt":null,"id":23877133729891,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43737318807c7ba2fb188d57ffc63da2c9ff74da_bcdc25c3-9911-4301-80cd-9cfd8c115131.webp?v=1714720960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43737318807c7ba2fb188d57ffc63da2c9ff74da_bcdc25c3-9911-4301-80cd-9cfd8c115131.webp?v=1714720960","width":2000},{"alt":null,"id":23877134581859,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c9ad567787353b3aeeed6dfd2f7814a7591177a_3d751cbc-995b-4bb2-b95f-cf8ccf931e39.webp?v=1714720962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c9ad567787353b3aeeed6dfd2f7814a7591177a_3d751cbc-995b-4bb2-b95f-cf8ccf931e39.webp?v=1714720962","width":2000},{"alt":null,"id":23877135007843,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/569c48399a6ca8265d53285cf164a6099fa94284_69b47309-2c5c-45b6-ba02-bff1bb34fa98.webp?v=1714720965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/569c48399a6ca8265d53285cf164a6099fa94284_69b47309-2c5c-45b6-ba02-bff1bb34fa98.webp?v=1714720965","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885239312483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214736995,"product_id":7408416587875,"position":4,"created_at":"2024-05-03T15:22:29+08:00","updated_at":"2024-05-03T15:22:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949","variant_ids":[41885239312483]},"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-PB06","featured_media":{"alt":null,"id":23877130551395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885239312483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214736995,"product_id":7408416587875,"position":4,"created_at":"2024-05-03T15:22:29+08:00","updated_at":"2024-05-03T15:22:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949","variant_ids":[41885239312483]},"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-PB06","featured_media":{"alt":null,"id":23877130551395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a10108694bbdfc17a33f72cba2134e431f257589_7f51b75b-00a3-4523-b61f-c9a4dd0a22ff.webp?v=1714720949"}},"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: "停產" }