$product = {"id":7414982639715,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 死星-線稿風格","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb75","description":null,"published_at":"2024-06-11T17:54:48+08:00","created_at":"2024-05-05T20:00:30+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":41910608199779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB75","requires_shipping":true,"taxable":true,"featured_image":{"id":31487842451555,"product_id":7414982639715,"position":2,"created_at":"2024-05-05T20:00:35+08:00","updated_at":"2024-05-05T20:00:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435","variant_ids":[41910608199779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 死星-線稿風格 - 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-PB75","featured_media":{"alt":null,"id":23893186412643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0e1e73e0cdad1be7708893e2cf11edf107418cc_f2e1e4b7-ad13-4753-87ad-729a4d6def2a.webp?v=1714910433","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5dda24ce61b33da571826ba2b3f45d6ca3e06bd_ceb41e02-4d15-4589-aa67-edff7a25ffe4.webp?v=1714910438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f51ebd482157c986a8dfe5186175c4f07761c_c156fc4a-e8a1-4c3f-b7f2-021a1e3caf14.webp?v=1714910441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45be0587d8a9363f6ce67b475bf30ad73a88a519_8a2552d3-abd5-4f73-a79b-aa2914835277.webp?v=1714910443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc401b5629b721f500118b2b0043ba43f473a15f_3e9b55f4-a3fb-4405-88f6-6f35c2ed103b.webp?v=1714910446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efe4b66efa0265d05e7aa97dbc3e9ce766a39c08_e621798e-72a1-4a9a-a90d-4f2eeebb7bdb.webp?v=1714910448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9835727495233fb98b4ffd20c87949ca3a4448ea_8c5a1472-6391-41ba-a918-1b9d1f1fce5d.webp?v=1714910451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a356efa1e97496ce5130c40b7fbe48600c9f381f_341590a0-d574-4214-a2d5-3931635e4fda.webp?v=1714910453","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e11f1d7e54383047a2745dfb3754b0fc9cf57b82_cf5e5d67-ca7f-41e3-a313-d9a0b251c8de.webp?v=1714910456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/973d2df039dea74aa3af8a31cd6664a4f35ae1e5_89830530-a3a5-4262-8321-a609a45eecad.webp?v=1714910458"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0e1e73e0cdad1be7708893e2cf11edf107418cc_f2e1e4b7-ad13-4753-87ad-729a4d6def2a.webp?v=1714910433","options":["color"],"media":[{"alt":null,"id":23893185953891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0e1e73e0cdad1be7708893e2cf11edf107418cc_f2e1e4b7-ad13-4753-87ad-729a4d6def2a.webp?v=1714910433"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0e1e73e0cdad1be7708893e2cf11edf107418cc_f2e1e4b7-ad13-4753-87ad-729a4d6def2a.webp?v=1714910433","width":2000},{"alt":null,"id":23893186412643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435","width":2000},{"alt":null,"id":23893186969699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5dda24ce61b33da571826ba2b3f45d6ca3e06bd_ceb41e02-4d15-4589-aa67-edff7a25ffe4.webp?v=1714910438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5dda24ce61b33da571826ba2b3f45d6ca3e06bd_ceb41e02-4d15-4589-aa67-edff7a25ffe4.webp?v=1714910438","width":2000},{"alt":null,"id":23893187723363,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f51ebd482157c986a8dfe5186175c4f07761c_c156fc4a-e8a1-4c3f-b7f2-021a1e3caf14.webp?v=1714910441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700f51ebd482157c986a8dfe5186175c4f07761c_c156fc4a-e8a1-4c3f-b7f2-021a1e3caf14.webp?v=1714910441","width":2000},{"alt":null,"id":23893188280419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45be0587d8a9363f6ce67b475bf30ad73a88a519_8a2552d3-abd5-4f73-a79b-aa2914835277.webp?v=1714910443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45be0587d8a9363f6ce67b475bf30ad73a88a519_8a2552d3-abd5-4f73-a79b-aa2914835277.webp?v=1714910443","width":2000},{"alt":null,"id":23893189066851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc401b5629b721f500118b2b0043ba43f473a15f_3e9b55f4-a3fb-4405-88f6-6f35c2ed103b.webp?v=1714910446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc401b5629b721f500118b2b0043ba43f473a15f_3e9b55f4-a3fb-4405-88f6-6f35c2ed103b.webp?v=1714910446","width":2000},{"alt":null,"id":23893189656675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efe4b66efa0265d05e7aa97dbc3e9ce766a39c08_e621798e-72a1-4a9a-a90d-4f2eeebb7bdb.webp?v=1714910448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efe4b66efa0265d05e7aa97dbc3e9ce766a39c08_e621798e-72a1-4a9a-a90d-4f2eeebb7bdb.webp?v=1714910448","width":2000},{"alt":null,"id":23893190377571,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9835727495233fb98b4ffd20c87949ca3a4448ea_8c5a1472-6391-41ba-a918-1b9d1f1fce5d.webp?v=1714910451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9835727495233fb98b4ffd20c87949ca3a4448ea_8c5a1472-6391-41ba-a918-1b9d1f1fce5d.webp?v=1714910451","width":2000},{"alt":null,"id":23893191000163,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a356efa1e97496ce5130c40b7fbe48600c9f381f_341590a0-d574-4214-a2d5-3931635e4fda.webp?v=1714910453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a356efa1e97496ce5130c40b7fbe48600c9f381f_341590a0-d574-4214-a2d5-3931635e4fda.webp?v=1714910453","width":2000},{"alt":null,"id":23893191655523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e11f1d7e54383047a2745dfb3754b0fc9cf57b82_cf5e5d67-ca7f-41e3-a313-d9a0b251c8de.webp?v=1714910456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e11f1d7e54383047a2745dfb3754b0fc9cf57b82_cf5e5d67-ca7f-41e3-a313-d9a0b251c8de.webp?v=1714910456","width":2000},{"alt":null,"id":23893192441955,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/973d2df039dea74aa3af8a31cd6664a4f35ae1e5_89830530-a3a5-4262-8321-a609a45eecad.webp?v=1714910458"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/973d2df039dea74aa3af8a31cd6664a4f35ae1e5_89830530-a3a5-4262-8321-a609a45eecad.webp?v=1714910458","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910608199779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB75","requires_shipping":true,"taxable":true,"featured_image":{"id":31487842451555,"product_id":7414982639715,"position":2,"created_at":"2024-05-05T20:00:35+08:00","updated_at":"2024-05-05T20:00:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435","variant_ids":[41910608199779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 死星-線稿風格 - 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-PB75","featured_media":{"alt":null,"id":23893186412643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910608199779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB75","requires_shipping":true,"taxable":true,"featured_image":{"id":31487842451555,"product_id":7414982639715,"position":2,"created_at":"2024-05-05T20:00:35+08:00","updated_at":"2024-05-05T20:00:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435","variant_ids":[41910608199779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 死星-線稿風格 - 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-PB75","featured_media":{"alt":null,"id":23893186412643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea1d15b5a449ad779a1e4d32709ba4d5fc5a684_3dbe69be-c101-4484-8c8c-c27efd97f14c.webp?v=1714910435"}},"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: "停產" }