$product = {"id":7416012079203,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - 美食派對","handle":"iphone-xs-max-mod-nx-printable-yb11","description":null,"published_at":"2024-06-11T16:50:23+08:00","created_at":"2024-05-06T12:42:02+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-carebears","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":41916497494115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31490982641763,"product_id":7416012079203,"position":3,"created_at":"2024-05-06T12:42:10+08:00","updated_at":"2024-05-06T12:42:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530","variant_ids":[41916497494115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - 美食派對 - 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-YB11","featured_media":{"alt":null,"id":23896389779555,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2121245cfb224176c474f21fa6230343476c94aa_9961122e-e558-4607-bc47-d75b775cbf8c.webp?v=1714970524","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9351da2c9f72e9263e3f95efddfce2751f67e420_3ce11d70-7d84-4747-9836-194f8e505ef2.webp?v=1714970527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af86b0a536a2b687cb53f9859fe0b83efa163aec_96bc8a7a-8f1b-41d0-8387-8cca8d4d33f5.webp?v=1714970532","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcf654fe88a6fb4c04023b58908a386bb2306b0_38ddaf12-754f-456b-91ae-7e73256a96ae.webp?v=1714970535","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e4495396bae51919815fa60704eb3e652774c42_128fd918-2b09-45ce-bf3b-7229d36345c2.webp?v=1714970537","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9a79ba42e45ff8b605de67e0cd75be66864c133_866846a8-6010-4bd2-850d-ce81f325ba7f.webp?v=1714970540","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61985e60c4f0bf727c0104aee54dc5cd9389aff7_a8b5c37f-0e05-46b9-a45b-1b2576cc70eb.webp?v=1714970542","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12310dccc4bc0bb511cc76f31056d964ca0002bd_6b1f5902-9cf0-40ac-8d59-fb042feb4ecc.webp?v=1714970547"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2121245cfb224176c474f21fa6230343476c94aa_9961122e-e558-4607-bc47-d75b775cbf8c.webp?v=1714970524","options":["color"],"media":[{"alt":null,"id":23896388272227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2121245cfb224176c474f21fa6230343476c94aa_9961122e-e558-4607-bc47-d75b775cbf8c.webp?v=1714970524"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2121245cfb224176c474f21fa6230343476c94aa_9961122e-e558-4607-bc47-d75b775cbf8c.webp?v=1714970524","width":2000},{"alt":null,"id":23896389255267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9351da2c9f72e9263e3f95efddfce2751f67e420_3ce11d70-7d84-4747-9836-194f8e505ef2.webp?v=1714970527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9351da2c9f72e9263e3f95efddfce2751f67e420_3ce11d70-7d84-4747-9836-194f8e505ef2.webp?v=1714970527","width":2000},{"alt":null,"id":23896389779555,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530","width":2000},{"alt":null,"id":23896390434915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af86b0a536a2b687cb53f9859fe0b83efa163aec_96bc8a7a-8f1b-41d0-8387-8cca8d4d33f5.webp?v=1714970532"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af86b0a536a2b687cb53f9859fe0b83efa163aec_96bc8a7a-8f1b-41d0-8387-8cca8d4d33f5.webp?v=1714970532","width":2000},{"alt":null,"id":23896391483491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcf654fe88a6fb4c04023b58908a386bb2306b0_38ddaf12-754f-456b-91ae-7e73256a96ae.webp?v=1714970535"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcf654fe88a6fb4c04023b58908a386bb2306b0_38ddaf12-754f-456b-91ae-7e73256a96ae.webp?v=1714970535","width":2000},{"alt":null,"id":23896392040547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e4495396bae51919815fa60704eb3e652774c42_128fd918-2b09-45ce-bf3b-7229d36345c2.webp?v=1714970537"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e4495396bae51919815fa60704eb3e652774c42_128fd918-2b09-45ce-bf3b-7229d36345c2.webp?v=1714970537","width":2000},{"alt":null,"id":23896392859747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9a79ba42e45ff8b605de67e0cd75be66864c133_866846a8-6010-4bd2-850d-ce81f325ba7f.webp?v=1714970540"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9a79ba42e45ff8b605de67e0cd75be66864c133_866846a8-6010-4bd2-850d-ce81f325ba7f.webp?v=1714970540","width":2000},{"alt":null,"id":23896393285731,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61985e60c4f0bf727c0104aee54dc5cd9389aff7_a8b5c37f-0e05-46b9-a45b-1b2576cc70eb.webp?v=1714970542"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61985e60c4f0bf727c0104aee54dc5cd9389aff7_a8b5c37f-0e05-46b9-a45b-1b2576cc70eb.webp?v=1714970542","width":2000},{"alt":null,"id":23896394530915,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12310dccc4bc0bb511cc76f31056d964ca0002bd_6b1f5902-9cf0-40ac-8d59-fb042feb4ecc.webp?v=1714970547"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12310dccc4bc0bb511cc76f31056d964ca0002bd_6b1f5902-9cf0-40ac-8d59-fb042feb4ecc.webp?v=1714970547","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916497494115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31490982641763,"product_id":7416012079203,"position":3,"created_at":"2024-05-06T12:42:10+08:00","updated_at":"2024-05-06T12:42:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530","variant_ids":[41916497494115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - 美食派對 - 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-YB11","featured_media":{"alt":null,"id":23896389779555,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916497494115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31490982641763,"product_id":7416012079203,"position":3,"created_at":"2024-05-06T12:42:10+08:00","updated_at":"2024-05-06T12:42:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530","variant_ids":[41916497494115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - 美食派對 - 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-YB11","featured_media":{"alt":null,"id":23896389779555,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b618641eca4645f0ba023296d4067699addcaeb0_cb47107c-4719-4712-ace9-6a9af96713be.webp?v=1714970530"}},"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: "停產" }