$product = {"id":7408534028387,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Work Day","handle":"iphone-12-mini-mod-nx-printable-hq03","description":null,"published_at":"2024-06-11T16:39:57+08:00","created_at":"2024-05-03T15:45:18+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Pixel Jeff 皮傑","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-pixeljeff","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-pixeljeff","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":41886577983587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-HQ03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472523575395,"product_id":7408534028387,"position":9,"created_at":"2024-05-03T15:45:40+08:00","updated_at":"2024-05-03T15:45:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340","variant_ids":[41886577983587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Work Day - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HQ03","featured_media":{"alt":null,"id":23877440995427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d62fb529a586c70eaaffd9eba554e8061f144a_3264e623-f3f1-4bd0-89f5-093e065b7a14.webp?v=1714722321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4917cb8fcb90b40e8bd650c5b0a7a65f8554c3d9_0b8ea277-66d7-4982-bf36-a0890b241138.webp?v=1714722323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b07722d93140ee2c07e6734f34382b7849ff48ee_51d9d5c8-6da3-4919-9ba0-7d24c22dfbaa.webp?v=1714722325","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b754e0defe5244bf9cf55df552373d14ce4c64fb_25d28446-61b1-4c6e-870f-aacf93ebc843.webp?v=1714722328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e5460dfb9fa871fdafb8cccf0d2eaa07d6b1ac_c40e91cc-4bea-496c-8402-1d54fbb8ec07.webp?v=1714722330","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d37a1250de44a4640e49f7061a98b3c4afecff80_fd0f3055-3817-4b9f-aff3-2a1ad33cccf7.webp?v=1714722333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d7718405e3d60eb942f1a15213386b3a6e5b7b_73e0460d-97c5-4228-901a-d0686c371fa6.webp?v=1714722335","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b5a54cfca96a3b4d8018d3c1ff500ffd0d42f78_858d3079-ac27-46ed-9d97-8698b3f4119d.webp?v=1714722338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f00e522787d7a40001424236032724ca3034d484_0cba2af3-0ed9-4047-a91a-ef21c9d3c7f0.webp?v=1714722343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8edf22b1aec18ab205ad2bfec7f107eaba6be69_0a5d09bd-f86d-4a25-ad15-3205d5cf2966.webp?v=1714722346"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d62fb529a586c70eaaffd9eba554e8061f144a_3264e623-f3f1-4bd0-89f5-093e065b7a14.webp?v=1714722321","options":["color"],"media":[{"alt":null,"id":23877436080227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d62fb529a586c70eaaffd9eba554e8061f144a_3264e623-f3f1-4bd0-89f5-093e065b7a14.webp?v=1714722321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d62fb529a586c70eaaffd9eba554e8061f144a_3264e623-f3f1-4bd0-89f5-093e065b7a14.webp?v=1714722321","width":2000},{"alt":null,"id":23877436899427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4917cb8fcb90b40e8bd650c5b0a7a65f8554c3d9_0b8ea277-66d7-4982-bf36-a0890b241138.webp?v=1714722323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4917cb8fcb90b40e8bd650c5b0a7a65f8554c3d9_0b8ea277-66d7-4982-bf36-a0890b241138.webp?v=1714722323","width":2000},{"alt":null,"id":23877437423715,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b07722d93140ee2c07e6734f34382b7849ff48ee_51d9d5c8-6da3-4919-9ba0-7d24c22dfbaa.webp?v=1714722325"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b07722d93140ee2c07e6734f34382b7849ff48ee_51d9d5c8-6da3-4919-9ba0-7d24c22dfbaa.webp?v=1714722325","width":2000},{"alt":null,"id":23877437948003,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b754e0defe5244bf9cf55df552373d14ce4c64fb_25d28446-61b1-4c6e-870f-aacf93ebc843.webp?v=1714722328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b754e0defe5244bf9cf55df552373d14ce4c64fb_25d28446-61b1-4c6e-870f-aacf93ebc843.webp?v=1714722328","width":2000},{"alt":null,"id":23877438570595,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e5460dfb9fa871fdafb8cccf0d2eaa07d6b1ac_c40e91cc-4bea-496c-8402-1d54fbb8ec07.webp?v=1714722330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e5460dfb9fa871fdafb8cccf0d2eaa07d6b1ac_c40e91cc-4bea-496c-8402-1d54fbb8ec07.webp?v=1714722330","width":2000},{"alt":null,"id":23877439062115,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d37a1250de44a4640e49f7061a98b3c4afecff80_fd0f3055-3817-4b9f-aff3-2a1ad33cccf7.webp?v=1714722333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d37a1250de44a4640e49f7061a98b3c4afecff80_fd0f3055-3817-4b9f-aff3-2a1ad33cccf7.webp?v=1714722333","width":2000},{"alt":null,"id":23877439651939,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d7718405e3d60eb942f1a15213386b3a6e5b7b_73e0460d-97c5-4228-901a-d0686c371fa6.webp?v=1714722335"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d7718405e3d60eb942f1a15213386b3a6e5b7b_73e0460d-97c5-4228-901a-d0686c371fa6.webp?v=1714722335","width":2000},{"alt":null,"id":23877440536675,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b5a54cfca96a3b4d8018d3c1ff500ffd0d42f78_858d3079-ac27-46ed-9d97-8698b3f4119d.webp?v=1714722338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b5a54cfca96a3b4d8018d3c1ff500ffd0d42f78_858d3079-ac27-46ed-9d97-8698b3f4119d.webp?v=1714722338","width":2000},{"alt":null,"id":23877440995427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340","width":2000},{"alt":null,"id":23877441486947,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f00e522787d7a40001424236032724ca3034d484_0cba2af3-0ed9-4047-a91a-ef21c9d3c7f0.webp?v=1714722343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f00e522787d7a40001424236032724ca3034d484_0cba2af3-0ed9-4047-a91a-ef21c9d3c7f0.webp?v=1714722343","width":2000},{"alt":null,"id":23877441978467,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8edf22b1aec18ab205ad2bfec7f107eaba6be69_0a5d09bd-f86d-4a25-ad15-3205d5cf2966.webp?v=1714722346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8edf22b1aec18ab205ad2bfec7f107eaba6be69_0a5d09bd-f86d-4a25-ad15-3205d5cf2966.webp?v=1714722346","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886577983587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-HQ03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472523575395,"product_id":7408534028387,"position":9,"created_at":"2024-05-03T15:45:40+08:00","updated_at":"2024-05-03T15:45:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340","variant_ids":[41886577983587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Work Day - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HQ03","featured_media":{"alt":null,"id":23877440995427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886577983587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-HQ03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472523575395,"product_id":7408534028387,"position":9,"created_at":"2024-05-03T15:45:40+08:00","updated_at":"2024-05-03T15:45:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340","variant_ids":[41886577983587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Work Day - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HQ03","featured_media":{"alt":null,"id":23877440995427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e1b8074955d15b6e0e2894b2660b7565e9365fd_a710ea03-531f-4e9c-8a3a-73311061dfd9.webp?v=1714722340"}},"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: "停產" }