$product = {"id":7415075438691,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-溜溜球炫技-幽默系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc11","description":null,"published_at":"2024-06-11T17:57:18+08:00","created_at":"2024-05-05T20:18:00+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":41911604248675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31488089751651,"product_id":7415075438691,"position":2,"created_at":"2024-05-05T20:18:05+08:00","updated_at":"2024-05-05T20:18:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485","variant_ids":[41911604248675]},"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-PC11","featured_media":{"alt":null,"id":23893434237027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bbb7030fc17c44b228b0604830152de0655c3d8_f9633331-436f-4a03-8f72-c86de5adb6a6.webp?v=1714911483","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee37743eaeda5eadb01ddac4e83600db301a1ecf_d898155f-cc9d-4f28-b2ff-361b04aea3f8.webp?v=1714911487","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0adfc2e5428558963135300b38e09b7100ec4863_6bf628c4-e19b-4117-b972-f27a8bf95f66.webp?v=1714911490","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9dfdb17792f79ffe98f7c045d9a3988e442289b_f3b5adbf-7bd4-498d-83d6-a8fccdaf9084.webp?v=1714911492","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fc65d96a08b8546034f9879c6225e074454560b_5d75ea46-195b-4243-afd8-9b5bbe70ca4c.webp?v=1714911494","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc4fd0905ada80c53e5e3580ba299cc053b065d_58288980-4dbf-4102-a7ff-ea9691f5a7ad.webp?v=1714911496","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65b91d6ce78f64a7e91cf4a2d192595556e8a8ac_72db10ea-d723-4d8e-a005-457972c5a916.webp?v=1714911499","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3106b99973d23ce9ccad333159279e0a415aeae0_4123a44e-ec4b-4b28-8511-990df7a9409b.webp?v=1714911501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1293eb3fec699becb4bd83839f1cd3f241731dbe_2fd20f63-7b03-47c7-ae69-ebd0369d3cb6.webp?v=1714911503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db74c7e1d7632e5a5d054f4c286ca44b732ae965_39abdb1a-b582-4029-8162-b88fb2e6a77f.webp?v=1714911506"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bbb7030fc17c44b228b0604830152de0655c3d8_f9633331-436f-4a03-8f72-c86de5adb6a6.webp?v=1714911483","options":["color"],"media":[{"alt":null,"id":23893433286755,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bbb7030fc17c44b228b0604830152de0655c3d8_f9633331-436f-4a03-8f72-c86de5adb6a6.webp?v=1714911483"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bbb7030fc17c44b228b0604830152de0655c3d8_f9633331-436f-4a03-8f72-c86de5adb6a6.webp?v=1714911483","width":2000},{"alt":null,"id":23893434237027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485","width":2000},{"alt":null,"id":23893434597475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee37743eaeda5eadb01ddac4e83600db301a1ecf_d898155f-cc9d-4f28-b2ff-361b04aea3f8.webp?v=1714911487"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee37743eaeda5eadb01ddac4e83600db301a1ecf_d898155f-cc9d-4f28-b2ff-361b04aea3f8.webp?v=1714911487","width":2000},{"alt":null,"id":23893435220067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0adfc2e5428558963135300b38e09b7100ec4863_6bf628c4-e19b-4117-b972-f27a8bf95f66.webp?v=1714911490"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0adfc2e5428558963135300b38e09b7100ec4863_6bf628c4-e19b-4117-b972-f27a8bf95f66.webp?v=1714911490","width":2000},{"alt":null,"id":23893435547747,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9dfdb17792f79ffe98f7c045d9a3988e442289b_f3b5adbf-7bd4-498d-83d6-a8fccdaf9084.webp?v=1714911492"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9dfdb17792f79ffe98f7c045d9a3988e442289b_f3b5adbf-7bd4-498d-83d6-a8fccdaf9084.webp?v=1714911492","width":2000},{"alt":null,"id":23893436661859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fc65d96a08b8546034f9879c6225e074454560b_5d75ea46-195b-4243-afd8-9b5bbe70ca4c.webp?v=1714911494"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fc65d96a08b8546034f9879c6225e074454560b_5d75ea46-195b-4243-afd8-9b5bbe70ca4c.webp?v=1714911494","width":2000},{"alt":null,"id":23893437055075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc4fd0905ada80c53e5e3580ba299cc053b065d_58288980-4dbf-4102-a7ff-ea9691f5a7ad.webp?v=1714911496"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc4fd0905ada80c53e5e3580ba299cc053b065d_58288980-4dbf-4102-a7ff-ea9691f5a7ad.webp?v=1714911496","width":2000},{"alt":null,"id":23893437579363,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65b91d6ce78f64a7e91cf4a2d192595556e8a8ac_72db10ea-d723-4d8e-a005-457972c5a916.webp?v=1714911499"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65b91d6ce78f64a7e91cf4a2d192595556e8a8ac_72db10ea-d723-4d8e-a005-457972c5a916.webp?v=1714911499","width":2000},{"alt":null,"id":23893438038115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3106b99973d23ce9ccad333159279e0a415aeae0_4123a44e-ec4b-4b28-8511-990df7a9409b.webp?v=1714911501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3106b99973d23ce9ccad333159279e0a415aeae0_4123a44e-ec4b-4b28-8511-990df7a9409b.webp?v=1714911501","width":2000},{"alt":null,"id":23893438693475,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1293eb3fec699becb4bd83839f1cd3f241731dbe_2fd20f63-7b03-47c7-ae69-ebd0369d3cb6.webp?v=1714911503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1293eb3fec699becb4bd83839f1cd3f241731dbe_2fd20f63-7b03-47c7-ae69-ebd0369d3cb6.webp?v=1714911503","width":2000},{"alt":null,"id":23893439316067,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db74c7e1d7632e5a5d054f4c286ca44b732ae965_39abdb1a-b582-4029-8162-b88fb2e6a77f.webp?v=1714911506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db74c7e1d7632e5a5d054f4c286ca44b732ae965_39abdb1a-b582-4029-8162-b88fb2e6a77f.webp?v=1714911506","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911604248675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31488089751651,"product_id":7415075438691,"position":2,"created_at":"2024-05-05T20:18:05+08:00","updated_at":"2024-05-05T20:18:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485","variant_ids":[41911604248675]},"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-PC11","featured_media":{"alt":null,"id":23893434237027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911604248675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31488089751651,"product_id":7415075438691,"position":2,"created_at":"2024-05-05T20:18:05+08:00","updated_at":"2024-05-05T20:18:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485","variant_ids":[41911604248675]},"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-PC11","featured_media":{"alt":null,"id":23893434237027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79556fe5d1e4c16bbfe55ede2101dc1df1855665_8d905c19-e3c3-47ac-adad-62956f3ddd0a.webp?v=1714911485"}},"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: "停產" }