$product = {"id":7408450666595,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝","handle":"iphone-12-mini-mod-nx-printable-yf04","description":null,"published_at":"2024-06-11T16:37:34+08:00","created_at":"2024-05-03T15:28:53+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","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":41885618274403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472308355171,"product_id":7408450666595,"position":1,"created_at":"2024-05-03T15:28:56+08:00","updated_at":"2024-05-03T15:28:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336","variant_ids":[41885618274403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝 - 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-YF04","featured_media":{"alt":null,"id":23877224759395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c94810ef8ed194dd5c9beaf0078ea259790150_fe507eb1-d618-450d-8ad3-cd48637731e7.webp?v=1714721338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a11018cd6d1afeb8c47edffb248ed7534c5bae5_23fca204-0c4f-4c7a-94a9-84f2094058bf.webp?v=1714721341","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75808a0ca827e790dacd43ce4e7dce091ccb1f73_7c8407b5-0707-408a-9f1a-89b496eb4916.webp?v=1714721343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c733dd52bf33e659bfd677e9ece91ee3debb1fa9_02dad1a3-0a9d-4d53-8193-9947057d83e9.webp?v=1714721346","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d2eb483ef3d622183b60dddd57d06ffdfbc3d8_00b86121-db69-452c-8423-e77bf8956de1.webp?v=1714721348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffdb77f482e27e844b98d878623be321ad6aca73_d740d8a3-8b15-4961-a6dd-0bdff523425a.webp?v=1714721350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19c3bb42fa729174b41e0618ac36ef72dd0f00de_7f36bd6f-516a-4bf9-a513-b1db6c649726.webp?v=1714721352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a94b3c698355a5f4a25708a42618cca186da2423_986bac2b-d589-4027-b3e8-448643da8934.webp?v=1714721355","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e7c6e197aad770032f764be49a287589b80a97_0f0a588e-d0b1-4d58-b9f8-4863639e1ba2.webp?v=1714721357","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c646bf5c81fae04308874391ae35ee973a6eb3c_71217da8-c914-4aae-91e1-c4fa16729d3f.webp?v=1714721359"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336","options":["color"],"media":[{"alt":null,"id":23877224759395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336","width":2000},{"alt":null,"id":23877225283683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c94810ef8ed194dd5c9beaf0078ea259790150_fe507eb1-d618-450d-8ad3-cd48637731e7.webp?v=1714721338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c94810ef8ed194dd5c9beaf0078ea259790150_fe507eb1-d618-450d-8ad3-cd48637731e7.webp?v=1714721338","width":2000},{"alt":null,"id":23877225840739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a11018cd6d1afeb8c47edffb248ed7534c5bae5_23fca204-0c4f-4c7a-94a9-84f2094058bf.webp?v=1714721341"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a11018cd6d1afeb8c47edffb248ed7534c5bae5_23fca204-0c4f-4c7a-94a9-84f2094058bf.webp?v=1714721341","width":2000},{"alt":null,"id":23877226463331,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75808a0ca827e790dacd43ce4e7dce091ccb1f73_7c8407b5-0707-408a-9f1a-89b496eb4916.webp?v=1714721343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75808a0ca827e790dacd43ce4e7dce091ccb1f73_7c8407b5-0707-408a-9f1a-89b496eb4916.webp?v=1714721343","width":2000},{"alt":null,"id":23877226922083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c733dd52bf33e659bfd677e9ece91ee3debb1fa9_02dad1a3-0a9d-4d53-8193-9947057d83e9.webp?v=1714721346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c733dd52bf33e659bfd677e9ece91ee3debb1fa9_02dad1a3-0a9d-4d53-8193-9947057d83e9.webp?v=1714721346","width":2000},{"alt":null,"id":23877227446371,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d2eb483ef3d622183b60dddd57d06ffdfbc3d8_00b86121-db69-452c-8423-e77bf8956de1.webp?v=1714721348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d2eb483ef3d622183b60dddd57d06ffdfbc3d8_00b86121-db69-452c-8423-e77bf8956de1.webp?v=1714721348","width":2000},{"alt":null,"id":23877227774051,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffdb77f482e27e844b98d878623be321ad6aca73_d740d8a3-8b15-4961-a6dd-0bdff523425a.webp?v=1714721350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffdb77f482e27e844b98d878623be321ad6aca73_d740d8a3-8b15-4961-a6dd-0bdff523425a.webp?v=1714721350","width":2000},{"alt":null,"id":23877228298339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19c3bb42fa729174b41e0618ac36ef72dd0f00de_7f36bd6f-516a-4bf9-a513-b1db6c649726.webp?v=1714721352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19c3bb42fa729174b41e0618ac36ef72dd0f00de_7f36bd6f-516a-4bf9-a513-b1db6c649726.webp?v=1714721352","width":2000},{"alt":null,"id":23877228691555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a94b3c698355a5f4a25708a42618cca186da2423_986bac2b-d589-4027-b3e8-448643da8934.webp?v=1714721355"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a94b3c698355a5f4a25708a42618cca186da2423_986bac2b-d589-4027-b3e8-448643da8934.webp?v=1714721355","width":2000},{"alt":null,"id":23877229281379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e7c6e197aad770032f764be49a287589b80a97_0f0a588e-d0b1-4d58-b9f8-4863639e1ba2.webp?v=1714721357"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e7c6e197aad770032f764be49a287589b80a97_0f0a588e-d0b1-4d58-b9f8-4863639e1ba2.webp?v=1714721357","width":2000},{"alt":null,"id":23877229674595,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c646bf5c81fae04308874391ae35ee973a6eb3c_71217da8-c914-4aae-91e1-c4fa16729d3f.webp?v=1714721359"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c646bf5c81fae04308874391ae35ee973a6eb3c_71217da8-c914-4aae-91e1-c4fa16729d3f.webp?v=1714721359","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885618274403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472308355171,"product_id":7408450666595,"position":1,"created_at":"2024-05-03T15:28:56+08:00","updated_at":"2024-05-03T15:28:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336","variant_ids":[41885618274403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝 - 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-YF04","featured_media":{"alt":null,"id":23877224759395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885618274403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472308355171,"product_id":7408450666595,"position":1,"created_at":"2024-05-03T15:28:56+08:00","updated_at":"2024-05-03T15:28:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336","variant_ids":[41885618274403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝 - 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-YF04","featured_media":{"alt":null,"id":23877224759395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/472b33913d7d765a36a7746887aee6718d7ef421_da842a07-c8ca-4a79-8a38-1d69a1ebb950.webp?v=1714721336"}},"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: "停產" }