$product = {"id":7416363778147,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Care Bears - 美食派對","handle":"iphone-8-mod-nx-printable-yb11","description":null,"published_at":"2024-06-11T16:57:01+08:00","created_at":"2024-05-06T14:42:34+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 8","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":41918928093283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31491947561059,"product_id":7416363778147,"position":8,"created_at":"2024-05-06T14:42:54+08:00","updated_at":"2024-05-06T14:42:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774","variant_ids":[41918928093283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-YB11","featured_media":{"alt":null,"id":23897360629859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/879aa726f5097b6e9b148502d5e68467e4ae10e3_e3154762-a403-4e95-816f-dfff02740b34.webp?v=1714977757","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeef0406538fd6fd40ce0ce0aa200ec4ae67261d_3f6b1c85-8412-4c6b-ac5f-9fd75c74b814.webp?v=1714977759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7257c1ae4b5366fbfad0ca2cbc5717546ec72471_7728d34c-d029-4280-8eb2-176e328e2d4e.webp?v=1714977761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf71eea127e73dd859f3f8fa34a7a6d3fb8acbe8_10858169-92fc-47b5-b1a8-e6a4d3c4c2e0.webp?v=1714977764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fee9aa484ee0eec701a54840142facfdfab6cec_eba18234-a1f9-4c99-8dbf-e50320f77773.webp?v=1714977766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2484a0cbaaf1a75547aed8bc3aba57068f659d_2a3227fb-c7bf-4e02-9e7c-8a2a6e85ec41.webp?v=1714977768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86394b96605c33661addda3c429d369619962f9e_2374d170-a86d-4e6a-8c41-a52e09048293.webp?v=1714977771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c29c79014c23afb6027ea51464cc3503c6999dd_b76cd056-ce18-4df9-8eb1-75a88e69093c.webp?v=1714977778"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/879aa726f5097b6e9b148502d5e68467e4ae10e3_e3154762-a403-4e95-816f-dfff02740b34.webp?v=1714977757","options":["color"],"media":[{"alt":null,"id":23897356599395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/879aa726f5097b6e9b148502d5e68467e4ae10e3_e3154762-a403-4e95-816f-dfff02740b34.webp?v=1714977757"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/879aa726f5097b6e9b148502d5e68467e4ae10e3_e3154762-a403-4e95-816f-dfff02740b34.webp?v=1714977757","width":2000},{"alt":null,"id":23897357058147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeef0406538fd6fd40ce0ce0aa200ec4ae67261d_3f6b1c85-8412-4c6b-ac5f-9fd75c74b814.webp?v=1714977759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeef0406538fd6fd40ce0ce0aa200ec4ae67261d_3f6b1c85-8412-4c6b-ac5f-9fd75c74b814.webp?v=1714977759","width":2000},{"alt":null,"id":23897357746275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7257c1ae4b5366fbfad0ca2cbc5717546ec72471_7728d34c-d029-4280-8eb2-176e328e2d4e.webp?v=1714977761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7257c1ae4b5366fbfad0ca2cbc5717546ec72471_7728d34c-d029-4280-8eb2-176e328e2d4e.webp?v=1714977761","width":2000},{"alt":null,"id":23897358237795,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf71eea127e73dd859f3f8fa34a7a6d3fb8acbe8_10858169-92fc-47b5-b1a8-e6a4d3c4c2e0.webp?v=1714977764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf71eea127e73dd859f3f8fa34a7a6d3fb8acbe8_10858169-92fc-47b5-b1a8-e6a4d3c4c2e0.webp?v=1714977764","width":2000},{"alt":null,"id":23897358598243,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fee9aa484ee0eec701a54840142facfdfab6cec_eba18234-a1f9-4c99-8dbf-e50320f77773.webp?v=1714977766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fee9aa484ee0eec701a54840142facfdfab6cec_eba18234-a1f9-4c99-8dbf-e50320f77773.webp?v=1714977766","width":2000},{"alt":null,"id":23897359482979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2484a0cbaaf1a75547aed8bc3aba57068f659d_2a3227fb-c7bf-4e02-9e7c-8a2a6e85ec41.webp?v=1714977768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2484a0cbaaf1a75547aed8bc3aba57068f659d_2a3227fb-c7bf-4e02-9e7c-8a2a6e85ec41.webp?v=1714977768","width":2000},{"alt":null,"id":23897359941731,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86394b96605c33661addda3c429d369619962f9e_2374d170-a86d-4e6a-8c41-a52e09048293.webp?v=1714977771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86394b96605c33661addda3c429d369619962f9e_2374d170-a86d-4e6a-8c41-a52e09048293.webp?v=1714977771","width":2000},{"alt":null,"id":23897360629859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774","width":2000},{"alt":null,"id":23897361481827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c29c79014c23afb6027ea51464cc3503c6999dd_b76cd056-ce18-4df9-8eb1-75a88e69093c.webp?v=1714977778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c29c79014c23afb6027ea51464cc3503c6999dd_b76cd056-ce18-4df9-8eb1-75a88e69093c.webp?v=1714977778","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918928093283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31491947561059,"product_id":7416363778147,"position":8,"created_at":"2024-05-06T14:42:54+08:00","updated_at":"2024-05-06T14:42:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774","variant_ids":[41918928093283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-YB11","featured_media":{"alt":null,"id":23897360629859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918928093283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31491947561059,"product_id":7416363778147,"position":8,"created_at":"2024-05-06T14:42:54+08:00","updated_at":"2024-05-06T14:42:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774","variant_ids":[41918928093283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-YB11","featured_media":{"alt":null,"id":23897360629859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c54752ffd395f1cd679f49144620bcbefab1ab2_a96f97d9-2321-4eb0-b15b-6d246ed8b273.webp?v=1714977774"}},"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: "停產" }