$product = {"id":7411339460707,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 大自然的傑作(錫安國家公園)","handle":"iphone-14-plus-mod-nx-magsafe-printable-af14","description":null,"published_at":"2024-06-11T17:42:17+08:00","created_at":"2024-05-05T00:10:28+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41897645080675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31480176312419,"product_id":7411339460707,"position":2,"created_at":"2024-05-05T00:10:33+08:00","updated_at":"2024-05-05T00:10:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033","variant_ids":[41897645080675]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 大自然的傑作(錫安國家公園) - 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":"MPB0126124-AF14","featured_media":{"alt":null,"id":23885427507299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d05fe87093f82d3b40faeecd801ed2c177b8fe3_d0d5d5de-108b-4070-9f7b-7812f2351489.webp?v=1714839031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50e3c55164c0352a1d4950b47197620ae9b95ce7_51bce08b-4ad4-4b1d-bbed-2139deaf3ee3.webp?v=1714839036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96015d838a27875114a11350f283a3762c3b0dd7_bb23ae79-0abf-4123-ad1d-a1ae78c5466b.webp?v=1714839038","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1cfeb004ffe1d998b86988dc86b10ed5db4b1c5_43f50300-7ec7-40bf-bc00-2807b56b2562.webp?v=1714839041","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/703b249c2f416fd3844854d8157dbf16cebf4374_f4747ffa-c4c1-48f3-9932-63de1d047dca.webp?v=1714839044","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/697997c9efcc0e4a8969cb560ad9d89feca081b0_b7b3c7ec-a59a-4619-a091-38cc3b9f639f.webp?v=1714839046","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c1355553cfc40c5270fe48bbed01da3b1cc7394_3bb00b7b-658e-4b37-98a4-96c54e631f75.webp?v=1714839049","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/612ed1212ee4b74326639ec998c97c8a0b2c2752_0f7f50ed-0b94-4c1a-9c3e-814e34296583.webp?v=1714839051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457139fdd17fb1975ad15149a7c6f57240e5cf14_b597e6ce-d454-4a56-9559-e286e70f3c9d.webp?v=1714839054"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d05fe87093f82d3b40faeecd801ed2c177b8fe3_d0d5d5de-108b-4070-9f7b-7812f2351489.webp?v=1714839031","options":["color"],"media":[{"alt":null,"id":23885426950243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d05fe87093f82d3b40faeecd801ed2c177b8fe3_d0d5d5de-108b-4070-9f7b-7812f2351489.webp?v=1714839031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d05fe87093f82d3b40faeecd801ed2c177b8fe3_d0d5d5de-108b-4070-9f7b-7812f2351489.webp?v=1714839031","width":2000},{"alt":null,"id":23885427507299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033","width":2000},{"alt":null,"id":23885427998819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50e3c55164c0352a1d4950b47197620ae9b95ce7_51bce08b-4ad4-4b1d-bbed-2139deaf3ee3.webp?v=1714839036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50e3c55164c0352a1d4950b47197620ae9b95ce7_51bce08b-4ad4-4b1d-bbed-2139deaf3ee3.webp?v=1714839036","width":2000},{"alt":null,"id":23885428686947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96015d838a27875114a11350f283a3762c3b0dd7_bb23ae79-0abf-4123-ad1d-a1ae78c5466b.webp?v=1714839038"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96015d838a27875114a11350f283a3762c3b0dd7_bb23ae79-0abf-4123-ad1d-a1ae78c5466b.webp?v=1714839038","width":2000},{"alt":null,"id":23885429244003,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1cfeb004ffe1d998b86988dc86b10ed5db4b1c5_43f50300-7ec7-40bf-bc00-2807b56b2562.webp?v=1714839041"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1cfeb004ffe1d998b86988dc86b10ed5db4b1c5_43f50300-7ec7-40bf-bc00-2807b56b2562.webp?v=1714839041","width":2000},{"alt":null,"id":23885429735523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/703b249c2f416fd3844854d8157dbf16cebf4374_f4747ffa-c4c1-48f3-9932-63de1d047dca.webp?v=1714839044"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/703b249c2f416fd3844854d8157dbf16cebf4374_f4747ffa-c4c1-48f3-9932-63de1d047dca.webp?v=1714839044","width":2000},{"alt":null,"id":23885430325347,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/697997c9efcc0e4a8969cb560ad9d89feca081b0_b7b3c7ec-a59a-4619-a091-38cc3b9f639f.webp?v=1714839046"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/697997c9efcc0e4a8969cb560ad9d89feca081b0_b7b3c7ec-a59a-4619-a091-38cc3b9f639f.webp?v=1714839046","width":2000},{"alt":null,"id":23885430784099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c1355553cfc40c5270fe48bbed01da3b1cc7394_3bb00b7b-658e-4b37-98a4-96c54e631f75.webp?v=1714839049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c1355553cfc40c5270fe48bbed01da3b1cc7394_3bb00b7b-658e-4b37-98a4-96c54e631f75.webp?v=1714839049","width":2000},{"alt":null,"id":23885431210083,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/612ed1212ee4b74326639ec998c97c8a0b2c2752_0f7f50ed-0b94-4c1a-9c3e-814e34296583.webp?v=1714839051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/612ed1212ee4b74326639ec998c97c8a0b2c2752_0f7f50ed-0b94-4c1a-9c3e-814e34296583.webp?v=1714839051","width":2000},{"alt":null,"id":23885431865443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457139fdd17fb1975ad15149a7c6f57240e5cf14_b597e6ce-d454-4a56-9559-e286e70f3c9d.webp?v=1714839054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457139fdd17fb1975ad15149a7c6f57240e5cf14_b597e6ce-d454-4a56-9559-e286e70f3c9d.webp?v=1714839054","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41897645080675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31480176312419,"product_id":7411339460707,"position":2,"created_at":"2024-05-05T00:10:33+08:00","updated_at":"2024-05-05T00:10:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033","variant_ids":[41897645080675]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 大自然的傑作(錫安國家公園) - 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":"MPB0126124-AF14","featured_media":{"alt":null,"id":23885427507299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41897645080675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31480176312419,"product_id":7411339460707,"position":2,"created_at":"2024-05-05T00:10:33+08:00","updated_at":"2024-05-05T00:10:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033","variant_ids":[41897645080675]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 大自然的傑作(錫安國家公園) - 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":"MPB0126124-AF14","featured_media":{"alt":null,"id":23885427507299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c1b0e9688b7476e08ff6ccdf0e5d86d0de0348c_2caa1103-afae-4c0e-a3f9-27caff2b5982.webp?v=1714839033"}},"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: "停產" }