$product = {"id":7414977036387,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X戰機-線條白","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pb16","description":null,"published_at":"2024-06-11T17:54:39+08:00","created_at":"2024-05-05T19:59:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41910545776739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31487827542115,"product_id":7414977036387,"position":5,"created_at":"2024-05-05T19:59:33+08:00","updated_at":"2024-05-05T19:59:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373","variant_ids":[41910545776739]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB16","featured_media":{"alt":null,"id":23893171535971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c40eb4ad39543cfc21a18787dc5ab70a4ddcbd_1e161939-817a-4359-9cd6-6c90fbfb4c7a.webp?v=1714910364","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2161263728e548a4f46c72c65b7950a00aefb32a_519d66eb-50e5-43e1-b96a-255058d34f50.webp?v=1714910366","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6dc93e407caaed925f2975d76687bc82992591a9_f20d2cc6-7f13-42d2-83a2-c7d6e4d1f911.webp?v=1714910368","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffadeddf23378d832c09c6c271a86d8b9128789c_e9108e11-77b6-42cb-9b73-559ee3f04f36.webp?v=1714910371","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a16dd4a1ae02e46ff05cccc3788e79d5f4d65fa_3f411558-b237-4732-a643-9d52251a8695.webp?v=1714910376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff26a5c03cd536883148d21d4607167425b1c2ce_f067d424-a3d3-427f-b662-941f57e4c0c6.webp?v=1714910378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3be3808f0394ddcde20e40d7d13ccd0f977f261_33c4ecd0-e6da-4305-8d6e-9b1c569052b1.webp?v=1714910380","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b70fa7e5dfeb56b0897d701d8936e84ad1d80a37_70e6eabd-4a04-45cc-bd19-f7ad2b14f989.webp?v=1714910383","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/698b1e800513764ab0ae7890c39979a49c993dc3_ea459ede-d36d-40ad-9296-9dbea90fa17c.webp?v=1714910385"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c40eb4ad39543cfc21a18787dc5ab70a4ddcbd_1e161939-817a-4359-9cd6-6c90fbfb4c7a.webp?v=1714910364","options":["color"],"media":[{"alt":null,"id":23893169602659,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c40eb4ad39543cfc21a18787dc5ab70a4ddcbd_1e161939-817a-4359-9cd6-6c90fbfb4c7a.webp?v=1714910364"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c40eb4ad39543cfc21a18787dc5ab70a4ddcbd_1e161939-817a-4359-9cd6-6c90fbfb4c7a.webp?v=1714910364","width":2000},{"alt":null,"id":23893170290787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2161263728e548a4f46c72c65b7950a00aefb32a_519d66eb-50e5-43e1-b96a-255058d34f50.webp?v=1714910366"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2161263728e548a4f46c72c65b7950a00aefb32a_519d66eb-50e5-43e1-b96a-255058d34f50.webp?v=1714910366","width":2000},{"alt":null,"id":23893170585699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6dc93e407caaed925f2975d76687bc82992591a9_f20d2cc6-7f13-42d2-83a2-c7d6e4d1f911.webp?v=1714910368"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6dc93e407caaed925f2975d76687bc82992591a9_f20d2cc6-7f13-42d2-83a2-c7d6e4d1f911.webp?v=1714910368","width":2000},{"alt":null,"id":23893171044451,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffadeddf23378d832c09c6c271a86d8b9128789c_e9108e11-77b6-42cb-9b73-559ee3f04f36.webp?v=1714910371"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffadeddf23378d832c09c6c271a86d8b9128789c_e9108e11-77b6-42cb-9b73-559ee3f04f36.webp?v=1714910371","width":2000},{"alt":null,"id":23893171535971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373","width":2000},{"alt":null,"id":23893171961955,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a16dd4a1ae02e46ff05cccc3788e79d5f4d65fa_3f411558-b237-4732-a643-9d52251a8695.webp?v=1714910376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a16dd4a1ae02e46ff05cccc3788e79d5f4d65fa_3f411558-b237-4732-a643-9d52251a8695.webp?v=1714910376","width":2000},{"alt":null,"id":23893172682851,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff26a5c03cd536883148d21d4607167425b1c2ce_f067d424-a3d3-427f-b662-941f57e4c0c6.webp?v=1714910378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff26a5c03cd536883148d21d4607167425b1c2ce_f067d424-a3d3-427f-b662-941f57e4c0c6.webp?v=1714910378","width":2000},{"alt":null,"id":23893173141603,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3be3808f0394ddcde20e40d7d13ccd0f977f261_33c4ecd0-e6da-4305-8d6e-9b1c569052b1.webp?v=1714910380"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3be3808f0394ddcde20e40d7d13ccd0f977f261_33c4ecd0-e6da-4305-8d6e-9b1c569052b1.webp?v=1714910380","width":2000},{"alt":null,"id":23893173665891,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b70fa7e5dfeb56b0897d701d8936e84ad1d80a37_70e6eabd-4a04-45cc-bd19-f7ad2b14f989.webp?v=1714910383"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b70fa7e5dfeb56b0897d701d8936e84ad1d80a37_70e6eabd-4a04-45cc-bd19-f7ad2b14f989.webp?v=1714910383","width":2000},{"alt":null,"id":23893174091875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/698b1e800513764ab0ae7890c39979a49c993dc3_ea459ede-d36d-40ad-9296-9dbea90fa17c.webp?v=1714910385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/698b1e800513764ab0ae7890c39979a49c993dc3_ea459ede-d36d-40ad-9296-9dbea90fa17c.webp?v=1714910385","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910545776739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31487827542115,"product_id":7414977036387,"position":5,"created_at":"2024-05-05T19:59:33+08:00","updated_at":"2024-05-05T19:59:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373","variant_ids":[41910545776739]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB16","featured_media":{"alt":null,"id":23893171535971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910545776739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31487827542115,"product_id":7414977036387,"position":5,"created_at":"2024-05-05T19:59:33+08:00","updated_at":"2024-05-05T19:59:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373","variant_ids":[41910545776739]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB16","featured_media":{"alt":null,"id":23893171535971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63e8d90321fa22ad75af4a7248d357fd7e8ce6e0_63070c9c-6d96-4819-924b-88796b4c2d34.webp?v=1714910373"}},"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: "停產" }