$product = {"id":7416362172515,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機","handle":"iphone-8-mod-nx-printable-pb28","description":null,"published_at":"2024-06-11T16:56:59+08:00","created_at":"2024-05-06T14:42:07+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":41918904434787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31491942154339,"product_id":7416362172515,"position":9,"created_at":"2024-05-06T14:42:28+08:00","updated_at":"2024-05-06T14:42:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748","variant_ids":[41918904434787]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 - 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-PB28","featured_media":{"alt":null,"id":23897355190371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/079ac7e911a74844f074acddf4066beab3baac07_31d0ca2f-c7e9-43d8-aa3b-f6c59b1ce978.webp?v=1714977729","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/982283cf046ca0c01ac32cd7e15725c09a897cff_cc295193-ea02-4c9b-8f3d-f01457664d61.webp?v=1714977731","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f013e258933d7cc72c65add32600b5cd276e617a_367b7fef-8102-46cf-88c8-ce0cbc3edcf6.webp?v=1714977734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4606a5828560c39681d1dfe3d3ceb00a4adc706_e1ebf9bb-cf8d-41eb-82f5-e871f4e07b51.webp?v=1714977736","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab30e7c777c716b7974c2ba8bb7666cd379d1d50_67f06b77-a51f-4a20-b602-d739172957bd.webp?v=1714977739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9289cacd1de796cd6ed7fa1bd7be5f1446ac8bc_f29489ee-947d-4b90-8ae8-91ade639367f.webp?v=1714977741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0db0b9eeda97ea6a7a2da7bcfa053ef7cb3fd15_47434d19-2e8e-43d1-bb71-fdcd5201ee03.webp?v=1714977743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c9818d50c40fc1cba2d75bd3b4e6b48eb1ed20_4926e3b7-9ab5-43e9-8b7a-f3b49c4f0d5f.webp?v=1714977746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e137f7032b6d968803f74d1b2add64697df7be60_2071287d-a627-49d4-b226-4870264b5801.webp?v=1714977750"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/079ac7e911a74844f074acddf4066beab3baac07_31d0ca2f-c7e9-43d8-aa3b-f6c59b1ce978.webp?v=1714977729","options":["color"],"media":[{"alt":null,"id":23897351913571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/079ac7e911a74844f074acddf4066beab3baac07_31d0ca2f-c7e9-43d8-aa3b-f6c59b1ce978.webp?v=1714977729"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/079ac7e911a74844f074acddf4066beab3baac07_31d0ca2f-c7e9-43d8-aa3b-f6c59b1ce978.webp?v=1714977729","width":2000},{"alt":null,"id":23897352241251,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/982283cf046ca0c01ac32cd7e15725c09a897cff_cc295193-ea02-4c9b-8f3d-f01457664d61.webp?v=1714977731"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/982283cf046ca0c01ac32cd7e15725c09a897cff_cc295193-ea02-4c9b-8f3d-f01457664d61.webp?v=1714977731","width":2000},{"alt":null,"id":23897353125987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f013e258933d7cc72c65add32600b5cd276e617a_367b7fef-8102-46cf-88c8-ce0cbc3edcf6.webp?v=1714977734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f013e258933d7cc72c65add32600b5cd276e617a_367b7fef-8102-46cf-88c8-ce0cbc3edcf6.webp?v=1714977734","width":2000},{"alt":null,"id":23897353453667,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4606a5828560c39681d1dfe3d3ceb00a4adc706_e1ebf9bb-cf8d-41eb-82f5-e871f4e07b51.webp?v=1714977736"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4606a5828560c39681d1dfe3d3ceb00a4adc706_e1ebf9bb-cf8d-41eb-82f5-e871f4e07b51.webp?v=1714977736","width":2000},{"alt":null,"id":23897353977955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab30e7c777c716b7974c2ba8bb7666cd379d1d50_67f06b77-a51f-4a20-b602-d739172957bd.webp?v=1714977739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab30e7c777c716b7974c2ba8bb7666cd379d1d50_67f06b77-a51f-4a20-b602-d739172957bd.webp?v=1714977739","width":2000},{"alt":null,"id":23897354240099,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9289cacd1de796cd6ed7fa1bd7be5f1446ac8bc_f29489ee-947d-4b90-8ae8-91ade639367f.webp?v=1714977741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9289cacd1de796cd6ed7fa1bd7be5f1446ac8bc_f29489ee-947d-4b90-8ae8-91ade639367f.webp?v=1714977741","width":2000},{"alt":null,"id":23897354633315,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0db0b9eeda97ea6a7a2da7bcfa053ef7cb3fd15_47434d19-2e8e-43d1-bb71-fdcd5201ee03.webp?v=1714977743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0db0b9eeda97ea6a7a2da7bcfa053ef7cb3fd15_47434d19-2e8e-43d1-bb71-fdcd5201ee03.webp?v=1714977743","width":2000},{"alt":null,"id":23897354993763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c9818d50c40fc1cba2d75bd3b4e6b48eb1ed20_4926e3b7-9ab5-43e9-8b7a-f3b49c4f0d5f.webp?v=1714977746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c9818d50c40fc1cba2d75bd3b4e6b48eb1ed20_4926e3b7-9ab5-43e9-8b7a-f3b49c4f0d5f.webp?v=1714977746","width":2000},{"alt":null,"id":23897355190371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748","width":2000},{"alt":null,"id":23897355550819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e137f7032b6d968803f74d1b2add64697df7be60_2071287d-a627-49d4-b226-4870264b5801.webp?v=1714977750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e137f7032b6d968803f74d1b2add64697df7be60_2071287d-a627-49d4-b226-4870264b5801.webp?v=1714977750","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918904434787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31491942154339,"product_id":7416362172515,"position":9,"created_at":"2024-05-06T14:42:28+08:00","updated_at":"2024-05-06T14:42:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748","variant_ids":[41918904434787]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 - 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-PB28","featured_media":{"alt":null,"id":23897355190371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918904434787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31491942154339,"product_id":7416362172515,"position":9,"created_at":"2024-05-06T14:42:28+08:00","updated_at":"2024-05-06T14:42:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748","variant_ids":[41918904434787]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 - 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-PB28","featured_media":{"alt":null,"id":23897355190371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd19d495e44cafe84d376317dcd72fe22a6ee8b3_64ac1795-8592-4e9f-adf6-c87240714e52.webp?v=1714977748"}},"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: "停產" }