$product = {"id":7407832694883,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點","handle":"iphone-14-plus-mod-nx-printable-eo04","description":null,"published_at":"2024-06-11T16:24:05+08:00","created_at":"2024-05-03T10:58:53+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 14 Plus","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":41879388651619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470482292835,"product_id":7407832694883,"position":3,"created_at":"2024-05-03T10:59:01+08:00","updated_at":"2024-05-03T10:59:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141","variant_ids":[41879388651619]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-EO04","featured_media":{"alt":null,"id":23875385983075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba2592a66fb5199308a69c7a3caf9d0856a1cfaf_ad6f832f-665c-42a4-bc62-0b003090543f.webp?v=1714705136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ccc402935916f29979e8af5f7e66188cfdb8c18_20757a48-745c-4651-ad60-a2536a8f0c3a.webp?v=1714705138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a17578fbba7c2798377d4abab2f2052a915430bf_08a5a8c9-9df9-4dad-b0dd-390eab2ae5ea.webp?v=1714705143","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a90ce7d2a66019f13407266df3cbc88acd98b341_359f5cb3-4f5d-40dc-b1e7-4277a9585f1d.webp?v=1714705145","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/703909cbd064a065955e60e9e220ba4c84d36e44_51f2b1a8-80f3-4e0c-a689-2f84872f843c.webp?v=1714705148","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3148c5adf7c2c11958875b9e052d24d1a8f1bb1_e7b2eec8-1478-426a-b4e5-9e92d5040be6.webp?v=1714705151","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa44159fa533add6c108c401137c77d4b8473725_e982984f-1b2e-4ff2-a577-ac216bac3137.webp?v=1714705153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cde3345ad1bb65bb075c5c916d0712533e89dc3d_4c9da7f2-4848-4ce6-bad6-880fad1d9a21.webp?v=1714705156","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e20015f51f364e1da49bed75509644ba6053e15b_49963a43-3bf3-4e47-b3f4-84ae8630be91.webp?v=1714705158"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba2592a66fb5199308a69c7a3caf9d0856a1cfaf_ad6f832f-665c-42a4-bc62-0b003090543f.webp?v=1714705136","options":["color"],"media":[{"alt":null,"id":23875385032803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba2592a66fb5199308a69c7a3caf9d0856a1cfaf_ad6f832f-665c-42a4-bc62-0b003090543f.webp?v=1714705136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba2592a66fb5199308a69c7a3caf9d0856a1cfaf_ad6f832f-665c-42a4-bc62-0b003090543f.webp?v=1714705136","width":2000},{"alt":null,"id":23875385524323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ccc402935916f29979e8af5f7e66188cfdb8c18_20757a48-745c-4651-ad60-a2536a8f0c3a.webp?v=1714705138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ccc402935916f29979e8af5f7e66188cfdb8c18_20757a48-745c-4651-ad60-a2536a8f0c3a.webp?v=1714705138","width":2000},{"alt":null,"id":23875385983075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141","width":2000},{"alt":null,"id":23875386376291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a17578fbba7c2798377d4abab2f2052a915430bf_08a5a8c9-9df9-4dad-b0dd-390eab2ae5ea.webp?v=1714705143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a17578fbba7c2798377d4abab2f2052a915430bf_08a5a8c9-9df9-4dad-b0dd-390eab2ae5ea.webp?v=1714705143","width":2000},{"alt":null,"id":23875386867811,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a90ce7d2a66019f13407266df3cbc88acd98b341_359f5cb3-4f5d-40dc-b1e7-4277a9585f1d.webp?v=1714705145"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a90ce7d2a66019f13407266df3cbc88acd98b341_359f5cb3-4f5d-40dc-b1e7-4277a9585f1d.webp?v=1714705145","width":2000},{"alt":null,"id":23875387457635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/703909cbd064a065955e60e9e220ba4c84d36e44_51f2b1a8-80f3-4e0c-a689-2f84872f843c.webp?v=1714705148"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/703909cbd064a065955e60e9e220ba4c84d36e44_51f2b1a8-80f3-4e0c-a689-2f84872f843c.webp?v=1714705148","width":2000},{"alt":null,"id":23875387949155,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3148c5adf7c2c11958875b9e052d24d1a8f1bb1_e7b2eec8-1478-426a-b4e5-9e92d5040be6.webp?v=1714705151"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3148c5adf7c2c11958875b9e052d24d1a8f1bb1_e7b2eec8-1478-426a-b4e5-9e92d5040be6.webp?v=1714705151","width":2000},{"alt":null,"id":23875388309603,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa44159fa533add6c108c401137c77d4b8473725_e982984f-1b2e-4ff2-a577-ac216bac3137.webp?v=1714705153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa44159fa533add6c108c401137c77d4b8473725_e982984f-1b2e-4ff2-a577-ac216bac3137.webp?v=1714705153","width":2000},{"alt":null,"id":23875388702819,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cde3345ad1bb65bb075c5c916d0712533e89dc3d_4c9da7f2-4848-4ce6-bad6-880fad1d9a21.webp?v=1714705156"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cde3345ad1bb65bb075c5c916d0712533e89dc3d_4c9da7f2-4848-4ce6-bad6-880fad1d9a21.webp?v=1714705156","width":2000},{"alt":null,"id":23875389128803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e20015f51f364e1da49bed75509644ba6053e15b_49963a43-3bf3-4e47-b3f4-84ae8630be91.webp?v=1714705158"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e20015f51f364e1da49bed75509644ba6053e15b_49963a43-3bf3-4e47-b3f4-84ae8630be91.webp?v=1714705158","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879388651619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470482292835,"product_id":7407832694883,"position":3,"created_at":"2024-05-03T10:59:01+08:00","updated_at":"2024-05-03T10:59:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141","variant_ids":[41879388651619]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-EO04","featured_media":{"alt":null,"id":23875385983075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879388651619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470482292835,"product_id":7407832694883,"position":3,"created_at":"2024-05-03T10:59:01+08:00","updated_at":"2024-05-03T10:59:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141","variant_ids":[41879388651619]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-EO04","featured_media":{"alt":null,"id":23875385983075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a4b2f3383bc5589f879016dea157cee7f40258_89291214-6c48-47ad-a1e4-60a77422e1dd.webp?v=1714705141"}},"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: "停產" }