$product = {"id":7415095951459,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 右看看","handle":"iphone-12-mini-mod-nx-magsafe-printable-iv04","description":null,"published_at":"2024-06-11T17:57:51+08:00","created_at":"2024-05-05T20:22:00+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-1chun","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":41911824154723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488147587171,"product_id":7415095951459,"position":1,"created_at":"2024-05-05T20:22:02+08:00","updated_at":"2024-05-05T20:22:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722","variant_ids":[41911824154723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 右看看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV04","featured_media":{"alt":null,"id":23893492170851,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3be6dd1d6b379b25c280b77f6aacada910e87c8_c06ee7a9-eac8-4e33-bd2a-5f9cca3f14c0.webp?v=1714911724","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c469119f776bf4f0c1cd42be4f0729f02d5e0df1_cf36599b-e09a-4ad4-93ea-de2f52afa34e.webp?v=1714911727","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a86fbdec9c4a051c09c96d5f6457e7d1ec3483a_8dd5d584-2b85-4f59-b135-691a70d395fa.webp?v=1714911729","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3b3c9e4ed4613007e3339e9666a1f450975ac8_34dbeccf-d8e8-4f0a-aa46-665fc0338611.webp?v=1714911731","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d80e0d84bc70d56905bd2f33ef772d0b0e05dbed_501324d4-8089-4e70-9eb2-8fd7b3cb1428.webp?v=1714911734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8820da0d8d2ac96463f6e5dff629f688d2401cdf_7d79ea45-0fad-4d5b-8565-601ccf683397.webp?v=1714911736","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f56b2eda4103221d8081e0d276bc435ebe1277d9_45552796-fbcd-4414-88ca-8c198aca396d.webp?v=1714911738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9f274b15d76791cb29b3d81a437ee0724678b0_00ebecd7-79b3-4733-bf55-ac4154b794c1.webp?v=1714911741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a203fb142a79e7323283ff48ab2a6cced5e9d01_6bdfb7ca-b87d-4245-8829-707d73672566.webp?v=1714911743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b443d7f265d558fadf2bf475bfe0e783cd3f59e2_7ffa32c8-a96d-47f0-bf5b-e4a81ec36b44.webp?v=1714911746"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722","options":["color"],"media":[{"alt":null,"id":23893492170851,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722","width":2000},{"alt":null,"id":23893492564067,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3be6dd1d6b379b25c280b77f6aacada910e87c8_c06ee7a9-eac8-4e33-bd2a-5f9cca3f14c0.webp?v=1714911724"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3be6dd1d6b379b25c280b77f6aacada910e87c8_c06ee7a9-eac8-4e33-bd2a-5f9cca3f14c0.webp?v=1714911724","width":2000},{"alt":null,"id":23893493153891,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c469119f776bf4f0c1cd42be4f0729f02d5e0df1_cf36599b-e09a-4ad4-93ea-de2f52afa34e.webp?v=1714911727"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c469119f776bf4f0c1cd42be4f0729f02d5e0df1_cf36599b-e09a-4ad4-93ea-de2f52afa34e.webp?v=1714911727","width":2000},{"alt":null,"id":23893493776483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a86fbdec9c4a051c09c96d5f6457e7d1ec3483a_8dd5d584-2b85-4f59-b135-691a70d395fa.webp?v=1714911729"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a86fbdec9c4a051c09c96d5f6457e7d1ec3483a_8dd5d584-2b85-4f59-b135-691a70d395fa.webp?v=1714911729","width":2000},{"alt":null,"id":23893494300771,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3b3c9e4ed4613007e3339e9666a1f450975ac8_34dbeccf-d8e8-4f0a-aa46-665fc0338611.webp?v=1714911731"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3b3c9e4ed4613007e3339e9666a1f450975ac8_34dbeccf-d8e8-4f0a-aa46-665fc0338611.webp?v=1714911731","width":2000},{"alt":null,"id":23893494923363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d80e0d84bc70d56905bd2f33ef772d0b0e05dbed_501324d4-8089-4e70-9eb2-8fd7b3cb1428.webp?v=1714911734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d80e0d84bc70d56905bd2f33ef772d0b0e05dbed_501324d4-8089-4e70-9eb2-8fd7b3cb1428.webp?v=1714911734","width":2000},{"alt":null,"id":23893495677027,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8820da0d8d2ac96463f6e5dff629f688d2401cdf_7d79ea45-0fad-4d5b-8565-601ccf683397.webp?v=1714911736"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8820da0d8d2ac96463f6e5dff629f688d2401cdf_7d79ea45-0fad-4d5b-8565-601ccf683397.webp?v=1714911736","width":2000},{"alt":null,"id":23893496135779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f56b2eda4103221d8081e0d276bc435ebe1277d9_45552796-fbcd-4414-88ca-8c198aca396d.webp?v=1714911738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f56b2eda4103221d8081e0d276bc435ebe1277d9_45552796-fbcd-4414-88ca-8c198aca396d.webp?v=1714911738","width":2000},{"alt":null,"id":23893496856675,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9f274b15d76791cb29b3d81a437ee0724678b0_00ebecd7-79b3-4733-bf55-ac4154b794c1.webp?v=1714911741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9f274b15d76791cb29b3d81a437ee0724678b0_00ebecd7-79b3-4733-bf55-ac4154b794c1.webp?v=1714911741","width":2000},{"alt":null,"id":23893497282659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a203fb142a79e7323283ff48ab2a6cced5e9d01_6bdfb7ca-b87d-4245-8829-707d73672566.webp?v=1714911743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a203fb142a79e7323283ff48ab2a6cced5e9d01_6bdfb7ca-b87d-4245-8829-707d73672566.webp?v=1714911743","width":2000},{"alt":null,"id":23893497839715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b443d7f265d558fadf2bf475bfe0e783cd3f59e2_7ffa32c8-a96d-47f0-bf5b-e4a81ec36b44.webp?v=1714911746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b443d7f265d558fadf2bf475bfe0e783cd3f59e2_7ffa32c8-a96d-47f0-bf5b-e4a81ec36b44.webp?v=1714911746","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911824154723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488147587171,"product_id":7415095951459,"position":1,"created_at":"2024-05-05T20:22:02+08:00","updated_at":"2024-05-05T20:22:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722","variant_ids":[41911824154723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 右看看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV04","featured_media":{"alt":null,"id":23893492170851,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911824154723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488147587171,"product_id":7415095951459,"position":1,"created_at":"2024-05-05T20:22:02+08:00","updated_at":"2024-05-05T20:22:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722","variant_ids":[41911824154723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 右看看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV04","featured_media":{"alt":null,"id":23893492170851,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ed7c31b362f8929a5e0929d31408528e5ee26_25f2ef59-6778-478e-8fd9-389025d7567e.webp?v=1714911722"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }