$product = {"id":7414969401443,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 鈦戰機-線條白","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb18","description":null,"published_at":"2024-06-11T17:54:26+08:00","created_at":"2024-05-05T19:57:45+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41910460809315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487804309603,"product_id":7414969401443,"position":4,"created_at":"2024-05-05T19:57:54+08:00","updated_at":"2024-05-05T19:57:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274","variant_ids":[41910460809315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 鈦戰機-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB18","featured_media":{"alt":null,"id":23893148237923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f2f66d7cfd67ce780ccd278162a15348fbd1aa9_ef0036a6-a00b-4c21-9d55-3b716509b3c7.webp?v=1714910267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb40366d8326f18f02baae7b4d78a359717357b_9bdb07c9-9c03-4e8b-8f74-116285d554ea.webp?v=1714910269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3104e021a9a39deeb9b74e76c4d33aa373b008f_0d67d8cb-bf14-43f8-a531-f9ffe551fb3d.webp?v=1714910271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ee177f89526de533f2328d036bb087cda93128a_dbd46bff-ba6f-4dfa-b6e2-9cbcee9415ae.webp?v=1714910276","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b249129fe08356a8a1c2bc836715b4404d968d7_73ef54dc-7598-4cf1-9199-188acda6e212.webp?v=1714910279","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c91087328a700ba00f30e23ec7e34463ebb8e7d_94b18e30-1f7a-4889-bbd5-5278e01ac3ce.webp?v=1714910281","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c1719c90db6291f089cb61257f3cd2a6b56664a_e5fd7c84-e1a8-438b-8d98-a797db274d71.webp?v=1714910283","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba42630eb512a3bb129f08af303f521c5a2c27e_eadbd87e-ac03-4071-9e56-c8d03b14ba24.webp?v=1714910285","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1869d4ef0d5d421187448ebdb21d29025dc2d09_e11679a2-c101-47d6-b94a-f12eb132c510.webp?v=1714910287","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc5c56e6ffbbd907af8f2cdd371bdddc7cb32145_85192f7b-008b-4bcb-913b-b0ef39e47812.webp?v=1714910290"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f2f66d7cfd67ce780ccd278162a15348fbd1aa9_ef0036a6-a00b-4c21-9d55-3b716509b3c7.webp?v=1714910267","options":["color"],"media":[{"alt":null,"id":23893146239075,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f2f66d7cfd67ce780ccd278162a15348fbd1aa9_ef0036a6-a00b-4c21-9d55-3b716509b3c7.webp?v=1714910267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f2f66d7cfd67ce780ccd278162a15348fbd1aa9_ef0036a6-a00b-4c21-9d55-3b716509b3c7.webp?v=1714910267","width":2000},{"alt":null,"id":23893146763363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb40366d8326f18f02baae7b4d78a359717357b_9bdb07c9-9c03-4e8b-8f74-116285d554ea.webp?v=1714910269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb40366d8326f18f02baae7b4d78a359717357b_9bdb07c9-9c03-4e8b-8f74-116285d554ea.webp?v=1714910269","width":2000},{"alt":null,"id":23893147222115,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3104e021a9a39deeb9b74e76c4d33aa373b008f_0d67d8cb-bf14-43f8-a531-f9ffe551fb3d.webp?v=1714910271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3104e021a9a39deeb9b74e76c4d33aa373b008f_0d67d8cb-bf14-43f8-a531-f9ffe551fb3d.webp?v=1714910271","width":2000},{"alt":null,"id":23893148237923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274","width":2000},{"alt":null,"id":23893148696675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ee177f89526de533f2328d036bb087cda93128a_dbd46bff-ba6f-4dfa-b6e2-9cbcee9415ae.webp?v=1714910276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ee177f89526de533f2328d036bb087cda93128a_dbd46bff-ba6f-4dfa-b6e2-9cbcee9415ae.webp?v=1714910276","width":2000},{"alt":null,"id":23893149188195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b249129fe08356a8a1c2bc836715b4404d968d7_73ef54dc-7598-4cf1-9199-188acda6e212.webp?v=1714910279"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b249129fe08356a8a1c2bc836715b4404d968d7_73ef54dc-7598-4cf1-9199-188acda6e212.webp?v=1714910279","width":2000},{"alt":null,"id":23893149909091,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c91087328a700ba00f30e23ec7e34463ebb8e7d_94b18e30-1f7a-4889-bbd5-5278e01ac3ce.webp?v=1714910281"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c91087328a700ba00f30e23ec7e34463ebb8e7d_94b18e30-1f7a-4889-bbd5-5278e01ac3ce.webp?v=1714910281","width":2000},{"alt":null,"id":23893150466147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c1719c90db6291f089cb61257f3cd2a6b56664a_e5fd7c84-e1a8-438b-8d98-a797db274d71.webp?v=1714910283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c1719c90db6291f089cb61257f3cd2a6b56664a_e5fd7c84-e1a8-438b-8d98-a797db274d71.webp?v=1714910283","width":2000},{"alt":null,"id":23893150990435,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba42630eb512a3bb129f08af303f521c5a2c27e_eadbd87e-ac03-4071-9e56-c8d03b14ba24.webp?v=1714910285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba42630eb512a3bb129f08af303f521c5a2c27e_eadbd87e-ac03-4071-9e56-c8d03b14ba24.webp?v=1714910285","width":2000},{"alt":null,"id":23893151383651,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1869d4ef0d5d421187448ebdb21d29025dc2d09_e11679a2-c101-47d6-b94a-f12eb132c510.webp?v=1714910287"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1869d4ef0d5d421187448ebdb21d29025dc2d09_e11679a2-c101-47d6-b94a-f12eb132c510.webp?v=1714910287","width":2000},{"alt":null,"id":23893152170083,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc5c56e6ffbbd907af8f2cdd371bdddc7cb32145_85192f7b-008b-4bcb-913b-b0ef39e47812.webp?v=1714910290"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc5c56e6ffbbd907af8f2cdd371bdddc7cb32145_85192f7b-008b-4bcb-913b-b0ef39e47812.webp?v=1714910290","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910460809315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487804309603,"product_id":7414969401443,"position":4,"created_at":"2024-05-05T19:57:54+08:00","updated_at":"2024-05-05T19:57:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274","variant_ids":[41910460809315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 鈦戰機-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB18","featured_media":{"alt":null,"id":23893148237923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910460809315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487804309603,"product_id":7414969401443,"position":4,"created_at":"2024-05-05T19:57:54+08:00","updated_at":"2024-05-05T19:57:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274","variant_ids":[41910460809315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 鈦戰機-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB18","featured_media":{"alt":null,"id":23893148237923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a5942b37515fdb4a3c71932bd090397fbacda1_ad33c558-3070-4c09-8f62-d0e155aaf6ba.webp?v=1714910274"}},"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: "停產" }