$product = {"id":7369192439907,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - Chill moment","handle":"iphone-12-mini-mod-nx-magsafe-printable-pl58","description":null,"published_at":"2024-06-11T17:31:10+08:00","created_at":"2024-04-23T15:42:11+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-snoopy","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":41793462042723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31387029733475,"product_id":7369192439907,"position":3,"created_at":"2024-04-23T15:42:23+08:00","updated_at":"2024-04-23T15:42:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143","variant_ids":[41793462042723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - Chill moment - 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-PL58","featured_media":{"alt":null,"id":23789268238435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3637304099a16aad06295ef0153fbb5df5317991_805590b1-2b91-4f7f-8a14-e66ccfdd9bd1.webp?v=1713858134","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/640be488ac3afb866b2e264c340865ac5039867a_e2dfbb11-39c4-496b-9eab-2debcbad09ba.webp?v=1713858141","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1654474edc49de2d744058fc07f3e42b2ae55b08_805d9a5a-a045-4464-89e5-6105705728e8.webp?v=1713858145","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb3e2835a368dfdd7a0e15c48d61260e842b7284_37a72faf-446c-4458-b93d-2408b1d92350.webp?v=1713858147","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df840689eeb74d779b6b3da8b7b7e2c12ed32804_b1c4fe5c-eb09-4dd7-9468-5f6db49a7895.webp?v=1713858150","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9ec64e63ab7745db87300ffc5ef61497c3a44b9_376389f4-2c33-4f5a-84db-a1fff340b8ec.webp?v=1713858152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6531a5b92c1fcc8573d55af9628e25194ad3daea_6f6a23c5-c21d-48df-87d3-0aaf49a140fc.webp?v=1713858154","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06c8c7e4b9bbf534f330e960efa599fe67304739_bc79c3c5-1738-413e-8483-f9f7d6dfd4dd.webp?v=1713858157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fc0f2eb2e7786a4585e246b8da46e96f759209e_51135166-5512-4e6a-94e3-9dde6507ceef.webp?v=1713858159","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01cde0f179d9891e250ebed37204da7e32a20ec_35877bf5-e307-4afb-901a-23e47c1116a7.webp?v=1713858161"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3637304099a16aad06295ef0153fbb5df5317991_805590b1-2b91-4f7f-8a14-e66ccfdd9bd1.webp?v=1713858134","options":["color"],"media":[{"alt":null,"id":23789266042979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3637304099a16aad06295ef0153fbb5df5317991_805590b1-2b91-4f7f-8a14-e66ccfdd9bd1.webp?v=1713858134"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3637304099a16aad06295ef0153fbb5df5317991_805590b1-2b91-4f7f-8a14-e66ccfdd9bd1.webp?v=1713858134","width":2000},{"alt":null,"id":23789267714147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/640be488ac3afb866b2e264c340865ac5039867a_e2dfbb11-39c4-496b-9eab-2debcbad09ba.webp?v=1713858141"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/640be488ac3afb866b2e264c340865ac5039867a_e2dfbb11-39c4-496b-9eab-2debcbad09ba.webp?v=1713858141","width":2000},{"alt":null,"id":23789268238435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143","width":2000},{"alt":null,"id":23789268926563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1654474edc49de2d744058fc07f3e42b2ae55b08_805d9a5a-a045-4464-89e5-6105705728e8.webp?v=1713858145"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1654474edc49de2d744058fc07f3e42b2ae55b08_805d9a5a-a045-4464-89e5-6105705728e8.webp?v=1713858145","width":2000},{"alt":null,"id":23789269516387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb3e2835a368dfdd7a0e15c48d61260e842b7284_37a72faf-446c-4458-b93d-2408b1d92350.webp?v=1713858147"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb3e2835a368dfdd7a0e15c48d61260e842b7284_37a72faf-446c-4458-b93d-2408b1d92350.webp?v=1713858147","width":2000},{"alt":null,"id":23789270138979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df840689eeb74d779b6b3da8b7b7e2c12ed32804_b1c4fe5c-eb09-4dd7-9468-5f6db49a7895.webp?v=1713858150"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df840689eeb74d779b6b3da8b7b7e2c12ed32804_b1c4fe5c-eb09-4dd7-9468-5f6db49a7895.webp?v=1713858150","width":2000},{"alt":null,"id":23789270532195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9ec64e63ab7745db87300ffc5ef61497c3a44b9_376389f4-2c33-4f5a-84db-a1fff340b8ec.webp?v=1713858152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9ec64e63ab7745db87300ffc5ef61497c3a44b9_376389f4-2c33-4f5a-84db-a1fff340b8ec.webp?v=1713858152","width":2000},{"alt":null,"id":23789271089251,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6531a5b92c1fcc8573d55af9628e25194ad3daea_6f6a23c5-c21d-48df-87d3-0aaf49a140fc.webp?v=1713858154"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6531a5b92c1fcc8573d55af9628e25194ad3daea_6f6a23c5-c21d-48df-87d3-0aaf49a140fc.webp?v=1713858154","width":2000},{"alt":null,"id":23789271777379,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06c8c7e4b9bbf534f330e960efa599fe67304739_bc79c3c5-1738-413e-8483-f9f7d6dfd4dd.webp?v=1713858157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06c8c7e4b9bbf534f330e960efa599fe67304739_bc79c3c5-1738-413e-8483-f9f7d6dfd4dd.webp?v=1713858157","width":2000},{"alt":null,"id":23789272334435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fc0f2eb2e7786a4585e246b8da46e96f759209e_51135166-5512-4e6a-94e3-9dde6507ceef.webp?v=1713858159"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fc0f2eb2e7786a4585e246b8da46e96f759209e_51135166-5512-4e6a-94e3-9dde6507ceef.webp?v=1713858159","width":2000},{"alt":null,"id":23789272891491,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01cde0f179d9891e250ebed37204da7e32a20ec_35877bf5-e307-4afb-901a-23e47c1116a7.webp?v=1713858161"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01cde0f179d9891e250ebed37204da7e32a20ec_35877bf5-e307-4afb-901a-23e47c1116a7.webp?v=1713858161","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793462042723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31387029733475,"product_id":7369192439907,"position":3,"created_at":"2024-04-23T15:42:23+08:00","updated_at":"2024-04-23T15:42:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143","variant_ids":[41793462042723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - Chill moment - 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-PL58","featured_media":{"alt":null,"id":23789268238435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793462042723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31387029733475,"product_id":7369192439907,"position":3,"created_at":"2024-04-23T15:42:23+08:00","updated_at":"2024-04-23T15:42:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143","variant_ids":[41793462042723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - Chill moment - 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-PL58","featured_media":{"alt":null,"id":23789268238435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38babe41a7122a6868611e82fd94c992a488ea07_edd7cad6-ae19-454d-bb34-4c8c9bee183e.webp?v=1713858143"}},"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: "停產" }