$product = {"id":7369161146467,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 開心小花","handle":"iphone-12-pro-max-mod-nx-printable-pl65","description":null,"published_at":"2024-06-11T16:13:31+08:00","created_at":"2024-04-23T15:35:55+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41793158611043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":31386951057507,"product_id":7369161146467,"position":9,"created_at":"2024-04-23T15:36:17+08:00","updated_at":"2024-04-23T15:36:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777","variant_ids":[41793158611043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - 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":"NPB0118724-PL65","featured_media":{"alt":null,"id":23789189169251,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26c47954bbff6c1649b2b6f8d9213e85323f24a9_a0f3a6f9-27bf-4efa-99dc-02dba364c691.webp?v=1713857758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0981b03bd0bf5e90027acedb4f93d9dc9038b8c6_cc7fedfa-35a1-4961-9850-4becb94e35f5.webp?v=1713857760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510b9201c0615874eabebb61b860bf41f67723d0_88ef6074-5616-44ba-8c36-f3b3236eb6a8.webp?v=1713857762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21b8e8aaa18842e90d3739659b7feeca81c0d3ae_ac299a5e-24aa-4804-b19d-e24528341d8e.webp?v=1713857765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09eb0765c4deaf00a4340ce519cd8c0cd7e0e31b_5258f000-dc2f-436e-9ef9-7905889db78e.webp?v=1713857768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21c3c123f2213b14bdf1ec815984dc00d112ca6f_a9480dac-a671-4da1-98ea-af03b3dc06c5.webp?v=1713857770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caccc6c66a768bc2cdd4fb65606f0ee610762320_6dcc1aa6-425f-4fb1-b38a-b13f02c16fc6.webp?v=1713857773","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6015488bf6116dd0535daf70ce94053e220b9f61_d01aa56a-9dec-45b9-82ba-5ea5d37c86d6.webp?v=1713857775","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8e6654c60fd1da9f0f7d277df5c99f6ad396d9e_f7ead034-4c16-476c-8baa-762821ec1ee8.webp?v=1713857780"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26c47954bbff6c1649b2b6f8d9213e85323f24a9_a0f3a6f9-27bf-4efa-99dc-02dba364c691.webp?v=1713857758","options":["color"],"media":[{"alt":null,"id":23789184155747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26c47954bbff6c1649b2b6f8d9213e85323f24a9_a0f3a6f9-27bf-4efa-99dc-02dba364c691.webp?v=1713857758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26c47954bbff6c1649b2b6f8d9213e85323f24a9_a0f3a6f9-27bf-4efa-99dc-02dba364c691.webp?v=1713857758","width":2000},{"alt":null,"id":23789184680035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0981b03bd0bf5e90027acedb4f93d9dc9038b8c6_cc7fedfa-35a1-4961-9850-4becb94e35f5.webp?v=1713857760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0981b03bd0bf5e90027acedb4f93d9dc9038b8c6_cc7fedfa-35a1-4961-9850-4becb94e35f5.webp?v=1713857760","width":2000},{"alt":null,"id":23789185368163,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510b9201c0615874eabebb61b860bf41f67723d0_88ef6074-5616-44ba-8c36-f3b3236eb6a8.webp?v=1713857762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/510b9201c0615874eabebb61b860bf41f67723d0_88ef6074-5616-44ba-8c36-f3b3236eb6a8.webp?v=1713857762","width":2000},{"alt":null,"id":23789185925219,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21b8e8aaa18842e90d3739659b7feeca81c0d3ae_ac299a5e-24aa-4804-b19d-e24528341d8e.webp?v=1713857765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21b8e8aaa18842e90d3739659b7feeca81c0d3ae_ac299a5e-24aa-4804-b19d-e24528341d8e.webp?v=1713857765","width":2000},{"alt":null,"id":23789186744419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09eb0765c4deaf00a4340ce519cd8c0cd7e0e31b_5258f000-dc2f-436e-9ef9-7905889db78e.webp?v=1713857768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09eb0765c4deaf00a4340ce519cd8c0cd7e0e31b_5258f000-dc2f-436e-9ef9-7905889db78e.webp?v=1713857768","width":2000},{"alt":null,"id":23789187334243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21c3c123f2213b14bdf1ec815984dc00d112ca6f_a9480dac-a671-4da1-98ea-af03b3dc06c5.webp?v=1713857770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21c3c123f2213b14bdf1ec815984dc00d112ca6f_a9480dac-a671-4da1-98ea-af03b3dc06c5.webp?v=1713857770","width":2000},{"alt":null,"id":23789188022371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caccc6c66a768bc2cdd4fb65606f0ee610762320_6dcc1aa6-425f-4fb1-b38a-b13f02c16fc6.webp?v=1713857773"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caccc6c66a768bc2cdd4fb65606f0ee610762320_6dcc1aa6-425f-4fb1-b38a-b13f02c16fc6.webp?v=1713857773","width":2000},{"alt":null,"id":23789188612195,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6015488bf6116dd0535daf70ce94053e220b9f61_d01aa56a-9dec-45b9-82ba-5ea5d37c86d6.webp?v=1713857775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6015488bf6116dd0535daf70ce94053e220b9f61_d01aa56a-9dec-45b9-82ba-5ea5d37c86d6.webp?v=1713857775","width":2000},{"alt":null,"id":23789189169251,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777","width":2000},{"alt":null,"id":23789189955683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8e6654c60fd1da9f0f7d277df5c99f6ad396d9e_f7ead034-4c16-476c-8baa-762821ec1ee8.webp?v=1713857780"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8e6654c60fd1da9f0f7d277df5c99f6ad396d9e_f7ead034-4c16-476c-8baa-762821ec1ee8.webp?v=1713857780","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793158611043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":31386951057507,"product_id":7369161146467,"position":9,"created_at":"2024-04-23T15:36:17+08:00","updated_at":"2024-04-23T15:36:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777","variant_ids":[41793158611043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - 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":"NPB0118724-PL65","featured_media":{"alt":null,"id":23789189169251,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793158611043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":31386951057507,"product_id":7369161146467,"position":9,"created_at":"2024-04-23T15:36:17+08:00","updated_at":"2024-04-23T15:36:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777","variant_ids":[41793158611043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - 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":"NPB0118724-PL65","featured_media":{"alt":null,"id":23789189169251,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d509792a65be61ac4f80e65457d0bb490814d13b_da32ec26-c1b6-4309-802f-9b0272f0b613.webp?v=1713857777"}},"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: "停產" }