$product = {"id":7411427999843,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 【獨家設計款】 - 星雨夜空","handle":"iphone-14-plus-mod-nx-magsafe-printable-a046","description":null,"published_at":"2024-06-11T17:44:43+08:00","created_at":"2024-05-05T00:27:53+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX MagSafe 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 14 Plus","discountable-item","member","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller","reseller-modnx-magsafe","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":41898759127139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31480401952867,"product_id":7411427999843,"position":7,"created_at":"2024-05-05T00:28:10+08:00","updated_at":"2024-05-05T00:28:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090","variant_ids":[41898759127139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 【獨家設計款】 - 星雨夜空 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-A046","featured_media":{"alt":null,"id":23885653672035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b41aee843e148b27e8bfba9ab35b3229c519c3_cfcba8e2-636c-47fe-aafe-9eb50b32a378.webp?v=1714840075","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04c1476167b833e6e27520e4b8ccd5fa86a31395_91fed643-4f93-4f10-a0f1-e0bbfc0236d9.webp?v=1714840078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ae016c1e3fa3df22c0346e339a3f1f37d93542f_c5dd508a-499b-47b1-bca0-07617ace4654.webp?v=1714840080","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1060d849a56e942117f2f11d4243e021b50d12cf_7383bfa6-c549-4608-9272-1c3b0af45f5b.webp?v=1714840083","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/752195cfe3b6772e4bec9ce44a5cdaac72087904_ad86e7c3-6435-4c90-b1b8-dda2dfcd59c1.webp?v=1714840085","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b0be872eb5daac30d29b1c829c0c81992cc493d_dd70699b-30b8-4234-b829-9a3f491bb781.webp?v=1714840088","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a8513c07645c7cedcd838373f13279dad205b5e_c5435e1b-d80c-4312-9cd7-24672492b407.webp?v=1714840093","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9781908bc841f7ab42d02dca0798ac637a28863_ade0e2f5-1e29-43b9-b675-fe8d5298ca9d.webp?v=1714840095","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd92b417339c35205108db2b310216f9380e37f_4711f30e-07d2-49d3-8b5c-31834798c35e.webp?v=1714840098"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b41aee843e148b27e8bfba9ab35b3229c519c3_cfcba8e2-636c-47fe-aafe-9eb50b32a378.webp?v=1714840075","options":["color"],"media":[{"alt":null,"id":23885650460771,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b41aee843e148b27e8bfba9ab35b3229c519c3_cfcba8e2-636c-47fe-aafe-9eb50b32a378.webp?v=1714840075"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b41aee843e148b27e8bfba9ab35b3229c519c3_cfcba8e2-636c-47fe-aafe-9eb50b32a378.webp?v=1714840075","width":2000},{"alt":null,"id":23885651083363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04c1476167b833e6e27520e4b8ccd5fa86a31395_91fed643-4f93-4f10-a0f1-e0bbfc0236d9.webp?v=1714840078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04c1476167b833e6e27520e4b8ccd5fa86a31395_91fed643-4f93-4f10-a0f1-e0bbfc0236d9.webp?v=1714840078","width":2000},{"alt":null,"id":23885651640419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ae016c1e3fa3df22c0346e339a3f1f37d93542f_c5dd508a-499b-47b1-bca0-07617ace4654.webp?v=1714840080"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ae016c1e3fa3df22c0346e339a3f1f37d93542f_c5dd508a-499b-47b1-bca0-07617ace4654.webp?v=1714840080","width":2000},{"alt":null,"id":23885652066403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1060d849a56e942117f2f11d4243e021b50d12cf_7383bfa6-c549-4608-9272-1c3b0af45f5b.webp?v=1714840083"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1060d849a56e942117f2f11d4243e021b50d12cf_7383bfa6-c549-4608-9272-1c3b0af45f5b.webp?v=1714840083","width":2000},{"alt":null,"id":23885652688995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/752195cfe3b6772e4bec9ce44a5cdaac72087904_ad86e7c3-6435-4c90-b1b8-dda2dfcd59c1.webp?v=1714840085"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/752195cfe3b6772e4bec9ce44a5cdaac72087904_ad86e7c3-6435-4c90-b1b8-dda2dfcd59c1.webp?v=1714840085","width":2000},{"alt":null,"id":23885653082211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b0be872eb5daac30d29b1c829c0c81992cc493d_dd70699b-30b8-4234-b829-9a3f491bb781.webp?v=1714840088"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b0be872eb5daac30d29b1c829c0c81992cc493d_dd70699b-30b8-4234-b829-9a3f491bb781.webp?v=1714840088","width":2000},{"alt":null,"id":23885653672035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090","width":2000},{"alt":null,"id":23885654130787,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a8513c07645c7cedcd838373f13279dad205b5e_c5435e1b-d80c-4312-9cd7-24672492b407.webp?v=1714840093"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a8513c07645c7cedcd838373f13279dad205b5e_c5435e1b-d80c-4312-9cd7-24672492b407.webp?v=1714840093","width":2000},{"alt":null,"id":23885654884451,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9781908bc841f7ab42d02dca0798ac637a28863_ade0e2f5-1e29-43b9-b675-fe8d5298ca9d.webp?v=1714840095"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9781908bc841f7ab42d02dca0798ac637a28863_ade0e2f5-1e29-43b9-b675-fe8d5298ca9d.webp?v=1714840095","width":2000},{"alt":null,"id":23885655244899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd92b417339c35205108db2b310216f9380e37f_4711f30e-07d2-49d3-8b5c-31834798c35e.webp?v=1714840098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd92b417339c35205108db2b310216f9380e37f_4711f30e-07d2-49d3-8b5c-31834798c35e.webp?v=1714840098","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41898759127139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31480401952867,"product_id":7411427999843,"position":7,"created_at":"2024-05-05T00:28:10+08:00","updated_at":"2024-05-05T00:28:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090","variant_ids":[41898759127139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 【獨家設計款】 - 星雨夜空 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-A046","featured_media":{"alt":null,"id":23885653672035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41898759127139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31480401952867,"product_id":7411427999843,"position":7,"created_at":"2024-05-05T00:28:10+08:00","updated_at":"2024-05-05T00:28:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090","variant_ids":[41898759127139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 【獨家設計款】 - 星雨夜空 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-A046","featured_media":{"alt":null,"id":23885653672035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ae46906f172a6e469cb13da44d9547d5620fb8f_63e5e5cd-90bd-43a9-957c-b4ec87227299.webp?v=1714840090"}},"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: "停產" }