$product = {"id":7415949164643,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點","handle":"iphone-xs-max-mod-nx-printable-eo02","description":null,"published_at":"2024-06-11T16:48:42+08:00","created_at":"2024-05-06T12:30:17+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-weiweiboy","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":41915840364643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490813362275,"product_id":7415949164643,"position":6,"created_at":"2024-05-06T12:30:32+08:00","updated_at":"2024-05-06T12:30:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832","variant_ids":[41915840364643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-EO02","featured_media":{"alt":null,"id":23896220237923,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51a5aba2d407e133ad0d2797efb18f4d817aba18_95c6266b-69be-4a0e-b5d8-ec69d8daa6d0.webp?v=1714969819","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/516ecfe3f0c2bae76384bcaf911257fb6cd2ce82_79a54a2f-3f5b-45dd-b60e-bd03087563f2.webp?v=1714969822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd7297687ab1316d5cb1b35e1e77c6d3dd36888c_d4f525cd-d67b-4a0c-b176-2699d36fb468.webp?v=1714969824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a0969ce8e254cacf972b3809cf981f7330b334b_0ea5105b-2738-44a1-ba81-7f51e66e9471.webp?v=1714969827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb5e22fb77809c53573ad639711827b097060966_f2c20994-8dae-4745-bc09-76740d2f663d.webp?v=1714969830","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/288ce5da87eda86da0540f16af93da108a2e23b3_cbc392b3-4a7d-47ef-8d3f-c7c7b46a927f.webp?v=1714969834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb018fb0f04fb0199ceccd554d1ba6650d8edeeb_450355ec-85c6-463b-bac0-5c596ceb96e7.webp?v=1714969837","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ee54edfe93d73c73f917a141efd1158a0c6da_7f03c06a-ee91-4d4b-a502-05ba167ad714.webp?v=1714969839","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d4f0f5f9496ade4a4ea5f999eb67cd6513dd3c8_34da052a-39ed-4dd1-ae40-897f1b983c25.webp?v=1714969842"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51a5aba2d407e133ad0d2797efb18f4d817aba18_95c6266b-69be-4a0e-b5d8-ec69d8daa6d0.webp?v=1714969819","options":["color"],"media":[{"alt":null,"id":23896217387107,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51a5aba2d407e133ad0d2797efb18f4d817aba18_95c6266b-69be-4a0e-b5d8-ec69d8daa6d0.webp?v=1714969819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51a5aba2d407e133ad0d2797efb18f4d817aba18_95c6266b-69be-4a0e-b5d8-ec69d8daa6d0.webp?v=1714969819","width":2000},{"alt":null,"id":23896218173539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/516ecfe3f0c2bae76384bcaf911257fb6cd2ce82_79a54a2f-3f5b-45dd-b60e-bd03087563f2.webp?v=1714969822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/516ecfe3f0c2bae76384bcaf911257fb6cd2ce82_79a54a2f-3f5b-45dd-b60e-bd03087563f2.webp?v=1714969822","width":2000},{"alt":null,"id":23896218763363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd7297687ab1316d5cb1b35e1e77c6d3dd36888c_d4f525cd-d67b-4a0c-b176-2699d36fb468.webp?v=1714969824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd7297687ab1316d5cb1b35e1e77c6d3dd36888c_d4f525cd-d67b-4a0c-b176-2699d36fb468.webp?v=1714969824","width":2000},{"alt":null,"id":23896219123811,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a0969ce8e254cacf972b3809cf981f7330b334b_0ea5105b-2738-44a1-ba81-7f51e66e9471.webp?v=1714969827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a0969ce8e254cacf972b3809cf981f7330b334b_0ea5105b-2738-44a1-ba81-7f51e66e9471.webp?v=1714969827","width":2000},{"alt":null,"id":23896219811939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb5e22fb77809c53573ad639711827b097060966_f2c20994-8dae-4745-bc09-76740d2f663d.webp?v=1714969830"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb5e22fb77809c53573ad639711827b097060966_f2c20994-8dae-4745-bc09-76740d2f663d.webp?v=1714969830","width":2000},{"alt":null,"id":23896220237923,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832","width":2000},{"alt":null,"id":23896220794979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/288ce5da87eda86da0540f16af93da108a2e23b3_cbc392b3-4a7d-47ef-8d3f-c7c7b46a927f.webp?v=1714969834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/288ce5da87eda86da0540f16af93da108a2e23b3_cbc392b3-4a7d-47ef-8d3f-c7c7b46a927f.webp?v=1714969834","width":2000},{"alt":null,"id":23896221450339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb018fb0f04fb0199ceccd554d1ba6650d8edeeb_450355ec-85c6-463b-bac0-5c596ceb96e7.webp?v=1714969837"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb018fb0f04fb0199ceccd554d1ba6650d8edeeb_450355ec-85c6-463b-bac0-5c596ceb96e7.webp?v=1714969837","width":2000},{"alt":null,"id":23896221941859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ee54edfe93d73c73f917a141efd1158a0c6da_7f03c06a-ee91-4d4b-a502-05ba167ad714.webp?v=1714969839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ee54edfe93d73c73f917a141efd1158a0c6da_7f03c06a-ee91-4d4b-a502-05ba167ad714.webp?v=1714969839","width":2000},{"alt":null,"id":23896222728291,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d4f0f5f9496ade4a4ea5f999eb67cd6513dd3c8_34da052a-39ed-4dd1-ae40-897f1b983c25.webp?v=1714969842"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d4f0f5f9496ade4a4ea5f999eb67cd6513dd3c8_34da052a-39ed-4dd1-ae40-897f1b983c25.webp?v=1714969842","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915840364643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490813362275,"product_id":7415949164643,"position":6,"created_at":"2024-05-06T12:30:32+08:00","updated_at":"2024-05-06T12:30:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832","variant_ids":[41915840364643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-EO02","featured_media":{"alt":null,"id":23896220237923,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915840364643,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490813362275,"product_id":7415949164643,"position":6,"created_at":"2024-05-06T12:30:32+08:00","updated_at":"2024-05-06T12:30:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832","variant_ids":[41915840364643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-EO02","featured_media":{"alt":null,"id":23896220237923,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdfac27092765d281933e6f9a41898d430383d29_2ed0abd3-bab4-4ec5-b3f0-90af9b8d31de.webp?v=1714969832"}},"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: "停產" }