$product = {"id":7408565321827,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星際大戰徽章-潮流系列","handle":"iphone-12-mini-mod-nx-printable-pb50","description":null,"published_at":"2024-06-11T16:40:52+08:00","created_at":"2024-05-03T15:51:52+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":41886926176355,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB50","requires_shipping":true,"taxable":true,"featured_image":{"id":31472605200483,"product_id":7408565321827,"position":9,"created_at":"2024-05-03T15:52:14+08:00","updated_at":"2024-05-03T15:52:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734","variant_ids":[41886926176355]},"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-PB50","featured_media":{"alt":null,"id":23877522686051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57095b751b7c461b220960bea64a550235b6d376_fbe5565f-2fa7-45f2-b739-4302c0959cd5.webp?v=1714722714","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109787a7a40addf6d704cc3ddac8bf5a729f9ff5_9c3950a8-afbe-4502-9c93-d0279f2a998d.webp?v=1714722717","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f5bf7c06147c5e3db748920c3f329cdfcab56ac_7e3d933f-7ea1-4e18-8fb1-7bdba4e64135.webp?v=1714722720","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409a4bd15ca4680920802f3847106bbc97496fb8_69754f0e-0550-478c-801f-6fc12d3dd9f2.webp?v=1714722723","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d58244e750389778f8d61abb39cc3dfa4d8f89f6_3a08347e-a8ef-45f2-94de-c84ac98a3e47.webp?v=1714722725","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35da570dc6a7ded45e230775a3d85d16052274d9_a1983d6c-c75f-416b-97de-f5098f20a590.webp?v=1714722728","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26b4d44f17ca8f0b6484c679a1b2e299123f27f5_2ad6ce39-5141-45f1-abaf-f77dab7ecf6c.webp?v=1714722730","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7981ec3f73ac0780b78bbeb425e394bd7ff29a3b_36b1d676-0aac-45f8-932b-4975ea0f8fbb.webp?v=1714722732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26f6f2465d885e2d78d3f8ad3471da94155e48f6_b5d82484-cfc6-4f99-9c07-78bdd653af6c.webp?v=1714722737","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4656242a264cc40c88bf39ef458c5e4c2820db5c_5370a152-0851-4f3f-90b8-71ea6aac3ff4.webp?v=1714722739"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57095b751b7c461b220960bea64a550235b6d376_fbe5565f-2fa7-45f2-b739-4302c0959cd5.webp?v=1714722714","options":["color"],"media":[{"alt":null,"id":23877520752739,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57095b751b7c461b220960bea64a550235b6d376_fbe5565f-2fa7-45f2-b739-4302c0959cd5.webp?v=1714722714"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57095b751b7c461b220960bea64a550235b6d376_fbe5565f-2fa7-45f2-b739-4302c0959cd5.webp?v=1714722714","width":2000},{"alt":null,"id":23877521277027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109787a7a40addf6d704cc3ddac8bf5a729f9ff5_9c3950a8-afbe-4502-9c93-d0279f2a998d.webp?v=1714722717"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109787a7a40addf6d704cc3ddac8bf5a729f9ff5_9c3950a8-afbe-4502-9c93-d0279f2a998d.webp?v=1714722717","width":2000},{"alt":null,"id":23877521703011,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f5bf7c06147c5e3db748920c3f329cdfcab56ac_7e3d933f-7ea1-4e18-8fb1-7bdba4e64135.webp?v=1714722720"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f5bf7c06147c5e3db748920c3f329cdfcab56ac_7e3d933f-7ea1-4e18-8fb1-7bdba4e64135.webp?v=1714722720","width":2000},{"alt":null,"id":23877522030691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409a4bd15ca4680920802f3847106bbc97496fb8_69754f0e-0550-478c-801f-6fc12d3dd9f2.webp?v=1714722723"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409a4bd15ca4680920802f3847106bbc97496fb8_69754f0e-0550-478c-801f-6fc12d3dd9f2.webp?v=1714722723","width":2000},{"alt":null,"id":23877522227299,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d58244e750389778f8d61abb39cc3dfa4d8f89f6_3a08347e-a8ef-45f2-94de-c84ac98a3e47.webp?v=1714722725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d58244e750389778f8d61abb39cc3dfa4d8f89f6_3a08347e-a8ef-45f2-94de-c84ac98a3e47.webp?v=1714722725","width":2000},{"alt":null,"id":23877522358371,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35da570dc6a7ded45e230775a3d85d16052274d9_a1983d6c-c75f-416b-97de-f5098f20a590.webp?v=1714722728"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35da570dc6a7ded45e230775a3d85d16052274d9_a1983d6c-c75f-416b-97de-f5098f20a590.webp?v=1714722728","width":2000},{"alt":null,"id":23877522456675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26b4d44f17ca8f0b6484c679a1b2e299123f27f5_2ad6ce39-5141-45f1-abaf-f77dab7ecf6c.webp?v=1714722730"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26b4d44f17ca8f0b6484c679a1b2e299123f27f5_2ad6ce39-5141-45f1-abaf-f77dab7ecf6c.webp?v=1714722730","width":2000},{"alt":null,"id":23877522620515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7981ec3f73ac0780b78bbeb425e394bd7ff29a3b_36b1d676-0aac-45f8-932b-4975ea0f8fbb.webp?v=1714722732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7981ec3f73ac0780b78bbeb425e394bd7ff29a3b_36b1d676-0aac-45f8-932b-4975ea0f8fbb.webp?v=1714722732","width":2000},{"alt":null,"id":23877522686051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734","width":2000},{"alt":null,"id":23877522751587,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26f6f2465d885e2d78d3f8ad3471da94155e48f6_b5d82484-cfc6-4f99-9c07-78bdd653af6c.webp?v=1714722737"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26f6f2465d885e2d78d3f8ad3471da94155e48f6_b5d82484-cfc6-4f99-9c07-78bdd653af6c.webp?v=1714722737","width":2000},{"alt":null,"id":23877522948195,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4656242a264cc40c88bf39ef458c5e4c2820db5c_5370a152-0851-4f3f-90b8-71ea6aac3ff4.webp?v=1714722739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4656242a264cc40c88bf39ef458c5e4c2820db5c_5370a152-0851-4f3f-90b8-71ea6aac3ff4.webp?v=1714722739","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886926176355,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB50","requires_shipping":true,"taxable":true,"featured_image":{"id":31472605200483,"product_id":7408565321827,"position":9,"created_at":"2024-05-03T15:52:14+08:00","updated_at":"2024-05-03T15:52:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734","variant_ids":[41886926176355]},"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-PB50","featured_media":{"alt":null,"id":23877522686051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886926176355,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB50","requires_shipping":true,"taxable":true,"featured_image":{"id":31472605200483,"product_id":7408565321827,"position":9,"created_at":"2024-05-03T15:52:14+08:00","updated_at":"2024-05-03T15:52:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734","variant_ids":[41886926176355]},"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-PB50","featured_media":{"alt":null,"id":23877522686051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e3bdfd3932f843fdfa5264516ec41440e70dd21_71cedd74-8b16-47c9-9aa1-50f38e404d1d.webp?v=1714722734"}},"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: "停產" }