$product = {"id":7407642443875,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機","handle":"iphone-14-plus-mod-nx-printable-pb28","description":null,"published_at":"2024-06-11T16:21:23+08:00","created_at":"2024-05-03T10:35:55+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":41877085192291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31470133018723,"product_id":7407642443875,"position":5,"created_at":"2024-05-03T10:36:11+08:00","updated_at":"2024-05-03T10:36:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771","variant_ids":[41877085192291]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB28","featured_media":{"alt":null,"id":23875035922531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c264487a1504ac00d4daaea3a765d427abf7b1_5e5c6501-a389-4517-b0a1-816bdfed01d2.webp?v=1714703759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7396ef606e7785ef3ba109d42fe4633a9dca60_6c0f8a73-8ee3-4094-b820-de94a595931e.webp?v=1714703762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b3630964f5ed9e303f3ef0d0dfd6679a000a1a5_fdafa786-55bb-45e9-a5f9-6fdf601c888f.webp?v=1714703765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc0e34a540c8ec5d51f068003fc3c09c16f42d1_9e6167e2-3e60-4230-b22a-07e9bc234d3a.webp?v=1714703768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d79bc26e923d89d312a6276ff1ae6d36726640e4_8267b1f2-13ed-4bb8-a5ca-f42b127899c7.webp?v=1714703773","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb8118881ca25729b84b29dfeebeea6f1c97fa7a_90183767-f5f4-4209-8f94-4a6a65265e6d.webp?v=1714703776","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bde97c08959bf07821577e15baaf5d80a5848b9_8a018dc3-cdf7-4103-9ced-61384d2e7965.webp?v=1714703778","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d71a198c677e06985836c96b0573c48d3540fa9_923f8e56-6c98-4ee3-ba8a-adfc58e47387.webp?v=1714703781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a516ada5f7f6352ee2ced9a57e2b4e7b49ea045_eb49e5e4-4ad3-4900-84df-476bb8286941.webp?v=1714703784"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c264487a1504ac00d4daaea3a765d427abf7b1_5e5c6501-a389-4517-b0a1-816bdfed01d2.webp?v=1714703759","options":["color"],"media":[{"alt":null,"id":23875033661539,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c264487a1504ac00d4daaea3a765d427abf7b1_5e5c6501-a389-4517-b0a1-816bdfed01d2.webp?v=1714703759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c264487a1504ac00d4daaea3a765d427abf7b1_5e5c6501-a389-4517-b0a1-816bdfed01d2.webp?v=1714703759","width":2000},{"alt":null,"id":23875034087523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7396ef606e7785ef3ba109d42fe4633a9dca60_6c0f8a73-8ee3-4094-b820-de94a595931e.webp?v=1714703762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7396ef606e7785ef3ba109d42fe4633a9dca60_6c0f8a73-8ee3-4094-b820-de94a595931e.webp?v=1714703762","width":2000},{"alt":null,"id":23875035005027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b3630964f5ed9e303f3ef0d0dfd6679a000a1a5_fdafa786-55bb-45e9-a5f9-6fdf601c888f.webp?v=1714703765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b3630964f5ed9e303f3ef0d0dfd6679a000a1a5_fdafa786-55bb-45e9-a5f9-6fdf601c888f.webp?v=1714703765","width":2000},{"alt":null,"id":23875035660387,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc0e34a540c8ec5d51f068003fc3c09c16f42d1_9e6167e2-3e60-4230-b22a-07e9bc234d3a.webp?v=1714703768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcc0e34a540c8ec5d51f068003fc3c09c16f42d1_9e6167e2-3e60-4230-b22a-07e9bc234d3a.webp?v=1714703768","width":2000},{"alt":null,"id":23875035922531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771","width":2000},{"alt":null,"id":23875036381283,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d79bc26e923d89d312a6276ff1ae6d36726640e4_8267b1f2-13ed-4bb8-a5ca-f42b127899c7.webp?v=1714703773"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d79bc26e923d89d312a6276ff1ae6d36726640e4_8267b1f2-13ed-4bb8-a5ca-f42b127899c7.webp?v=1714703773","width":2000},{"alt":null,"id":23875036741731,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb8118881ca25729b84b29dfeebeea6f1c97fa7a_90183767-f5f4-4209-8f94-4a6a65265e6d.webp?v=1714703776"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb8118881ca25729b84b29dfeebeea6f1c97fa7a_90183767-f5f4-4209-8f94-4a6a65265e6d.webp?v=1714703776","width":2000},{"alt":null,"id":23875037102179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bde97c08959bf07821577e15baaf5d80a5848b9_8a018dc3-cdf7-4103-9ced-61384d2e7965.webp?v=1714703778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bde97c08959bf07821577e15baaf5d80a5848b9_8a018dc3-cdf7-4103-9ced-61384d2e7965.webp?v=1714703778","width":2000},{"alt":null,"id":23875037593699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d71a198c677e06985836c96b0573c48d3540fa9_923f8e56-6c98-4ee3-ba8a-adfc58e47387.webp?v=1714703781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d71a198c677e06985836c96b0573c48d3540fa9_923f8e56-6c98-4ee3-ba8a-adfc58e47387.webp?v=1714703781","width":2000},{"alt":null,"id":23875038085219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a516ada5f7f6352ee2ced9a57e2b4e7b49ea045_eb49e5e4-4ad3-4900-84df-476bb8286941.webp?v=1714703784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a516ada5f7f6352ee2ced9a57e2b4e7b49ea045_eb49e5e4-4ad3-4900-84df-476bb8286941.webp?v=1714703784","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41877085192291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31470133018723,"product_id":7407642443875,"position":5,"created_at":"2024-05-03T10:36:11+08:00","updated_at":"2024-05-03T10:36:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771","variant_ids":[41877085192291]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB28","featured_media":{"alt":null,"id":23875035922531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877085192291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31470133018723,"product_id":7407642443875,"position":5,"created_at":"2024-05-03T10:36:11+08:00","updated_at":"2024-05-03T10:36:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771","variant_ids":[41877085192291]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB28","featured_media":{"alt":null,"id":23875035922531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6f12d0138c14dad1bb9bd1da9bc7bce7d214295_da977f45-158f-4c1e-8a38-201061c33337.webp?v=1714703771"}},"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: "停產" }