$product = {"id":7415007477859,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-咖啡杯-幽默系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc14","description":null,"published_at":"2024-06-11T17:55:28+08:00","created_at":"2024-05-05T20:05:11+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":41910882107491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487911526499,"product_id":7415007477859,"position":10,"created_at":"2024-05-05T20:05:34+08:00","updated_at":"2024-05-05T20:05:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734","variant_ids":[41910882107491]},"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-PC14","featured_media":{"alt":null,"id":23893255520355,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c327368be0782ad796c881d75a7f763defab520_fb42815b-3612-4ffa-8a3c-0aa123bd1654.webp?v=1714910713","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/630eba42ec632a20fe96a23673b288523b0aa58f_47ccff30-41cc-418f-a2bb-c6a211a28e3d.webp?v=1714910716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7945ef42df291e2f10194733ff43a2128b278183_f486ce0a-a747-4f78-82c1-e80eecadd5a0.webp?v=1714910718","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5fb86def5bcd9d431bc628464432586d93b61a6_52c8a7ba-b6e6-4372-b104-8470892bcbd2.webp?v=1714910721","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c03797ecb417a19a54398e6874b90e6fb751fddc_f5afbd82-f358-40ad-9ad2-3b6a716228a6.webp?v=1714910723","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eba5979eabcd251127895f627623c4952f1d7e7_7877fdd0-e76d-483c-908d-bc75a4174c03.webp?v=1714910725","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c6be54299ccbe79dd10af10a2301fd0d67dcc86_3fc687fc-bad3-4604-888e-f05b2c069082.webp?v=1714910728","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e61c840aa32514fddfd5e67a338e24121536b5_29615d1b-5f6d-4470-ae72-a8e520fa382e.webp?v=1714910730","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/865ec085ac86af9acf623dd549b2f8161e65b8e2_7a8d6846-29a1-42af-b602-f8ee91214999.webp?v=1714910732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0156ad39ee0a63158c1d36508157797aaa83c004_a6a59775-57dd-4f97-ba5e-82dcfd331520.webp?v=1714910737"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c327368be0782ad796c881d75a7f763defab520_fb42815b-3612-4ffa-8a3c-0aa123bd1654.webp?v=1714910713","options":["color"],"media":[{"alt":null,"id":23893251424355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c327368be0782ad796c881d75a7f763defab520_fb42815b-3612-4ffa-8a3c-0aa123bd1654.webp?v=1714910713"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c327368be0782ad796c881d75a7f763defab520_fb42815b-3612-4ffa-8a3c-0aa123bd1654.webp?v=1714910713","width":2000},{"alt":null,"id":23893251817571,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/630eba42ec632a20fe96a23673b288523b0aa58f_47ccff30-41cc-418f-a2bb-c6a211a28e3d.webp?v=1714910716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/630eba42ec632a20fe96a23673b288523b0aa58f_47ccff30-41cc-418f-a2bb-c6a211a28e3d.webp?v=1714910716","width":2000},{"alt":null,"id":23893252309091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7945ef42df291e2f10194733ff43a2128b278183_f486ce0a-a747-4f78-82c1-e80eecadd5a0.webp?v=1714910718"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7945ef42df291e2f10194733ff43a2128b278183_f486ce0a-a747-4f78-82c1-e80eecadd5a0.webp?v=1714910718","width":2000},{"alt":null,"id":23893252735075,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5fb86def5bcd9d431bc628464432586d93b61a6_52c8a7ba-b6e6-4372-b104-8470892bcbd2.webp?v=1714910721"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5fb86def5bcd9d431bc628464432586d93b61a6_52c8a7ba-b6e6-4372-b104-8470892bcbd2.webp?v=1714910721","width":2000},{"alt":null,"id":23893253128291,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c03797ecb417a19a54398e6874b90e6fb751fddc_f5afbd82-f358-40ad-9ad2-3b6a716228a6.webp?v=1714910723"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c03797ecb417a19a54398e6874b90e6fb751fddc_f5afbd82-f358-40ad-9ad2-3b6a716228a6.webp?v=1714910723","width":2000},{"alt":null,"id":23893253521507,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eba5979eabcd251127895f627623c4952f1d7e7_7877fdd0-e76d-483c-908d-bc75a4174c03.webp?v=1714910725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eba5979eabcd251127895f627623c4952f1d7e7_7877fdd0-e76d-483c-908d-bc75a4174c03.webp?v=1714910725","width":2000},{"alt":null,"id":23893254209635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c6be54299ccbe79dd10af10a2301fd0d67dcc86_3fc687fc-bad3-4604-888e-f05b2c069082.webp?v=1714910728"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c6be54299ccbe79dd10af10a2301fd0d67dcc86_3fc687fc-bad3-4604-888e-f05b2c069082.webp?v=1714910728","width":2000},{"alt":null,"id":23893254570083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e61c840aa32514fddfd5e67a338e24121536b5_29615d1b-5f6d-4470-ae72-a8e520fa382e.webp?v=1714910730"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e61c840aa32514fddfd5e67a338e24121536b5_29615d1b-5f6d-4470-ae72-a8e520fa382e.webp?v=1714910730","width":2000},{"alt":null,"id":23893255225443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/865ec085ac86af9acf623dd549b2f8161e65b8e2_7a8d6846-29a1-42af-b602-f8ee91214999.webp?v=1714910732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/865ec085ac86af9acf623dd549b2f8161e65b8e2_7a8d6846-29a1-42af-b602-f8ee91214999.webp?v=1714910732","width":2000},{"alt":null,"id":23893255520355,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734","width":2000},{"alt":null,"id":23893255946339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0156ad39ee0a63158c1d36508157797aaa83c004_a6a59775-57dd-4f97-ba5e-82dcfd331520.webp?v=1714910737"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0156ad39ee0a63158c1d36508157797aaa83c004_a6a59775-57dd-4f97-ba5e-82dcfd331520.webp?v=1714910737","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910882107491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487911526499,"product_id":7415007477859,"position":10,"created_at":"2024-05-05T20:05:34+08:00","updated_at":"2024-05-05T20:05:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734","variant_ids":[41910882107491]},"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-PC14","featured_media":{"alt":null,"id":23893255520355,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910882107491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487911526499,"product_id":7415007477859,"position":10,"created_at":"2024-05-05T20:05:34+08:00","updated_at":"2024-05-05T20:05:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734","variant_ids":[41910882107491]},"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-PC14","featured_media":{"alt":null,"id":23893255520355,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a78a6688c4821d75b72c5fe00b0370a379566f_d14d7eab-6003-4eec-a14e-6ae94fdfbea1.webp?v=1714910734"}},"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: "停產" }