$product = {"id":7408533373027,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星際大戰-開場字幕","handle":"iphone-12-mini-mod-nx-printable-pb70","description":null,"published_at":"2024-06-11T16:39:56+08:00","created_at":"2024-05-03T15:45: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 12 mini","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":41886567792739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31472521281635,"product_id":7408533373027,"position":9,"created_at":"2024-05-03T15:45:30+08:00","updated_at":"2024-05-03T15:45:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330","variant_ids":[41886567792739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB70","featured_media":{"alt":null,"id":23877438603363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5d56d1f0aeccd5fbd1b9fe25dacc51cffd9b5a1_ce664c70-842d-4501-b768-979f1a49106d.webp?v=1714722312","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72df2bf65576ac1cfc7dad66b28ad3eaaf77e75_a034ad78-1d07-4969-8db1-acc78d046d1e.webp?v=1714722314","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3334cf61e8b8c262769d4d6955bb42378557f18d_efed4439-02df-4f46-a1b5-594d9cedd02a.webp?v=1714722317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/743471c70e1011e9682328115f30c6b3655b3d43_dc96b9ce-1c20-4c83-b9aa-5e91e2aced3e.webp?v=1714722319","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d436c5fa6a17d88130d6b767bed98667b5b1484e_ec513a1e-6dd3-4eb6-9c67-82900e2d3565.webp?v=1714722321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac1de81381a598bc0063e799ad947de2bfc940d1_0e979d7b-ee50-46b6-9f26-25257e9f448c.webp?v=1714722323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18104b744051a2e0a2a4ca04ced452768d65a1d6_f71ad551-5d9e-4dea-ab56-0cbf02460879.webp?v=1714722326","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519f15679421e8c8bbb5c58798493cc197300570_980d9b82-8ffb-4d54-9cdd-4bbe64e7ebbc.webp?v=1714722328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a874a4dc275671d48186cd146ab2c789623986e_51b72781-6f31-4bd0-87b8-40ca049b7ed7.webp?v=1714722333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e2c475ea19f8e5bf8aa49f0680e8343031a467_65958ae7-c811-4e26-88d3-0d2d3d0b5392.webp?v=1714722335"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5d56d1f0aeccd5fbd1b9fe25dacc51cffd9b5a1_ce664c70-842d-4501-b768-979f1a49106d.webp?v=1714722312","options":["color"],"media":[{"alt":null,"id":23877434376291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5d56d1f0aeccd5fbd1b9fe25dacc51cffd9b5a1_ce664c70-842d-4501-b768-979f1a49106d.webp?v=1714722312"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5d56d1f0aeccd5fbd1b9fe25dacc51cffd9b5a1_ce664c70-842d-4501-b768-979f1a49106d.webp?v=1714722312","width":2000},{"alt":null,"id":23877434802275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72df2bf65576ac1cfc7dad66b28ad3eaaf77e75_a034ad78-1d07-4969-8db1-acc78d046d1e.webp?v=1714722314"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b72df2bf65576ac1cfc7dad66b28ad3eaaf77e75_a034ad78-1d07-4969-8db1-acc78d046d1e.webp?v=1714722314","width":2000},{"alt":null,"id":23877435293795,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3334cf61e8b8c262769d4d6955bb42378557f18d_efed4439-02df-4f46-a1b5-594d9cedd02a.webp?v=1714722317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3334cf61e8b8c262769d4d6955bb42378557f18d_efed4439-02df-4f46-a1b5-594d9cedd02a.webp?v=1714722317","width":2000},{"alt":null,"id":23877435687011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/743471c70e1011e9682328115f30c6b3655b3d43_dc96b9ce-1c20-4c83-b9aa-5e91e2aced3e.webp?v=1714722319"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/743471c70e1011e9682328115f30c6b3655b3d43_dc96b9ce-1c20-4c83-b9aa-5e91e2aced3e.webp?v=1714722319","width":2000},{"alt":null,"id":23877436178531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d436c5fa6a17d88130d6b767bed98667b5b1484e_ec513a1e-6dd3-4eb6-9c67-82900e2d3565.webp?v=1714722321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d436c5fa6a17d88130d6b767bed98667b5b1484e_ec513a1e-6dd3-4eb6-9c67-82900e2d3565.webp?v=1714722321","width":2000},{"alt":null,"id":23877436997731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac1de81381a598bc0063e799ad947de2bfc940d1_0e979d7b-ee50-46b6-9f26-25257e9f448c.webp?v=1714722323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac1de81381a598bc0063e799ad947de2bfc940d1_0e979d7b-ee50-46b6-9f26-25257e9f448c.webp?v=1714722323","width":2000},{"alt":null,"id":23877437522019,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18104b744051a2e0a2a4ca04ced452768d65a1d6_f71ad551-5d9e-4dea-ab56-0cbf02460879.webp?v=1714722326"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18104b744051a2e0a2a4ca04ced452768d65a1d6_f71ad551-5d9e-4dea-ab56-0cbf02460879.webp?v=1714722326","width":2000},{"alt":null,"id":23877438079075,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519f15679421e8c8bbb5c58798493cc197300570_980d9b82-8ffb-4d54-9cdd-4bbe64e7ebbc.webp?v=1714722328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519f15679421e8c8bbb5c58798493cc197300570_980d9b82-8ffb-4d54-9cdd-4bbe64e7ebbc.webp?v=1714722328","width":2000},{"alt":null,"id":23877438603363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330","width":2000},{"alt":null,"id":23877439127651,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a874a4dc275671d48186cd146ab2c789623986e_51b72781-6f31-4bd0-87b8-40ca049b7ed7.webp?v=1714722333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a874a4dc275671d48186cd146ab2c789623986e_51b72781-6f31-4bd0-87b8-40ca049b7ed7.webp?v=1714722333","width":2000},{"alt":null,"id":23877439815779,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e2c475ea19f8e5bf8aa49f0680e8343031a467_65958ae7-c811-4e26-88d3-0d2d3d0b5392.webp?v=1714722335"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e2c475ea19f8e5bf8aa49f0680e8343031a467_65958ae7-c811-4e26-88d3-0d2d3d0b5392.webp?v=1714722335","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886567792739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31472521281635,"product_id":7408533373027,"position":9,"created_at":"2024-05-03T15:45:30+08:00","updated_at":"2024-05-03T15:45:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330","variant_ids":[41886567792739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB70","featured_media":{"alt":null,"id":23877438603363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886567792739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31472521281635,"product_id":7408533373027,"position":9,"created_at":"2024-05-03T15:45:30+08:00","updated_at":"2024-05-03T15:45:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330","variant_ids":[41886567792739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB70","featured_media":{"alt":null,"id":23877438603363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b87e791f5a275a6a613547cc2d5aeb2bb0a615c_32a30173-529f-43ff-94e0-e58bc55dc6e2.webp?v=1714722330"}},"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: "停產" }