$product = {"id":7416387698787,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-經典","handle":"iphone-8-mod-nx-printable-pb23","description":null,"published_at":"2024-06-11T16:57:42+08:00","created_at":"2024-05-06T14:47: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":41919194169443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31492006346851,"product_id":7416387698787,"position":7,"created_at":"2024-05-06T14:47:22+08:00","updated_at":"2024-05-06T14:47:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042","variant_ids":[41919194169443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB23","featured_media":{"alt":null,"id":23897420136547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f916f8a650711d231a0d1a5df2080a77a0bb626b_4d39e570-b306-40a4-83b7-b57368a85671.webp?v=1714978028","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f2a96d1e17f89853cd5b201defe36e987d18024_f991eabe-084a-4b34-b9ae-3f261ae9b941.webp?v=1714978031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/868a930de88cd46e2d9a4570edf38893113883f6_7cb21298-7299-4bed-89df-90c0502317d2.webp?v=1714978033","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2c09fad48f168206194aa61beaf6787e745ef2a_8a0c1eae-421f-4f83-a21d-e481e6da6a1f.webp?v=1714978035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/401839fb341eba40e86cd65a636b26167c3aeed3_48ecd611-90d3-4010-a23a-4e92fb92ba34.webp?v=1714978038","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6def0c4568f1f1a37d32565af829f9d3663d666e_d03dfd63-d3e2-45f1-ab8a-7e09ce82b6c5.webp?v=1714978040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c29b18c4e9d703f5f407b0acd40cbc8c217083_cd5e9dc2-61da-4307-b0e4-a15f14a256ac.webp?v=1714978045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1591e0420fc6d128f575dfd7fddf4f0bea1ceeb0_66bbf0b5-06e0-44dc-acf6-f170d4165963.webp?v=1714978047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8e86319fe1d0d6cfcd5acb646e0b26091e544a9_23813aec-85e2-4057-92e2-8e34451146b9.webp?v=1714978049"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f916f8a650711d231a0d1a5df2080a77a0bb626b_4d39e570-b306-40a4-83b7-b57368a85671.webp?v=1714978028","options":["color"],"media":[{"alt":null,"id":23897416859747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f916f8a650711d231a0d1a5df2080a77a0bb626b_4d39e570-b306-40a4-83b7-b57368a85671.webp?v=1714978028"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f916f8a650711d231a0d1a5df2080a77a0bb626b_4d39e570-b306-40a4-83b7-b57368a85671.webp?v=1714978028","width":2000},{"alt":null,"id":23897417482339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f2a96d1e17f89853cd5b201defe36e987d18024_f991eabe-084a-4b34-b9ae-3f261ae9b941.webp?v=1714978031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f2a96d1e17f89853cd5b201defe36e987d18024_f991eabe-084a-4b34-b9ae-3f261ae9b941.webp?v=1714978031","width":2000},{"alt":null,"id":23897418039395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/868a930de88cd46e2d9a4570edf38893113883f6_7cb21298-7299-4bed-89df-90c0502317d2.webp?v=1714978033"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/868a930de88cd46e2d9a4570edf38893113883f6_7cb21298-7299-4bed-89df-90c0502317d2.webp?v=1714978033","width":2000},{"alt":null,"id":23897418727523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2c09fad48f168206194aa61beaf6787e745ef2a_8a0c1eae-421f-4f83-a21d-e481e6da6a1f.webp?v=1714978035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2c09fad48f168206194aa61beaf6787e745ef2a_8a0c1eae-421f-4f83-a21d-e481e6da6a1f.webp?v=1714978035","width":2000},{"alt":null,"id":23897419317347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/401839fb341eba40e86cd65a636b26167c3aeed3_48ecd611-90d3-4010-a23a-4e92fb92ba34.webp?v=1714978038"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/401839fb341eba40e86cd65a636b26167c3aeed3_48ecd611-90d3-4010-a23a-4e92fb92ba34.webp?v=1714978038","width":2000},{"alt":null,"id":23897419743331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6def0c4568f1f1a37d32565af829f9d3663d666e_d03dfd63-d3e2-45f1-ab8a-7e09ce82b6c5.webp?v=1714978040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6def0c4568f1f1a37d32565af829f9d3663d666e_d03dfd63-d3e2-45f1-ab8a-7e09ce82b6c5.webp?v=1714978040","width":2000},{"alt":null,"id":23897420136547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042","width":2000},{"alt":null,"id":23897420595299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c29b18c4e9d703f5f407b0acd40cbc8c217083_cd5e9dc2-61da-4307-b0e4-a15f14a256ac.webp?v=1714978045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c29b18c4e9d703f5f407b0acd40cbc8c217083_cd5e9dc2-61da-4307-b0e4-a15f14a256ac.webp?v=1714978045","width":2000},{"alt":null,"id":23897420922979,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1591e0420fc6d128f575dfd7fddf4f0bea1ceeb0_66bbf0b5-06e0-44dc-acf6-f170d4165963.webp?v=1714978047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1591e0420fc6d128f575dfd7fddf4f0bea1ceeb0_66bbf0b5-06e0-44dc-acf6-f170d4165963.webp?v=1714978047","width":2000},{"alt":null,"id":23897421512803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8e86319fe1d0d6cfcd5acb646e0b26091e544a9_23813aec-85e2-4057-92e2-8e34451146b9.webp?v=1714978049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8e86319fe1d0d6cfcd5acb646e0b26091e544a9_23813aec-85e2-4057-92e2-8e34451146b9.webp?v=1714978049","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919194169443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31492006346851,"product_id":7416387698787,"position":7,"created_at":"2024-05-06T14:47:22+08:00","updated_at":"2024-05-06T14:47:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042","variant_ids":[41919194169443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB23","featured_media":{"alt":null,"id":23897420136547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919194169443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31492006346851,"product_id":7416387698787,"position":7,"created_at":"2024-05-06T14:47:22+08:00","updated_at":"2024-05-06T14:47:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042","variant_ids":[41919194169443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB23","featured_media":{"alt":null,"id":23897420136547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846c6bd02800a22f4ceaf95e1b6e1c7892a499aa_b5af9909-87cf-4a89-b023-a8fe87ca7b59.webp?v=1714978042"}},"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: "停產" }