$product = {"id":7415024353379,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Sticker-紅","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb33","description":null,"published_at":"2024-06-11T17:55:56+08:00","created_at":"2024-05-05T20:08:33+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 mini","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":41911059513443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB33","requires_shipping":true,"taxable":true,"featured_image":{"id":31487959564387,"product_id":7415024353379,"position":9,"created_at":"2024-05-05T20:08:57+08:00","updated_at":"2024-05-05T20:08:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937","variant_ids":[41911059513443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Sticker-紅 - 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":"MPB0118424-PB33","featured_media":{"alt":null,"id":23893303853155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef83d9e5d88fd242c7a993584ff86ddf97207206_c17c2a83-c7f7-415b-a721-79429378235b.webp?v=1714910916","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bef9158d214d4758720fcf1b479591a222b82ea_52773ee2-fd33-4371-a898-7a32b8f0ff10.webp?v=1714910919","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b348f7ac4b221e7c02a978202d16fc71ee2e7f_6710f929-14f1-4913-a3aa-8abf94d6c6fb.webp?v=1714910921","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33626fa9aeb077cf95ba93f98edb6fcc8a31470_06feb6a6-1ce3-42c7-b510-d22e2554e401.webp?v=1714910924","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f68a0450717cbb2afc3d1041428a612210ec52a_12a1ba1b-157e-4547-a175-66f68c3aa968.webp?v=1714910927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc58bd7be25ddf04dafff462d9517edf8e1ca015_ab7b3c17-2e45-43ce-9c11-76256ed30767.webp?v=1714910929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3009fc8c1ec867282b926ef3512e1f092a7044db_de1d404e-c9ce-412c-9071-2eef5b990449.webp?v=1714910932","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e9fd288a867b1ac06bb94403cd549688b3ff3f_8b7682c8-2d50-4f27-b55c-9f6c82688253.webp?v=1714910934","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8449a69e973095838a5b4092f1358e6490b289_7cb3d314-f986-491c-920a-752559dc777d.webp?v=1714910939","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0814745ff81b740ac83b1b97aa794c91e45ec0ba_36f8bfdf-13e6-4518-bdf2-7b10fefa322b.webp?v=1714910942"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef83d9e5d88fd242c7a993584ff86ddf97207206_c17c2a83-c7f7-415b-a721-79429378235b.webp?v=1714910916","options":["color"],"media":[{"alt":null,"id":23893298741347,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef83d9e5d88fd242c7a993584ff86ddf97207206_c17c2a83-c7f7-415b-a721-79429378235b.webp?v=1714910916"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef83d9e5d88fd242c7a993584ff86ddf97207206_c17c2a83-c7f7-415b-a721-79429378235b.webp?v=1714910916","width":2000},{"alt":null,"id":23893299363939,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bef9158d214d4758720fcf1b479591a222b82ea_52773ee2-fd33-4371-a898-7a32b8f0ff10.webp?v=1714910919"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bef9158d214d4758720fcf1b479591a222b82ea_52773ee2-fd33-4371-a898-7a32b8f0ff10.webp?v=1714910919","width":2000},{"alt":null,"id":23893300019299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b348f7ac4b221e7c02a978202d16fc71ee2e7f_6710f929-14f1-4913-a3aa-8abf94d6c6fb.webp?v=1714910921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b348f7ac4b221e7c02a978202d16fc71ee2e7f_6710f929-14f1-4913-a3aa-8abf94d6c6fb.webp?v=1714910921","width":2000},{"alt":null,"id":23893300805731,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33626fa9aeb077cf95ba93f98edb6fcc8a31470_06feb6a6-1ce3-42c7-b510-d22e2554e401.webp?v=1714910924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33626fa9aeb077cf95ba93f98edb6fcc8a31470_06feb6a6-1ce3-42c7-b510-d22e2554e401.webp?v=1714910924","width":2000},{"alt":null,"id":23893301330019,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f68a0450717cbb2afc3d1041428a612210ec52a_12a1ba1b-157e-4547-a175-66f68c3aa968.webp?v=1714910927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f68a0450717cbb2afc3d1041428a612210ec52a_12a1ba1b-157e-4547-a175-66f68c3aa968.webp?v=1714910927","width":2000},{"alt":null,"id":23893301821539,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc58bd7be25ddf04dafff462d9517edf8e1ca015_ab7b3c17-2e45-43ce-9c11-76256ed30767.webp?v=1714910929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc58bd7be25ddf04dafff462d9517edf8e1ca015_ab7b3c17-2e45-43ce-9c11-76256ed30767.webp?v=1714910929","width":2000},{"alt":null,"id":23893302607971,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3009fc8c1ec867282b926ef3512e1f092a7044db_de1d404e-c9ce-412c-9071-2eef5b990449.webp?v=1714910932"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3009fc8c1ec867282b926ef3512e1f092a7044db_de1d404e-c9ce-412c-9071-2eef5b990449.webp?v=1714910932","width":2000},{"alt":null,"id":23893303394403,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e9fd288a867b1ac06bb94403cd549688b3ff3f_8b7682c8-2d50-4f27-b55c-9f6c82688253.webp?v=1714910934"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e9fd288a867b1ac06bb94403cd549688b3ff3f_8b7682c8-2d50-4f27-b55c-9f6c82688253.webp?v=1714910934","width":2000},{"alt":null,"id":23893303853155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937","width":2000},{"alt":null,"id":23893304639587,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8449a69e973095838a5b4092f1358e6490b289_7cb3d314-f986-491c-920a-752559dc777d.webp?v=1714910939"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8449a69e973095838a5b4092f1358e6490b289_7cb3d314-f986-491c-920a-752559dc777d.webp?v=1714910939","width":2000},{"alt":null,"id":23893305524323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0814745ff81b740ac83b1b97aa794c91e45ec0ba_36f8bfdf-13e6-4518-bdf2-7b10fefa322b.webp?v=1714910942"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0814745ff81b740ac83b1b97aa794c91e45ec0ba_36f8bfdf-13e6-4518-bdf2-7b10fefa322b.webp?v=1714910942","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911059513443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB33","requires_shipping":true,"taxable":true,"featured_image":{"id":31487959564387,"product_id":7415024353379,"position":9,"created_at":"2024-05-05T20:08:57+08:00","updated_at":"2024-05-05T20:08:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937","variant_ids":[41911059513443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Sticker-紅 - 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":"MPB0118424-PB33","featured_media":{"alt":null,"id":23893303853155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911059513443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB33","requires_shipping":true,"taxable":true,"featured_image":{"id":31487959564387,"product_id":7415024353379,"position":9,"created_at":"2024-05-05T20:08:57+08:00","updated_at":"2024-05-05T20:08:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937","variant_ids":[41911059513443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Sticker-紅 - 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":"MPB0118424-PB33","featured_media":{"alt":null,"id":23893303853155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4189550dec44b058eafccb96e1b36c189d28a578_b345e97c-487f-4382-a5ce-0abeb9d1fd16.webp?v=1714910937"}},"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: "停產" }