$product = {"id":7416027840611,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 兔子電腦","handle":"iphone-xs-max-mod-nx-printable-mw06","description":null,"published_at":"2024-06-11T16:50:48+08:00","created_at":"2024-05-06T12:44:48+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone XS Max","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-chi-po-lin-series","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":41916657172579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491022684259,"product_id":7416027840611,"position":3,"created_at":"2024-05-06T12:44:56+08:00","updated_at":"2024-05-06T12:44:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696","variant_ids":[41916657172579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 兔子電腦 - 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":"NPB0108624-MW06","featured_media":{"alt":null,"id":23896429920355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268f090aa25876ae10125b4d0f4be574ba19965f_814a50dd-5fb2-4f7d-9aff-6a8875af2eda.webp?v=1714970691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1cbd7a772595b9493490339346b2fc61ce5f14c_b63d9505-f441-4257-a7c0-a6223b2899f7.webp?v=1714970693","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d286ef4f6adb854c0cd66bca80107c8d7fd253af_d0198014-845d-4fb4-9f36-c60ea92fbcfe.webp?v=1714970698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/004684f432662a6c778f7c9467222ab28a7ab462_48814807-245a-4ee1-9198-0c49a226cd70.webp?v=1714970700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50de5c7ecace9963cf91b5e61984318ebe6cd38c_217ea0c8-d72d-42a7-820f-2743f9dabe44.webp?v=1714970703","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2016b4237a5ac8de270b936399b98743033b55f3_7eb55816-9744-4ae0-9a96-c03e69966328.webp?v=1714970705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/def6233b7296aca60eb62a3520d12aeb6c5e3cb3_3037b422-184b-4298-8977-4a0b51e475d6.webp?v=1714970707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b166c1b2d265bfe516255b8da0ce9d827980d888_3e829dce-58f8-4d79-bb45-4cebb1b072f6.webp?v=1714970710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0f2fb14b68b3591b24cbbf049b2efa320ce3e33_b53ec125-f29a-42d8-817b-b4ae4b1f04f7.webp?v=1714970712"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268f090aa25876ae10125b4d0f4be574ba19965f_814a50dd-5fb2-4f7d-9aff-6a8875af2eda.webp?v=1714970691","options":["color"],"media":[{"alt":null,"id":23896428380259,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268f090aa25876ae10125b4d0f4be574ba19965f_814a50dd-5fb2-4f7d-9aff-6a8875af2eda.webp?v=1714970691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268f090aa25876ae10125b4d0f4be574ba19965f_814a50dd-5fb2-4f7d-9aff-6a8875af2eda.webp?v=1714970691","width":2000},{"alt":null,"id":23896429101155,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1cbd7a772595b9493490339346b2fc61ce5f14c_b63d9505-f441-4257-a7c0-a6223b2899f7.webp?v=1714970693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1cbd7a772595b9493490339346b2fc61ce5f14c_b63d9505-f441-4257-a7c0-a6223b2899f7.webp?v=1714970693","width":2000},{"alt":null,"id":23896429920355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696","width":2000},{"alt":null,"id":23896430379107,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d286ef4f6adb854c0cd66bca80107c8d7fd253af_d0198014-845d-4fb4-9f36-c60ea92fbcfe.webp?v=1714970698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d286ef4f6adb854c0cd66bca80107c8d7fd253af_d0198014-845d-4fb4-9f36-c60ea92fbcfe.webp?v=1714970698","width":2000},{"alt":null,"id":23896430936163,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/004684f432662a6c778f7c9467222ab28a7ab462_48814807-245a-4ee1-9198-0c49a226cd70.webp?v=1714970700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/004684f432662a6c778f7c9467222ab28a7ab462_48814807-245a-4ee1-9198-0c49a226cd70.webp?v=1714970700","width":2000},{"alt":null,"id":23896431558755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50de5c7ecace9963cf91b5e61984318ebe6cd38c_217ea0c8-d72d-42a7-820f-2743f9dabe44.webp?v=1714970703"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50de5c7ecace9963cf91b5e61984318ebe6cd38c_217ea0c8-d72d-42a7-820f-2743f9dabe44.webp?v=1714970703","width":2000},{"alt":null,"id":23896432148579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2016b4237a5ac8de270b936399b98743033b55f3_7eb55816-9744-4ae0-9a96-c03e69966328.webp?v=1714970705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2016b4237a5ac8de270b936399b98743033b55f3_7eb55816-9744-4ae0-9a96-c03e69966328.webp?v=1714970705","width":2000},{"alt":null,"id":23896432672867,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/def6233b7296aca60eb62a3520d12aeb6c5e3cb3_3037b422-184b-4298-8977-4a0b51e475d6.webp?v=1714970707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/def6233b7296aca60eb62a3520d12aeb6c5e3cb3_3037b422-184b-4298-8977-4a0b51e475d6.webp?v=1714970707","width":2000},{"alt":null,"id":23896433131619,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b166c1b2d265bfe516255b8da0ce9d827980d888_3e829dce-58f8-4d79-bb45-4cebb1b072f6.webp?v=1714970710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b166c1b2d265bfe516255b8da0ce9d827980d888_3e829dce-58f8-4d79-bb45-4cebb1b072f6.webp?v=1714970710","width":2000},{"alt":null,"id":23896433655907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0f2fb14b68b3591b24cbbf049b2efa320ce3e33_b53ec125-f29a-42d8-817b-b4ae4b1f04f7.webp?v=1714970712"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0f2fb14b68b3591b24cbbf049b2efa320ce3e33_b53ec125-f29a-42d8-817b-b4ae4b1f04f7.webp?v=1714970712","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916657172579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491022684259,"product_id":7416027840611,"position":3,"created_at":"2024-05-06T12:44:56+08:00","updated_at":"2024-05-06T12:44:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696","variant_ids":[41916657172579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 兔子電腦 - 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":"NPB0108624-MW06","featured_media":{"alt":null,"id":23896429920355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916657172579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491022684259,"product_id":7416027840611,"position":3,"created_at":"2024-05-06T12:44:56+08:00","updated_at":"2024-05-06T12:44:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696","variant_ids":[41916657172579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 兔子電腦 - 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":"NPB0108624-MW06","featured_media":{"alt":null,"id":23896429920355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32a4542955d8ef2a5ee7a367bb04ab1e4442c943_a2d6547e-a17a-4ec2-a8ee-7a0be129b579.webp?v=1714970696"}},"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: "停產" }