$product = {"id":7408555130979,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 生日8","handle":"iphone-12-mini-mod-nx-printable-iv02","description":null,"published_at":"2024-06-11T16:40:34+08:00","created_at":"2024-05-03T15:49:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41886819385443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472579117155,"product_id":7408555130979,"position":4,"created_at":"2024-05-03T15:49:56+08:00","updated_at":"2024-05-03T15:49:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596","variant_ids":[41886819385443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 生日8 - 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-IV02","featured_media":{"alt":null,"id":23877496471651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e2f6237bb272167a736def94a4d4a8a70ee8df9_5fdf7922-c98b-4729-adde-820766393573.webp?v=1714722589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/963cffaf0c1f84b975cc0be3fa31d8b91977988b_2a352e54-e482-47f9-ae82-56482461cdf1.webp?v=1714722591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c6bd0705474c454f8b240c39efc70238ad1006_b92e80bd-b7b3-46f0-aab7-ec51c0bcc8c4.webp?v=1714722594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8422190de6bfdf33d556522527013097c3e05266_ea805f1b-05f3-421d-8e4d-50f6e6df345f.webp?v=1714722598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92ee57b68f9ee8a9f1e8ae548b00824c5cb88bfd_b9365e5a-7787-4036-9bbf-efa15dd6119f.webp?v=1714722601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52d479655ada4fee21e03a2f8a48f5fe0c8b7884_66ecde5c-8784-4167-958f-29124ae8e755.webp?v=1714722603","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89cb0dfc2f19087c2c8ce9ab90c00773e40ce541_9558a2e1-f57a-4580-aca7-fe7b13c1d2f9.webp?v=1714722606","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4335d840e1b15bf7faf8bb1960c5c51c869c22cf_0c2d2cee-336c-4e42-b52c-726490ae4ba9.webp?v=1714722608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efae2e9c8c6aec8ba7ba0d2de9dc22daf0431db2_97a5a1e7-a35c-4651-86d0-6c74846076dd.webp?v=1714722610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05639a3ee53a28ed73ffba0fbd332e20b8d169d2_bd2e054f-ee20-49cc-aede-8a6199adaef8.webp?v=1714722613"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e2f6237bb272167a736def94a4d4a8a70ee8df9_5fdf7922-c98b-4729-adde-820766393573.webp?v=1714722589","options":["color"],"media":[{"alt":null,"id":23877494997091,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e2f6237bb272167a736def94a4d4a8a70ee8df9_5fdf7922-c98b-4729-adde-820766393573.webp?v=1714722589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e2f6237bb272167a736def94a4d4a8a70ee8df9_5fdf7922-c98b-4729-adde-820766393573.webp?v=1714722589","width":2000},{"alt":null,"id":23877495488611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/963cffaf0c1f84b975cc0be3fa31d8b91977988b_2a352e54-e482-47f9-ae82-56482461cdf1.webp?v=1714722591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/963cffaf0c1f84b975cc0be3fa31d8b91977988b_2a352e54-e482-47f9-ae82-56482461cdf1.webp?v=1714722591","width":2000},{"alt":null,"id":23877495947363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c6bd0705474c454f8b240c39efc70238ad1006_b92e80bd-b7b3-46f0-aab7-ec51c0bcc8c4.webp?v=1714722594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c6bd0705474c454f8b240c39efc70238ad1006_b92e80bd-b7b3-46f0-aab7-ec51c0bcc8c4.webp?v=1714722594","width":2000},{"alt":null,"id":23877496471651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596","width":2000},{"alt":null,"id":23877497061475,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8422190de6bfdf33d556522527013097c3e05266_ea805f1b-05f3-421d-8e4d-50f6e6df345f.webp?v=1714722598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8422190de6bfdf33d556522527013097c3e05266_ea805f1b-05f3-421d-8e4d-50f6e6df345f.webp?v=1714722598","width":2000},{"alt":null,"id":23877497552995,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92ee57b68f9ee8a9f1e8ae548b00824c5cb88bfd_b9365e5a-7787-4036-9bbf-efa15dd6119f.webp?v=1714722601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92ee57b68f9ee8a9f1e8ae548b00824c5cb88bfd_b9365e5a-7787-4036-9bbf-efa15dd6119f.webp?v=1714722601","width":2000},{"alt":null,"id":23877498077283,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52d479655ada4fee21e03a2f8a48f5fe0c8b7884_66ecde5c-8784-4167-958f-29124ae8e755.webp?v=1714722603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52d479655ada4fee21e03a2f8a48f5fe0c8b7884_66ecde5c-8784-4167-958f-29124ae8e755.webp?v=1714722603","width":2000},{"alt":null,"id":23877498536035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89cb0dfc2f19087c2c8ce9ab90c00773e40ce541_9558a2e1-f57a-4580-aca7-fe7b13c1d2f9.webp?v=1714722606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89cb0dfc2f19087c2c8ce9ab90c00773e40ce541_9558a2e1-f57a-4580-aca7-fe7b13c1d2f9.webp?v=1714722606","width":2000},{"alt":null,"id":23877498994787,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4335d840e1b15bf7faf8bb1960c5c51c869c22cf_0c2d2cee-336c-4e42-b52c-726490ae4ba9.webp?v=1714722608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4335d840e1b15bf7faf8bb1960c5c51c869c22cf_0c2d2cee-336c-4e42-b52c-726490ae4ba9.webp?v=1714722608","width":2000},{"alt":null,"id":23877499388003,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efae2e9c8c6aec8ba7ba0d2de9dc22daf0431db2_97a5a1e7-a35c-4651-86d0-6c74846076dd.webp?v=1714722610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efae2e9c8c6aec8ba7ba0d2de9dc22daf0431db2_97a5a1e7-a35c-4651-86d0-6c74846076dd.webp?v=1714722610","width":2000},{"alt":null,"id":23877500174435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05639a3ee53a28ed73ffba0fbd332e20b8d169d2_bd2e054f-ee20-49cc-aede-8a6199adaef8.webp?v=1714722613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05639a3ee53a28ed73ffba0fbd332e20b8d169d2_bd2e054f-ee20-49cc-aede-8a6199adaef8.webp?v=1714722613","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886819385443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472579117155,"product_id":7408555130979,"position":4,"created_at":"2024-05-03T15:49:56+08:00","updated_at":"2024-05-03T15:49:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596","variant_ids":[41886819385443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 生日8 - 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-IV02","featured_media":{"alt":null,"id":23877496471651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886819385443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472579117155,"product_id":7408555130979,"position":4,"created_at":"2024-05-03T15:49:56+08:00","updated_at":"2024-05-03T15:49:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596","variant_ids":[41886819385443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 生日8 - 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-IV02","featured_media":{"alt":null,"id":23877496471651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864dd8253cae6c6237e39a0daf31cb0332178718_a2036e76-d6b4-436c-b0d2-81d0df57471d.webp?v=1714722596"}},"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: "停產" }