$product = {"id":7415926947939,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 毛毛","handle":"iphone-xs-max-mod-nx-printable-sr07","description":null,"published_at":"2024-06-11T16:48:07+08:00","created_at":"2024-05-06T12:26:18+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-The Powerpuff Girls","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-the-power-puff-girls","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-the-power-puff-girls","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41915604336739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490758148195,"product_id":7415926947939,"position":7,"created_at":"2024-05-06T12:26:39+08:00","updated_at":"2024-05-06T12:26:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599","variant_ids":[41915604336739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 毛毛 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SR07","featured_media":{"alt":null,"id":23896164991075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06e2758c92cfe06a034fa440aaec75938e8c9d4c_4c395a7c-2c0f-4687-8436-211cae2147d8.webp?v=1714969581","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6a62202450833f00a048a256dd9081b417f92c_c10a9a34-df0b-404b-ae81-02ef1a7a8dfc.webp?v=1714969583","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50e77d43688fd7911db44998968ed262f3c7580e_3efafdd0-ebef-4e06-866c-b3d596a8ce56.webp?v=1714969588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e394a615feb4c2cc3c13577dd00c3cf7c66650_ab507c8b-4d82-4768-85c4-fffca2308bf4.webp?v=1714969591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7cbaa88be160958e3fc862ca362de3d6aabe461_434f9d12-23f7-4627-a0c7-2393a99e60a3.webp?v=1714969593","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01b9de6b8cbef70ec29ceda019f2171d7968b07_ad49e455-2298-446e-b749-187ebc661e12.webp?v=1714969595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f5f86ae5e0a72646d88891dfb169946b5f9c82_8d0d4ee7-18e4-41e5-b621-1839dba58285.webp?v=1714969602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb886a0cbec910de71ff38b7a3b0fb47f94f49cd_b2ecafb8-fa61-4563-9046-3f6fc9737112.webp?v=1714969604"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06e2758c92cfe06a034fa440aaec75938e8c9d4c_4c395a7c-2c0f-4687-8436-211cae2147d8.webp?v=1714969581","options":["color"],"media":[{"alt":null,"id":23896160567395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06e2758c92cfe06a034fa440aaec75938e8c9d4c_4c395a7c-2c0f-4687-8436-211cae2147d8.webp?v=1714969581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06e2758c92cfe06a034fa440aaec75938e8c9d4c_4c395a7c-2c0f-4687-8436-211cae2147d8.webp?v=1714969581","width":2000},{"alt":null,"id":23896161157219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6a62202450833f00a048a256dd9081b417f92c_c10a9a34-df0b-404b-ae81-02ef1a7a8dfc.webp?v=1714969583"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c6a62202450833f00a048a256dd9081b417f92c_c10a9a34-df0b-404b-ae81-02ef1a7a8dfc.webp?v=1714969583","width":2000},{"alt":null,"id":23896162205795,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50e77d43688fd7911db44998968ed262f3c7580e_3efafdd0-ebef-4e06-866c-b3d596a8ce56.webp?v=1714969588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50e77d43688fd7911db44998968ed262f3c7580e_3efafdd0-ebef-4e06-866c-b3d596a8ce56.webp?v=1714969588","width":2000},{"alt":null,"id":23896162533475,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e394a615feb4c2cc3c13577dd00c3cf7c66650_ab507c8b-4d82-4768-85c4-fffca2308bf4.webp?v=1714969591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e394a615feb4c2cc3c13577dd00c3cf7c66650_ab507c8b-4d82-4768-85c4-fffca2308bf4.webp?v=1714969591","width":2000},{"alt":null,"id":23896163418211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7cbaa88be160958e3fc862ca362de3d6aabe461_434f9d12-23f7-4627-a0c7-2393a99e60a3.webp?v=1714969593"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7cbaa88be160958e3fc862ca362de3d6aabe461_434f9d12-23f7-4627-a0c7-2393a99e60a3.webp?v=1714969593","width":2000},{"alt":null,"id":23896163975267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01b9de6b8cbef70ec29ceda019f2171d7968b07_ad49e455-2298-446e-b749-187ebc661e12.webp?v=1714969595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01b9de6b8cbef70ec29ceda019f2171d7968b07_ad49e455-2298-446e-b749-187ebc661e12.webp?v=1714969595","width":2000},{"alt":null,"id":23896164991075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599","width":2000},{"alt":null,"id":23896165449827,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f5f86ae5e0a72646d88891dfb169946b5f9c82_8d0d4ee7-18e4-41e5-b621-1839dba58285.webp?v=1714969602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f5f86ae5e0a72646d88891dfb169946b5f9c82_8d0d4ee7-18e4-41e5-b621-1839dba58285.webp?v=1714969602","width":2000},{"alt":null,"id":23896166072419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb886a0cbec910de71ff38b7a3b0fb47f94f49cd_b2ecafb8-fa61-4563-9046-3f6fc9737112.webp?v=1714969604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb886a0cbec910de71ff38b7a3b0fb47f94f49cd_b2ecafb8-fa61-4563-9046-3f6fc9737112.webp?v=1714969604","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915604336739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490758148195,"product_id":7415926947939,"position":7,"created_at":"2024-05-06T12:26:39+08:00","updated_at":"2024-05-06T12:26:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599","variant_ids":[41915604336739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 毛毛 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SR07","featured_media":{"alt":null,"id":23896164991075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915604336739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490758148195,"product_id":7415926947939,"position":7,"created_at":"2024-05-06T12:26:39+08:00","updated_at":"2024-05-06T12:26:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599","variant_ids":[41915604336739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 毛毛 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SR07","featured_media":{"alt":null,"id":23896164991075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e1e64975b4a45c2edda241002e9e7a3c5c1132_e2f4fe1d-ac01-4e71-9939-367163096de6.webp?v=1714969599"}},"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: "停產" }