$product = {"id":7407734259811,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列","handle":"iphone-14-plus-mod-nx-printable-pb55","description":null,"published_at":"2024-06-11T16:22:33+08:00","created_at":"2024-05-03T10:46:10+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 14 Plus","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":41878204612707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31470295580771,"product_id":7407734259811,"position":10,"created_at":"2024-05-03T10:46:35+08:00","updated_at":"2024-05-03T10:46:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395","variant_ids":[41878204612707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0126124-PB55","featured_media":{"alt":null,"id":23875198681187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d021189b8d917111f5c74e57828c441134b6421d_fdc67465-afb1-481a-88b8-ce5a36566c6d.webp?v=1714704373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7695f39c48ee4a02a68914cfa2bff4bd046775_5ea47094-6615-4620-b014-808756459d6b.webp?v=1714704375","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec41123ea494fe2744fe6a0f20a00db39383d0d3_b15b11f0-3540-4bcc-9593-eada8d08d588.webp?v=1714704378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f03849c3fe0d32a7431126072fdb4bb02030b764_142a57ac-8a36-4c41-9cc2-b99092d8a695.webp?v=1714704380","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab6d406688d689b3bdfdba581b91696dbb1dc800_eb8b949d-bd9c-4985-b7d4-221cd3c92d48.webp?v=1714704383","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/580534fc9f0beb51797045da5ca45e9446228d95_a8d06c2d-4e2d-42b3-a75a-b17043339cab.webp?v=1714704385","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad17e8543aecf11f94bce1627d650d339e0d8ebe_81658f18-5311-421d-903a-f4b4643d40c3.webp?v=1714704388","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e96dc04f70f225ba87a6099e55db7502d478eb_3885aeab-10a2-4dce-8b1a-cad8fa6a77c3.webp?v=1714704390","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e510c0a419b2a24bc6abd621994034524218bb5_736af3a4-e022-4199-b7e8-fc9c9748b0ce.webp?v=1714704392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d021189b8d917111f5c74e57828c441134b6421d_fdc67465-afb1-481a-88b8-ce5a36566c6d.webp?v=1714704373","options":["color"],"media":[{"alt":null,"id":23875192684643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d021189b8d917111f5c74e57828c441134b6421d_fdc67465-afb1-481a-88b8-ce5a36566c6d.webp?v=1714704373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d021189b8d917111f5c74e57828c441134b6421d_fdc67465-afb1-481a-88b8-ce5a36566c6d.webp?v=1714704373","width":2000},{"alt":null,"id":23875193307235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7695f39c48ee4a02a68914cfa2bff4bd046775_5ea47094-6615-4620-b014-808756459d6b.webp?v=1714704375"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7695f39c48ee4a02a68914cfa2bff4bd046775_5ea47094-6615-4620-b014-808756459d6b.webp?v=1714704375","width":2000},{"alt":null,"id":23875193929827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec41123ea494fe2744fe6a0f20a00db39383d0d3_b15b11f0-3540-4bcc-9593-eada8d08d588.webp?v=1714704378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec41123ea494fe2744fe6a0f20a00db39383d0d3_b15b11f0-3540-4bcc-9593-eada8d08d588.webp?v=1714704378","width":2000},{"alt":null,"id":23875194552419,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f03849c3fe0d32a7431126072fdb4bb02030b764_142a57ac-8a36-4c41-9cc2-b99092d8a695.webp?v=1714704380"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f03849c3fe0d32a7431126072fdb4bb02030b764_142a57ac-8a36-4c41-9cc2-b99092d8a695.webp?v=1714704380","width":2000},{"alt":null,"id":23875195797603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab6d406688d689b3bdfdba581b91696dbb1dc800_eb8b949d-bd9c-4985-b7d4-221cd3c92d48.webp?v=1714704383"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab6d406688d689b3bdfdba581b91696dbb1dc800_eb8b949d-bd9c-4985-b7d4-221cd3c92d48.webp?v=1714704383","width":2000},{"alt":null,"id":23875196289123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/580534fc9f0beb51797045da5ca45e9446228d95_a8d06c2d-4e2d-42b3-a75a-b17043339cab.webp?v=1714704385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/580534fc9f0beb51797045da5ca45e9446228d95_a8d06c2d-4e2d-42b3-a75a-b17043339cab.webp?v=1714704385","width":2000},{"alt":null,"id":23875196813411,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad17e8543aecf11f94bce1627d650d339e0d8ebe_81658f18-5311-421d-903a-f4b4643d40c3.webp?v=1714704388"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad17e8543aecf11f94bce1627d650d339e0d8ebe_81658f18-5311-421d-903a-f4b4643d40c3.webp?v=1714704388","width":2000},{"alt":null,"id":23875197730915,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e96dc04f70f225ba87a6099e55db7502d478eb_3885aeab-10a2-4dce-8b1a-cad8fa6a77c3.webp?v=1714704390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e96dc04f70f225ba87a6099e55db7502d478eb_3885aeab-10a2-4dce-8b1a-cad8fa6a77c3.webp?v=1714704390","width":2000},{"alt":null,"id":23875198091363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e510c0a419b2a24bc6abd621994034524218bb5_736af3a4-e022-4199-b7e8-fc9c9748b0ce.webp?v=1714704392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e510c0a419b2a24bc6abd621994034524218bb5_736af3a4-e022-4199-b7e8-fc9c9748b0ce.webp?v=1714704392","width":2000},{"alt":null,"id":23875198681187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41878204612707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31470295580771,"product_id":7407734259811,"position":10,"created_at":"2024-05-03T10:46:35+08:00","updated_at":"2024-05-03T10:46:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395","variant_ids":[41878204612707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0126124-PB55","featured_media":{"alt":null,"id":23875198681187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41878204612707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31470295580771,"product_id":7407734259811,"position":10,"created_at":"2024-05-03T10:46:35+08:00","updated_at":"2024-05-03T10:46:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395","variant_ids":[41878204612707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0126124-PB55","featured_media":{"alt":null,"id":23875198681187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeaa0bb994938e71c622657e511b06232865ac56_19388e77-2db2-4c93-a458-c9a11fa68a39.webp?v=1714704395"}},"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: "停產" }