$product = {"id":7411421642851,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 尤達-塗鴉藝術","handle":"iphone-14-plus-mod-nx-magsafe-printable-pb36","description":null,"published_at":"2024-06-11T17:44:33+08:00","created_at":"2024-05-05T00:26:38+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 14 Plus","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":41898677534819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31480384716899,"product_id":7411421642851,"position":3,"created_at":"2024-05-05T00:26:44+08:00","updated_at":"2024-05-05T00:26:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004","variant_ids":[41898677534819]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 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":"MPB0126124-PB36","featured_media":{"alt":null,"id":23885636436067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/155d198d654e2c388f9e96377944fa6e9ee74789_ba5b23ed-d74c-4259-a55f-e7936b38e4c2.webp?v=1714840000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fe5a01aaaf18d4a389c6ef1812c343f2f693e94_1b852c8d-b024-4117-8543-a737314b6a58.webp?v=1714840002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcabb118be85d51a89211bdde3937af5fe74a60a_87993aa9-ad00-4fa3-9350-a2f16bf57beb.webp?v=1714840007","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c185f60f40df06b1c7ddb30e9095e376a2fb0317_41f48145-1a94-4aca-b910-848277556309.webp?v=1714840009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39fa31cf88dfdb38ff457557192dcac495410eda_4a81a6c4-cc35-44dc-8798-789105dc4cae.webp?v=1714840011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b505ef7104fba1e1d1de75207bbfe876384c1a1f_627abcde-aab3-41fb-83ab-eaffc89f7401.webp?v=1714840013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4a874f3886ed2a6b64e9dde7c61f308d9cdc54_19740050-8f6e-4fce-a513-843fab49ba2a.webp?v=1714840015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34f19033d25daf6fb5bae064d188c73835eeeee_8000372a-34d5-49a7-b558-4cff1e7bfe8d.webp?v=1714840018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a536e864756cb4f5f346ccb5ac65cdc76ab582c_ad551c74-7269-4d69-ade5-aca12af92719.webp?v=1714840020"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/155d198d654e2c388f9e96377944fa6e9ee74789_ba5b23ed-d74c-4259-a55f-e7936b38e4c2.webp?v=1714840000","options":["color"],"media":[{"alt":null,"id":23885635649635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/155d198d654e2c388f9e96377944fa6e9ee74789_ba5b23ed-d74c-4259-a55f-e7936b38e4c2.webp?v=1714840000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/155d198d654e2c388f9e96377944fa6e9ee74789_ba5b23ed-d74c-4259-a55f-e7936b38e4c2.webp?v=1714840000","width":2000},{"alt":null,"id":23885635944547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fe5a01aaaf18d4a389c6ef1812c343f2f693e94_1b852c8d-b024-4117-8543-a737314b6a58.webp?v=1714840002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fe5a01aaaf18d4a389c6ef1812c343f2f693e94_1b852c8d-b024-4117-8543-a737314b6a58.webp?v=1714840002","width":2000},{"alt":null,"id":23885636436067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004","width":2000},{"alt":null,"id":23885636796515,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcabb118be85d51a89211bdde3937af5fe74a60a_87993aa9-ad00-4fa3-9350-a2f16bf57beb.webp?v=1714840007"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcabb118be85d51a89211bdde3937af5fe74a60a_87993aa9-ad00-4fa3-9350-a2f16bf57beb.webp?v=1714840007","width":2000},{"alt":null,"id":23885637288035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c185f60f40df06b1c7ddb30e9095e376a2fb0317_41f48145-1a94-4aca-b910-848277556309.webp?v=1714840009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c185f60f40df06b1c7ddb30e9095e376a2fb0317_41f48145-1a94-4aca-b910-848277556309.webp?v=1714840009","width":2000},{"alt":null,"id":23885637976163,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39fa31cf88dfdb38ff457557192dcac495410eda_4a81a6c4-cc35-44dc-8798-789105dc4cae.webp?v=1714840011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39fa31cf88dfdb38ff457557192dcac495410eda_4a81a6c4-cc35-44dc-8798-789105dc4cae.webp?v=1714840011","width":2000},{"alt":null,"id":23885638271075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b505ef7104fba1e1d1de75207bbfe876384c1a1f_627abcde-aab3-41fb-83ab-eaffc89f7401.webp?v=1714840013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b505ef7104fba1e1d1de75207bbfe876384c1a1f_627abcde-aab3-41fb-83ab-eaffc89f7401.webp?v=1714840013","width":2000},{"alt":null,"id":23885638762595,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4a874f3886ed2a6b64e9dde7c61f308d9cdc54_19740050-8f6e-4fce-a513-843fab49ba2a.webp?v=1714840015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d4a874f3886ed2a6b64e9dde7c61f308d9cdc54_19740050-8f6e-4fce-a513-843fab49ba2a.webp?v=1714840015","width":2000},{"alt":null,"id":23885639155811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34f19033d25daf6fb5bae064d188c73835eeeee_8000372a-34d5-49a7-b558-4cff1e7bfe8d.webp?v=1714840018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34f19033d25daf6fb5bae064d188c73835eeeee_8000372a-34d5-49a7-b558-4cff1e7bfe8d.webp?v=1714840018","width":2000},{"alt":null,"id":23885639745635,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a536e864756cb4f5f346ccb5ac65cdc76ab582c_ad551c74-7269-4d69-ade5-aca12af92719.webp?v=1714840020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a536e864756cb4f5f346ccb5ac65cdc76ab582c_ad551c74-7269-4d69-ade5-aca12af92719.webp?v=1714840020","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41898677534819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31480384716899,"product_id":7411421642851,"position":3,"created_at":"2024-05-05T00:26:44+08:00","updated_at":"2024-05-05T00:26:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004","variant_ids":[41898677534819]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 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":"MPB0126124-PB36","featured_media":{"alt":null,"id":23885636436067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41898677534819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31480384716899,"product_id":7411421642851,"position":3,"created_at":"2024-05-05T00:26:44+08:00","updated_at":"2024-05-05T00:26:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004","variant_ids":[41898677534819]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 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":"MPB0126124-PB36","featured_media":{"alt":null,"id":23885636436067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50985a0a7f84414a2d92bd0eef14f7f126fa28a_06c07b5e-9a32-43c2-9f93-a5b8249d7b31.webp?v=1714840004"}},"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: "停產" }