$product = {"id":7411270254691,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 願傷疤 有天開出花(加州野火)","handle":"iphone-14-plus-mod-nx-magsafe-printable-af03","description":null,"published_at":"2024-06-11T17:40:25+08:00","created_at":"2024-05-04T23:57:29+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":41896777318499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31480010473571,"product_id":7411270254691,"position":5,"created_at":"2024-05-04T23:57:41+08:00","updated_at":"2024-05-04T23:57:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261","variant_ids":[41896777318499]},"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-AF03","featured_media":{"alt":null,"id":23885261013091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0fe9bb3f2eb8472020c112c42dd37630389beb1_4238358b-ebcd-4656-a544-e1b1673127f5.webp?v=1714838251","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be402827bbd507ecb7d368977f3049206747093e_8f447453-a363-447f-b1ae-7b59c3728a6f.webp?v=1714838254","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae0bf37b305abef832a78585499b2c76a4f805f_ef8936ec-5df5-4b2f-af8c-9e4ab953a34d.webp?v=1714838257","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67996ec7bfe0dcdc547f156cc5d46f029fe95ce_f35ec916-dbca-43da-876d-800f2c98e4a3.webp?v=1714838259","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/829d07f4b9c0c80c33e35b965ff057c7b479b3b0_14f0cf4c-985f-496d-be03-b00861f52be0.webp?v=1714838264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d06e2ebf1c424e6c95b457368432d9b653cbb2_f269bf11-961b-46a7-8a3a-984d04ba2579.webp?v=1714838266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df34275069ca9d75d991ab779198d3b579022960_6ab08671-20e5-4a94-94a5-65c54ac25fe0.webp?v=1714838269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54014fcdca0cb9091a7dbe4b85f4d82ccc2ddb1d_93f5bd4a-5c47-46ee-b85c-3b3e4c2da364.webp?v=1714838271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cf1c73048d9706f8b037b36d7f55d885d06f12b_ad7febb0-f703-4b73-80c8-04be3e29bad0.webp?v=1714838274"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0fe9bb3f2eb8472020c112c42dd37630389beb1_4238358b-ebcd-4656-a544-e1b1673127f5.webp?v=1714838251","options":["color"],"media":[{"alt":null,"id":23885258981475,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0fe9bb3f2eb8472020c112c42dd37630389beb1_4238358b-ebcd-4656-a544-e1b1673127f5.webp?v=1714838251"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0fe9bb3f2eb8472020c112c42dd37630389beb1_4238358b-ebcd-4656-a544-e1b1673127f5.webp?v=1714838251","width":2000},{"alt":null,"id":23885259472995,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be402827bbd507ecb7d368977f3049206747093e_8f447453-a363-447f-b1ae-7b59c3728a6f.webp?v=1714838254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be402827bbd507ecb7d368977f3049206747093e_8f447453-a363-447f-b1ae-7b59c3728a6f.webp?v=1714838254","width":2000},{"alt":null,"id":23885260062819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae0bf37b305abef832a78585499b2c76a4f805f_ef8936ec-5df5-4b2f-af8c-9e4ab953a34d.webp?v=1714838257"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae0bf37b305abef832a78585499b2c76a4f805f_ef8936ec-5df5-4b2f-af8c-9e4ab953a34d.webp?v=1714838257","width":2000},{"alt":null,"id":23885260652643,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67996ec7bfe0dcdc547f156cc5d46f029fe95ce_f35ec916-dbca-43da-876d-800f2c98e4a3.webp?v=1714838259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d67996ec7bfe0dcdc547f156cc5d46f029fe95ce_f35ec916-dbca-43da-876d-800f2c98e4a3.webp?v=1714838259","width":2000},{"alt":null,"id":23885261013091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261","width":2000},{"alt":null,"id":23885261799523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/829d07f4b9c0c80c33e35b965ff057c7b479b3b0_14f0cf4c-985f-496d-be03-b00861f52be0.webp?v=1714838264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/829d07f4b9c0c80c33e35b965ff057c7b479b3b0_14f0cf4c-985f-496d-be03-b00861f52be0.webp?v=1714838264","width":2000},{"alt":null,"id":23885262454883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d06e2ebf1c424e6c95b457368432d9b653cbb2_f269bf11-961b-46a7-8a3a-984d04ba2579.webp?v=1714838266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d06e2ebf1c424e6c95b457368432d9b653cbb2_f269bf11-961b-46a7-8a3a-984d04ba2579.webp?v=1714838266","width":2000},{"alt":null,"id":23885263044707,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df34275069ca9d75d991ab779198d3b579022960_6ab08671-20e5-4a94-94a5-65c54ac25fe0.webp?v=1714838269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df34275069ca9d75d991ab779198d3b579022960_6ab08671-20e5-4a94-94a5-65c54ac25fe0.webp?v=1714838269","width":2000},{"alt":null,"id":23885263536227,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54014fcdca0cb9091a7dbe4b85f4d82ccc2ddb1d_93f5bd4a-5c47-46ee-b85c-3b3e4c2da364.webp?v=1714838271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54014fcdca0cb9091a7dbe4b85f4d82ccc2ddb1d_93f5bd4a-5c47-46ee-b85c-3b3e4c2da364.webp?v=1714838271","width":2000},{"alt":null,"id":23885264093283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cf1c73048d9706f8b037b36d7f55d885d06f12b_ad7febb0-f703-4b73-80c8-04be3e29bad0.webp?v=1714838274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cf1c73048d9706f8b037b36d7f55d885d06f12b_ad7febb0-f703-4b73-80c8-04be3e29bad0.webp?v=1714838274","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896777318499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31480010473571,"product_id":7411270254691,"position":5,"created_at":"2024-05-04T23:57:41+08:00","updated_at":"2024-05-04T23:57:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261","variant_ids":[41896777318499]},"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-AF03","featured_media":{"alt":null,"id":23885261013091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896777318499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31480010473571,"product_id":7411270254691,"position":5,"created_at":"2024-05-04T23:57:41+08:00","updated_at":"2024-05-04T23:57:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261","variant_ids":[41896777318499]},"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-AF03","featured_media":{"alt":null,"id":23885261013091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/758994ad49be356f7daa7ff1429fc6ecd7fabad8_3fe3c842-b85c-45b7-bda6-0a4796329b30.webp?v=1714838261"}},"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: "停產" }