$product = {"id":7411436650595,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 大自然的傑作(優勝美地國家公園)","handle":"iphone-14-plus-mod-nx-magsafe-printable-af13","description":null,"published_at":"2024-06-11T17:44:59+08:00","created_at":"2024-05-05T00:29:41+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":41898882039907,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31480425021539,"product_id":7411436650595,"position":7,"created_at":"2024-05-05T00:29:58+08:00","updated_at":"2024-05-05T00:29:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198","variant_ids":[41898882039907]},"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-AF13","featured_media":{"alt":null,"id":23885676740707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a8d0854f14d42792ef5356a46eaac387f88a8b2_1f7ed832-0249-4483-a1fc-a1f660562e26.webp?v=1714840183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e84775f2bb7bdcf3d436d1289bb26feb58ac1307_2755c978-615b-42fe-bebb-5b9dc744264a.webp?v=1714840186","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9ac89b91ec16174068b190647e020c5dfccdc59_6199a3aa-0d51-4a70-9ac5-bad3238409f3.webp?v=1714840188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/234c30cdafcea23358bd22494b6adaafb5d7f352_3e863aaf-e16a-479b-ba4f-f95342fbc273.webp?v=1714840191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bead3e9ac11c08ba3cbae2c3a681baf5e76a22f3_d74ba611-f8c1-4c4a-92b3-d4aa385ad71a.webp?v=1714840194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0117801fff7909ab461c8945cc8d15abe36a8de5_c26b54de-dd96-4309-901d-73cde6b40663.webp?v=1714840196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ef5c95ad3d4ec1c8fac33b61aac332827f48529_f4874b2d-1455-4bb4-be30-578f7f6b12ba.webp?v=1714840201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fc4b2ec4c9da4683fa4a707b739b36882823079_e861de0f-9170-45e0-82d0-64d80f6fc3ab.webp?v=1714840203","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34ebcfc78f83bbe9e5d0f5802d3f1e257f9d1f1_1272bd98-1063-4b99-b675-2461dcb9adfa.webp?v=1714840206"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a8d0854f14d42792ef5356a46eaac387f88a8b2_1f7ed832-0249-4483-a1fc-a1f660562e26.webp?v=1714840183","options":["color"],"media":[{"alt":null,"id":23885674250339,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a8d0854f14d42792ef5356a46eaac387f88a8b2_1f7ed832-0249-4483-a1fc-a1f660562e26.webp?v=1714840183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a8d0854f14d42792ef5356a46eaac387f88a8b2_1f7ed832-0249-4483-a1fc-a1f660562e26.webp?v=1714840183","width":2000},{"alt":null,"id":23885674709091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e84775f2bb7bdcf3d436d1289bb26feb58ac1307_2755c978-615b-42fe-bebb-5b9dc744264a.webp?v=1714840186"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e84775f2bb7bdcf3d436d1289bb26feb58ac1307_2755c978-615b-42fe-bebb-5b9dc744264a.webp?v=1714840186","width":2000},{"alt":null,"id":23885675135075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9ac89b91ec16174068b190647e020c5dfccdc59_6199a3aa-0d51-4a70-9ac5-bad3238409f3.webp?v=1714840188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9ac89b91ec16174068b190647e020c5dfccdc59_6199a3aa-0d51-4a70-9ac5-bad3238409f3.webp?v=1714840188","width":2000},{"alt":null,"id":23885675593827,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/234c30cdafcea23358bd22494b6adaafb5d7f352_3e863aaf-e16a-479b-ba4f-f95342fbc273.webp?v=1714840191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/234c30cdafcea23358bd22494b6adaafb5d7f352_3e863aaf-e16a-479b-ba4f-f95342fbc273.webp?v=1714840191","width":2000},{"alt":null,"id":23885675855971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bead3e9ac11c08ba3cbae2c3a681baf5e76a22f3_d74ba611-f8c1-4c4a-92b3-d4aa385ad71a.webp?v=1714840194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bead3e9ac11c08ba3cbae2c3a681baf5e76a22f3_d74ba611-f8c1-4c4a-92b3-d4aa385ad71a.webp?v=1714840194","width":2000},{"alt":null,"id":23885676314723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0117801fff7909ab461c8945cc8d15abe36a8de5_c26b54de-dd96-4309-901d-73cde6b40663.webp?v=1714840196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0117801fff7909ab461c8945cc8d15abe36a8de5_c26b54de-dd96-4309-901d-73cde6b40663.webp?v=1714840196","width":2000},{"alt":null,"id":23885676740707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198","width":2000},{"alt":null,"id":23885677494371,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ef5c95ad3d4ec1c8fac33b61aac332827f48529_f4874b2d-1455-4bb4-be30-578f7f6b12ba.webp?v=1714840201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ef5c95ad3d4ec1c8fac33b61aac332827f48529_f4874b2d-1455-4bb4-be30-578f7f6b12ba.webp?v=1714840201","width":2000},{"alt":null,"id":23885677822051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fc4b2ec4c9da4683fa4a707b739b36882823079_e861de0f-9170-45e0-82d0-64d80f6fc3ab.webp?v=1714840203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fc4b2ec4c9da4683fa4a707b739b36882823079_e861de0f-9170-45e0-82d0-64d80f6fc3ab.webp?v=1714840203","width":2000},{"alt":null,"id":23885678313571,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34ebcfc78f83bbe9e5d0f5802d3f1e257f9d1f1_1272bd98-1063-4b99-b675-2461dcb9adfa.webp?v=1714840206"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34ebcfc78f83bbe9e5d0f5802d3f1e257f9d1f1_1272bd98-1063-4b99-b675-2461dcb9adfa.webp?v=1714840206","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41898882039907,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31480425021539,"product_id":7411436650595,"position":7,"created_at":"2024-05-05T00:29:58+08:00","updated_at":"2024-05-05T00:29:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198","variant_ids":[41898882039907]},"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-AF13","featured_media":{"alt":null,"id":23885676740707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41898882039907,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31480425021539,"product_id":7411436650595,"position":7,"created_at":"2024-05-05T00:29:58+08:00","updated_at":"2024-05-05T00:29:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198","variant_ids":[41898882039907]},"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-AF13","featured_media":{"alt":null,"id":23885676740707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29585c81705fa12846297578b790ce845bb7c753_d0e2a8f8-b6ce-44fb-93ae-134c918c544a.webp?v=1714840198"}},"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: "停產" }