$product = {"id":7411248136291,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Weiweiboy - 超級可愛大王","handle":"iphone-14-plus-mod-nx-magsafe-printable-eo01","description":null,"published_at":"2024-06-11T17:39:51+08:00","created_at":"2024-05-04T23:53:17+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-weiweiboy","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":41896501641315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31479956275299,"product_id":7411248136291,"position":7,"created_at":"2024-05-04T23:53:35+08:00","updated_at":"2024-05-04T23:53:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015","variant_ids":[41896501641315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Weiweiboy - 超級可愛大王 - 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-EO01","featured_media":{"alt":null,"id":23885206683747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e704ee67574be7517d8d35b7373592b2a9127d69_6f3365d2-15c0-4dfb-aafe-73170365f278.webp?v=1714838000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adb645bc6f3a0fbd34c995c6c36006724f44a5a3_20a60668-fcc1-4ac2-a1d4-b0cd34953a22.webp?v=1714838002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc0ae013a42386f4914d2f21113b4620478426fc_7f2652da-73a7-4280-9674-360d8e5308a7.webp?v=1714838005","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4174f41236055d1a5eb7316db6d6de4f78cb31b_f28256fd-0346-4aae-b80d-507dfed1a523.webp?v=1714838007","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5270b75f16bb49efd12be08cd30d7be0bf98fe87_a8dde65d-a57c-4b68-89ea-983d33362677.webp?v=1714838010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1413e6470719838d1fb2a6120aab12b1a37091e6_94c6640d-cd53-4353-8f46-ac6db8aa898f.webp?v=1714838013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc84c16dedfb3553559a504b14d9351612e013d_0d46b747-f0e2-4a72-9623-02554a18958a.webp?v=1714838017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4221d5d6219f358f1a5b6d0d0f623385a536eb1b_437cbc7e-6a72-4ea8-96e4-54005a1300c3.webp?v=1714838020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8cfa5b8b324c24c1e0c4fd0ba9dfecde7faaabb_ce8aefb0-842c-421f-91a5-83d2df751a10.webp?v=1714838022"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e704ee67574be7517d8d35b7373592b2a9127d69_6f3365d2-15c0-4dfb-aafe-73170365f278.webp?v=1714838000","options":["color"],"media":[{"alt":null,"id":23885203570787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e704ee67574be7517d8d35b7373592b2a9127d69_6f3365d2-15c0-4dfb-aafe-73170365f278.webp?v=1714838000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e704ee67574be7517d8d35b7373592b2a9127d69_6f3365d2-15c0-4dfb-aafe-73170365f278.webp?v=1714838000","width":2000},{"alt":null,"id":23885203964003,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adb645bc6f3a0fbd34c995c6c36006724f44a5a3_20a60668-fcc1-4ac2-a1d4-b0cd34953a22.webp?v=1714838002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adb645bc6f3a0fbd34c995c6c36006724f44a5a3_20a60668-fcc1-4ac2-a1d4-b0cd34953a22.webp?v=1714838002","width":2000},{"alt":null,"id":23885204455523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc0ae013a42386f4914d2f21113b4620478426fc_7f2652da-73a7-4280-9674-360d8e5308a7.webp?v=1714838005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc0ae013a42386f4914d2f21113b4620478426fc_7f2652da-73a7-4280-9674-360d8e5308a7.webp?v=1714838005","width":2000},{"alt":null,"id":23885205143651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4174f41236055d1a5eb7316db6d6de4f78cb31b_f28256fd-0346-4aae-b80d-507dfed1a523.webp?v=1714838007"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4174f41236055d1a5eb7316db6d6de4f78cb31b_f28256fd-0346-4aae-b80d-507dfed1a523.webp?v=1714838007","width":2000},{"alt":null,"id":23885205700707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5270b75f16bb49efd12be08cd30d7be0bf98fe87_a8dde65d-a57c-4b68-89ea-983d33362677.webp?v=1714838010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5270b75f16bb49efd12be08cd30d7be0bf98fe87_a8dde65d-a57c-4b68-89ea-983d33362677.webp?v=1714838010","width":2000},{"alt":null,"id":23885206126691,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1413e6470719838d1fb2a6120aab12b1a37091e6_94c6640d-cd53-4353-8f46-ac6db8aa898f.webp?v=1714838013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1413e6470719838d1fb2a6120aab12b1a37091e6_94c6640d-cd53-4353-8f46-ac6db8aa898f.webp?v=1714838013","width":2000},{"alt":null,"id":23885206683747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015","width":2000},{"alt":null,"id":23885207142499,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc84c16dedfb3553559a504b14d9351612e013d_0d46b747-f0e2-4a72-9623-02554a18958a.webp?v=1714838017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc84c16dedfb3553559a504b14d9351612e013d_0d46b747-f0e2-4a72-9623-02554a18958a.webp?v=1714838017","width":2000},{"alt":null,"id":23885207732323,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4221d5d6219f358f1a5b6d0d0f623385a536eb1b_437cbc7e-6a72-4ea8-96e4-54005a1300c3.webp?v=1714838020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4221d5d6219f358f1a5b6d0d0f623385a536eb1b_437cbc7e-6a72-4ea8-96e4-54005a1300c3.webp?v=1714838020","width":2000},{"alt":null,"id":23885208125539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8cfa5b8b324c24c1e0c4fd0ba9dfecde7faaabb_ce8aefb0-842c-421f-91a5-83d2df751a10.webp?v=1714838022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8cfa5b8b324c24c1e0c4fd0ba9dfecde7faaabb_ce8aefb0-842c-421f-91a5-83d2df751a10.webp?v=1714838022","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896501641315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31479956275299,"product_id":7411248136291,"position":7,"created_at":"2024-05-04T23:53:35+08:00","updated_at":"2024-05-04T23:53:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015","variant_ids":[41896501641315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Weiweiboy - 超級可愛大王 - 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-EO01","featured_media":{"alt":null,"id":23885206683747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896501641315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31479956275299,"product_id":7411248136291,"position":7,"created_at":"2024-05-04T23:53:35+08:00","updated_at":"2024-05-04T23:53:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015","variant_ids":[41896501641315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Weiweiboy - 超級可愛大王 - 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-EO01","featured_media":{"alt":null,"id":23885206683747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b72c471c38bdbe438f251f317d3b64cbf7ffcf_c957657c-cf7c-424e-82e2-82d25ba44dc3.webp?v=1714838015"}},"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: "停產" }