$product = {"id":7415019700323,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb39","description":null,"published_at":"2024-06-11T17:55:48+08:00","created_at":"2024-05-05T20:07:37+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":41911004495971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31487941345379,"product_id":7415019700323,"position":3,"created_at":"2024-05-05T20:07:44+08:00","updated_at":"2024-05-05T20:07:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864","variant_ids":[41911004495971]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23893285535843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1fea94d1dfdde78c1701627eec8b49cbd3fb95_327c9d55-5a59-4423-9b8a-881c93c063e5.webp?v=1714910859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186b90245a980315397b08a0206c42e20f5f56e1_d834545c-6a08-4b3e-aea2-bbe52a7e92a7.webp?v=1714910862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b56c0d7249f34e909f7a614edc75b55097f1e16b_0100755e-d297-456c-8e5c-b0c6637be6c4.webp?v=1714910866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/891a501f04cc5f3675414806d6a89fc8915aa738_78dd03b1-43be-4568-bd4f-5b055bc948ea.webp?v=1714910869","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b19921bae943ab85593a2dccff42918febb0cdf_bc07bd9c-6f00-4e4f-bddd-500ba8e25d29.webp?v=1714910871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6735c6a1628cd1d4d2ac0c013e179566c87d9bc5_0b17ac10-5ea8-425a-9ee6-fd43ef453aef.webp?v=1714910873","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76ba75cf3fba6db681780c0cd6f228b7686ff71a_66aa628a-77f5-4118-a98a-35bc61d25b7d.webp?v=1714910876","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27c2731588cbe8ad127f8816e0609fa62dee3619_b8cff651-dfde-41e0-b0e9-961cec68b0e3.webp?v=1714910878","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc736651bd243007975d8b6655df3ae35d472bdd_bb0672af-cc4d-4e69-ba3b-03c43c4fedca.webp?v=1714910880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc25c765357d6101308a0d8864ee3e7440de42d1_f176ba73-cd4a-4ae8-81f0-144fd2b2eda6.webp?v=1714910883"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1fea94d1dfdde78c1701627eec8b49cbd3fb95_327c9d55-5a59-4423-9b8a-881c93c063e5.webp?v=1714910859","options":["color"],"media":[{"alt":null,"id":23893284257891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1fea94d1dfdde78c1701627eec8b49cbd3fb95_327c9d55-5a59-4423-9b8a-881c93c063e5.webp?v=1714910859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1fea94d1dfdde78c1701627eec8b49cbd3fb95_327c9d55-5a59-4423-9b8a-881c93c063e5.webp?v=1714910859","width":2000},{"alt":null,"id":23893285044323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186b90245a980315397b08a0206c42e20f5f56e1_d834545c-6a08-4b3e-aea2-bbe52a7e92a7.webp?v=1714910862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186b90245a980315397b08a0206c42e20f5f56e1_d834545c-6a08-4b3e-aea2-bbe52a7e92a7.webp?v=1714910862","width":2000},{"alt":null,"id":23893285535843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864","width":2000},{"alt":null,"id":23893286092899,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b56c0d7249f34e909f7a614edc75b55097f1e16b_0100755e-d297-456c-8e5c-b0c6637be6c4.webp?v=1714910866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b56c0d7249f34e909f7a614edc75b55097f1e16b_0100755e-d297-456c-8e5c-b0c6637be6c4.webp?v=1714910866","width":2000},{"alt":null,"id":23893286617187,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/891a501f04cc5f3675414806d6a89fc8915aa738_78dd03b1-43be-4568-bd4f-5b055bc948ea.webp?v=1714910869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/891a501f04cc5f3675414806d6a89fc8915aa738_78dd03b1-43be-4568-bd4f-5b055bc948ea.webp?v=1714910869","width":2000},{"alt":null,"id":23893287403619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b19921bae943ab85593a2dccff42918febb0cdf_bc07bd9c-6f00-4e4f-bddd-500ba8e25d29.webp?v=1714910871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b19921bae943ab85593a2dccff42918febb0cdf_bc07bd9c-6f00-4e4f-bddd-500ba8e25d29.webp?v=1714910871","width":2000},{"alt":null,"id":23893288058979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6735c6a1628cd1d4d2ac0c013e179566c87d9bc5_0b17ac10-5ea8-425a-9ee6-fd43ef453aef.webp?v=1714910873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6735c6a1628cd1d4d2ac0c013e179566c87d9bc5_0b17ac10-5ea8-425a-9ee6-fd43ef453aef.webp?v=1714910873","width":2000},{"alt":null,"id":23893288583267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76ba75cf3fba6db681780c0cd6f228b7686ff71a_66aa628a-77f5-4118-a98a-35bc61d25b7d.webp?v=1714910876"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76ba75cf3fba6db681780c0cd6f228b7686ff71a_66aa628a-77f5-4118-a98a-35bc61d25b7d.webp?v=1714910876","width":2000},{"alt":null,"id":23893289107555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27c2731588cbe8ad127f8816e0609fa62dee3619_b8cff651-dfde-41e0-b0e9-961cec68b0e3.webp?v=1714910878"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27c2731588cbe8ad127f8816e0609fa62dee3619_b8cff651-dfde-41e0-b0e9-961cec68b0e3.webp?v=1714910878","width":2000},{"alt":null,"id":23893289861219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc736651bd243007975d8b6655df3ae35d472bdd_bb0672af-cc4d-4e69-ba3b-03c43c4fedca.webp?v=1714910880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc736651bd243007975d8b6655df3ae35d472bdd_bb0672af-cc4d-4e69-ba3b-03c43c4fedca.webp?v=1714910880","width":2000},{"alt":null,"id":23893290254435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc25c765357d6101308a0d8864ee3e7440de42d1_f176ba73-cd4a-4ae8-81f0-144fd2b2eda6.webp?v=1714910883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc25c765357d6101308a0d8864ee3e7440de42d1_f176ba73-cd4a-4ae8-81f0-144fd2b2eda6.webp?v=1714910883","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911004495971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31487941345379,"product_id":7415019700323,"position":3,"created_at":"2024-05-05T20:07:44+08:00","updated_at":"2024-05-05T20:07:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864","variant_ids":[41911004495971]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23893285535843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911004495971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31487941345379,"product_id":7415019700323,"position":3,"created_at":"2024-05-05T20:07:44+08:00","updated_at":"2024-05-05T20:07:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864","variant_ids":[41911004495971]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23893285535843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fcb60db3d02799adc3fe19ace3215911c24e804_13c3e90d-5c84-46cd-87b7-d3ac259687a8.webp?v=1714910864"}},"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: "停產" }