$product = {"id":7416382455907,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8","handle":"iphone-8-mod-nx-printable-pc04","description":null,"published_at":"2024-06-11T16:57:33+08:00","created_at":"2024-05-06T14:46:06+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 8","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":41919129419875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491992256611,"product_id":7416382455907,"position":8,"created_at":"2024-05-06T14:46:24+08:00","updated_at":"2024-05-06T14:46:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984","variant_ids":[41919129419875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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":"NPB0105424-PC04","featured_media":{"alt":null,"id":23897405751395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2aff8697fda041e7106461bad964af22225e55_c058636e-8dc8-4fd8-9697-9873807a6369.webp?v=1714977968","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7749bc11dcf080555b3a94d454a2a96a9b26ef85_399b9177-b2d9-4c57-8107-54e05a782153.webp?v=1714977971","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53f956f2b7c64f2e72752d2209160733c27c856f_ea8290b3-dda6-4f11-91d3-71598f58e477.webp?v=1714977973","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adafb63c7e3c60cc3b3042aac9e66ff88424579f_54f225cc-0984-49ba-a651-fe2563069d54.webp?v=1714977975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7c37acb0a1cc2b5b9d4b5134349fad5ed5265fc_9a447635-7273-4673-bcb5-f5b2a60184d9.webp?v=1714977977","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b9ad144674d37ea47992bd82ad8046123232102_9ddd030d-9375-419f-bc02-6a7b72bf42d9.webp?v=1714977980","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78cc4c3f556ee78a6bfce600a9495407071c829d_4ad275d3-7c51-4aa3-9618-8572f6ddf31f.webp?v=1714977982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d112e33e1082e1d30526d9e745a5a3928a174d_5358da84-87fe-449c-b0a9-515b58e16aba.webp?v=1714977986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47969b82d707d5c5ecc5674a220dfe1b1da0d3e_75e9dd9f-001e-4d31-af15-c13ac086196e.webp?v=1714977989"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2aff8697fda041e7106461bad964af22225e55_c058636e-8dc8-4fd8-9697-9873807a6369.webp?v=1714977968","options":["color"],"media":[{"alt":null,"id":23897401917539,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2aff8697fda041e7106461bad964af22225e55_c058636e-8dc8-4fd8-9697-9873807a6369.webp?v=1714977968"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2aff8697fda041e7106461bad964af22225e55_c058636e-8dc8-4fd8-9697-9873807a6369.webp?v=1714977968","width":2000},{"alt":null,"id":23897402474595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7749bc11dcf080555b3a94d454a2a96a9b26ef85_399b9177-b2d9-4c57-8107-54e05a782153.webp?v=1714977971"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7749bc11dcf080555b3a94d454a2a96a9b26ef85_399b9177-b2d9-4c57-8107-54e05a782153.webp?v=1714977971","width":2000},{"alt":null,"id":23897403162723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53f956f2b7c64f2e72752d2209160733c27c856f_ea8290b3-dda6-4f11-91d3-71598f58e477.webp?v=1714977973"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53f956f2b7c64f2e72752d2209160733c27c856f_ea8290b3-dda6-4f11-91d3-71598f58e477.webp?v=1714977973","width":2000},{"alt":null,"id":23897403883619,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adafb63c7e3c60cc3b3042aac9e66ff88424579f_54f225cc-0984-49ba-a651-fe2563069d54.webp?v=1714977975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adafb63c7e3c60cc3b3042aac9e66ff88424579f_54f225cc-0984-49ba-a651-fe2563069d54.webp?v=1714977975","width":2000},{"alt":null,"id":23897404309603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7c37acb0a1cc2b5b9d4b5134349fad5ed5265fc_9a447635-7273-4673-bcb5-f5b2a60184d9.webp?v=1714977977"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7c37acb0a1cc2b5b9d4b5134349fad5ed5265fc_9a447635-7273-4673-bcb5-f5b2a60184d9.webp?v=1714977977","width":2000},{"alt":null,"id":23897404833891,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b9ad144674d37ea47992bd82ad8046123232102_9ddd030d-9375-419f-bc02-6a7b72bf42d9.webp?v=1714977980"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b9ad144674d37ea47992bd82ad8046123232102_9ddd030d-9375-419f-bc02-6a7b72bf42d9.webp?v=1714977980","width":2000},{"alt":null,"id":23897405358179,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78cc4c3f556ee78a6bfce600a9495407071c829d_4ad275d3-7c51-4aa3-9618-8572f6ddf31f.webp?v=1714977982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78cc4c3f556ee78a6bfce600a9495407071c829d_4ad275d3-7c51-4aa3-9618-8572f6ddf31f.webp?v=1714977982","width":2000},{"alt":null,"id":23897405751395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984","width":2000},{"alt":null,"id":23897406767203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d112e33e1082e1d30526d9e745a5a3928a174d_5358da84-87fe-449c-b0a9-515b58e16aba.webp?v=1714977986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d112e33e1082e1d30526d9e745a5a3928a174d_5358da84-87fe-449c-b0a9-515b58e16aba.webp?v=1714977986","width":2000},{"alt":null,"id":23897407193187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47969b82d707d5c5ecc5674a220dfe1b1da0d3e_75e9dd9f-001e-4d31-af15-c13ac086196e.webp?v=1714977989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47969b82d707d5c5ecc5674a220dfe1b1da0d3e_75e9dd9f-001e-4d31-af15-c13ac086196e.webp?v=1714977989","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919129419875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491992256611,"product_id":7416382455907,"position":8,"created_at":"2024-05-06T14:46:24+08:00","updated_at":"2024-05-06T14:46:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984","variant_ids":[41919129419875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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":"NPB0105424-PC04","featured_media":{"alt":null,"id":23897405751395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919129419875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491992256611,"product_id":7416382455907,"position":8,"created_at":"2024-05-06T14:46:24+08:00","updated_at":"2024-05-06T14:46:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984","variant_ids":[41919129419875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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":"NPB0105424-PC04","featured_media":{"alt":null,"id":23897405751395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8cf97710f43781e2ec2f4f2b4bc9d1a6ab5b7c_41bf8066-a586-4e7f-a337-c80171f7904b.webp?v=1714977984"}},"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: "停產" }