$product = {"id":7415098114147,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb102","description":null,"published_at":"2024-06-11T17:57:55+08:00","created_at":"2024-05-05T20:22:27+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":41911853285475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB102","requires_shipping":true,"taxable":true,"featured_image":{"id":31488159842403,"product_id":7415098114147,"position":11,"created_at":"2024-05-05T20:22:55+08:00","updated_at":"2024-05-05T20:22:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775","variant_ids":[41911853285475]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報 - 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-PB102","featured_media":{"alt":null,"id":23893504491619,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3adad0d89d8da1d45de7940ef43fed36bd3765cc_6502a7ea-6646-41d2-9fd1-074cae2d5c86.webp?v=1714911750","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0922324db9611e25fcafce783dcf322037b7a0b_4c8cac03-fb1e-44c2-a66d-9b8000e1637e.webp?v=1714911752","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28719b61d7e8fff5ebbfa1d9ec31140a7117d49e_aebd4e6f-5d77-4060-b43a-89645e6eebdd.webp?v=1714911754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7249e5efe90cbe3fdb32676dd78ea51ba1a6c9fa_f78dd88f-6db0-4fbf-a068-a988d56ee97b.webp?v=1714911757","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e8b05bbd16cecefa4e88bb8b5f050160fae231_829b9c94-d1d9-4940-ba67-c5f48e956bc8.webp?v=1714911759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7810f5f4517ede41192b515825508f8e35cc1158_6c103875-fd86-40fa-a629-69e77d21a81c.webp?v=1714911762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0424a0d44205da6d7619fb208e13674900ced1_5292c6f3-466f-405d-abc5-7c1971857f30.webp?v=1714911764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85cf966ef4b282e9cdade87183bfe377bb548e73_7d98cdb5-aa18-4b6a-81de-fb5b7b82e8bf.webp?v=1714911767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb55307b6e3072aff40338613b717566dd7836c_ad61ed14-8125-4d60-ab02-4a85548c5d40.webp?v=1714911770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afc075ea1e5e0adce0c5b886b2277ea9b6be6dc_f8f3dce6-ec76-4ae5-a568-59cd6bd025bf.webp?v=1714911772","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3adad0d89d8da1d45de7940ef43fed36bd3765cc_6502a7ea-6646-41d2-9fd1-074cae2d5c86.webp?v=1714911750","options":["color"],"media":[{"alt":null,"id":23893498757219,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3adad0d89d8da1d45de7940ef43fed36bd3765cc_6502a7ea-6646-41d2-9fd1-074cae2d5c86.webp?v=1714911750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3adad0d89d8da1d45de7940ef43fed36bd3765cc_6502a7ea-6646-41d2-9fd1-074cae2d5c86.webp?v=1714911750","width":2000},{"alt":null,"id":23893499347043,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0922324db9611e25fcafce783dcf322037b7a0b_4c8cac03-fb1e-44c2-a66d-9b8000e1637e.webp?v=1714911752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0922324db9611e25fcafce783dcf322037b7a0b_4c8cac03-fb1e-44c2-a66d-9b8000e1637e.webp?v=1714911752","width":2000},{"alt":null,"id":23893500133475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28719b61d7e8fff5ebbfa1d9ec31140a7117d49e_aebd4e6f-5d77-4060-b43a-89645e6eebdd.webp?v=1714911754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28719b61d7e8fff5ebbfa1d9ec31140a7117d49e_aebd4e6f-5d77-4060-b43a-89645e6eebdd.webp?v=1714911754","width":2000},{"alt":null,"id":23893500559459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7249e5efe90cbe3fdb32676dd78ea51ba1a6c9fa_f78dd88f-6db0-4fbf-a068-a988d56ee97b.webp?v=1714911757"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7249e5efe90cbe3fdb32676dd78ea51ba1a6c9fa_f78dd88f-6db0-4fbf-a068-a988d56ee97b.webp?v=1714911757","width":2000},{"alt":null,"id":23893501083747,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e8b05bbd16cecefa4e88bb8b5f050160fae231_829b9c94-d1d9-4940-ba67-c5f48e956bc8.webp?v=1714911759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e8b05bbd16cecefa4e88bb8b5f050160fae231_829b9c94-d1d9-4940-ba67-c5f48e956bc8.webp?v=1714911759","width":2000},{"alt":null,"id":23893501509731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7810f5f4517ede41192b515825508f8e35cc1158_6c103875-fd86-40fa-a629-69e77d21a81c.webp?v=1714911762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7810f5f4517ede41192b515825508f8e35cc1158_6c103875-fd86-40fa-a629-69e77d21a81c.webp?v=1714911762","width":2000},{"alt":null,"id":23893502066787,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0424a0d44205da6d7619fb208e13674900ced1_5292c6f3-466f-405d-abc5-7c1971857f30.webp?v=1714911764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee0424a0d44205da6d7619fb208e13674900ced1_5292c6f3-466f-405d-abc5-7c1971857f30.webp?v=1714911764","width":2000},{"alt":null,"id":23893502525539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85cf966ef4b282e9cdade87183bfe377bb548e73_7d98cdb5-aa18-4b6a-81de-fb5b7b82e8bf.webp?v=1714911767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85cf966ef4b282e9cdade87183bfe377bb548e73_7d98cdb5-aa18-4b6a-81de-fb5b7b82e8bf.webp?v=1714911767","width":2000},{"alt":null,"id":23893503115363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb55307b6e3072aff40338613b717566dd7836c_ad61ed14-8125-4d60-ab02-4a85548c5d40.webp?v=1714911770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb55307b6e3072aff40338613b717566dd7836c_ad61ed14-8125-4d60-ab02-4a85548c5d40.webp?v=1714911770","width":2000},{"alt":null,"id":23893503737955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afc075ea1e5e0adce0c5b886b2277ea9b6be6dc_f8f3dce6-ec76-4ae5-a568-59cd6bd025bf.webp?v=1714911772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afc075ea1e5e0adce0c5b886b2277ea9b6be6dc_f8f3dce6-ec76-4ae5-a568-59cd6bd025bf.webp?v=1714911772","width":2000},{"alt":null,"id":23893504491619,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911853285475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB102","requires_shipping":true,"taxable":true,"featured_image":{"id":31488159842403,"product_id":7415098114147,"position":11,"created_at":"2024-05-05T20:22:55+08:00","updated_at":"2024-05-05T20:22:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775","variant_ids":[41911853285475]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報 - 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-PB102","featured_media":{"alt":null,"id":23893504491619,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911853285475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB102","requires_shipping":true,"taxable":true,"featured_image":{"id":31488159842403,"product_id":7415098114147,"position":11,"created_at":"2024-05-05T20:22:55+08:00","updated_at":"2024-05-05T20:22:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775","variant_ids":[41911853285475]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報 - 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-PB102","featured_media":{"alt":null,"id":23893504491619,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197fb957661067f056849310b7f205356488683d_d3417217-3c9b-40cf-929f-523ea78cdf75.webp?v=1714911775"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }