$product = {"id":7369151610979,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Snoopy 史努比 - 潛水趣","handle":"iphone-8-mod-nx-printable-pl60","description":null,"published_at":"2024-06-11T16:13:21+08:00","created_at":"2024-04-23T15:34:18+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 8","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":41793068826723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PL60","requires_shipping":true,"taxable":true,"featured_image":{"id":31386925203555,"product_id":7369151610979,"position":9,"created_at":"2024-04-23T15:34:41+08:00","updated_at":"2024-04-23T15:34:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681","variant_ids":[41793068826723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-PL60","featured_media":{"alt":null,"id":23789163315299,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c6b30eb34ef463b21f6f20f1ee8ad2133ebc94e_8a26fca7-fd4c-431c-a8e2-744786c20919.webp?v=1713857661","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c70467878908458bbb381ffb10e437a606bba196_6eded44f-6f52-49fd-be1a-cefd6666a390.webp?v=1713857663","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2a6a2ee4537722af6f3eeabed4f8400f878f1f_24dce03f-f710-4128-8f9d-040ca587393b.webp?v=1713857666","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44c35a89f732a879be4a4a32beac749771d43044_e08a6dff-b338-42e5-b319-e68c5cfac38c.webp?v=1713857669","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01bd763952d0cf9ba8acea094ec713bc6bcfc681_dd1b43a0-dea5-47d8-b29c-f4f03399eef0.webp?v=1713857672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e47884b7c12c798c3970e0a95a1050024d018ae_bcf592a4-bf3b-496e-8c46-38d7395fdaad.webp?v=1713857674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8a3b4e9814b89bfab03e890b05d9e2879a5090_afd68c27-8323-4881-b86c-751cb27aa1c0.webp?v=1713857677","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfb65021830a00a5e49e1d241c1ec2d8c6c227cb_b13c3c21-d91b-45b3-8f2c-dc67699180d0.webp?v=1713857679","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c72e80fec4d7e42768c94448706fe2d260d8d0_1635662b-992a-4032-bf48-b5d423c90aa1.webp?v=1713857684"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c6b30eb34ef463b21f6f20f1ee8ad2133ebc94e_8a26fca7-fd4c-431c-a8e2-744786c20919.webp?v=1713857661","options":["color"],"media":[{"alt":null,"id":23789157810275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c6b30eb34ef463b21f6f20f1ee8ad2133ebc94e_8a26fca7-fd4c-431c-a8e2-744786c20919.webp?v=1713857661"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c6b30eb34ef463b21f6f20f1ee8ad2133ebc94e_8a26fca7-fd4c-431c-a8e2-744786c20919.webp?v=1713857661","width":2000},{"alt":null,"id":23789158334563,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c70467878908458bbb381ffb10e437a606bba196_6eded44f-6f52-49fd-be1a-cefd6666a390.webp?v=1713857663"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c70467878908458bbb381ffb10e437a606bba196_6eded44f-6f52-49fd-be1a-cefd6666a390.webp?v=1713857663","width":2000},{"alt":null,"id":23789159448675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2a6a2ee4537722af6f3eeabed4f8400f878f1f_24dce03f-f710-4128-8f9d-040ca587393b.webp?v=1713857666"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2a6a2ee4537722af6f3eeabed4f8400f878f1f_24dce03f-f710-4128-8f9d-040ca587393b.webp?v=1713857666","width":2000},{"alt":null,"id":23789160333411,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44c35a89f732a879be4a4a32beac749771d43044_e08a6dff-b338-42e5-b319-e68c5cfac38c.webp?v=1713857669"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44c35a89f732a879be4a4a32beac749771d43044_e08a6dff-b338-42e5-b319-e68c5cfac38c.webp?v=1713857669","width":2000},{"alt":null,"id":23789160857699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01bd763952d0cf9ba8acea094ec713bc6bcfc681_dd1b43a0-dea5-47d8-b29c-f4f03399eef0.webp?v=1713857672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01bd763952d0cf9ba8acea094ec713bc6bcfc681_dd1b43a0-dea5-47d8-b29c-f4f03399eef0.webp?v=1713857672","width":2000},{"alt":null,"id":23789161644131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e47884b7c12c798c3970e0a95a1050024d018ae_bcf592a4-bf3b-496e-8c46-38d7395fdaad.webp?v=1713857674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e47884b7c12c798c3970e0a95a1050024d018ae_bcf592a4-bf3b-496e-8c46-38d7395fdaad.webp?v=1713857674","width":2000},{"alt":null,"id":23789162201187,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8a3b4e9814b89bfab03e890b05d9e2879a5090_afd68c27-8323-4881-b86c-751cb27aa1c0.webp?v=1713857677"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8a3b4e9814b89bfab03e890b05d9e2879a5090_afd68c27-8323-4881-b86c-751cb27aa1c0.webp?v=1713857677","width":2000},{"alt":null,"id":23789162725475,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfb65021830a00a5e49e1d241c1ec2d8c6c227cb_b13c3c21-d91b-45b3-8f2c-dc67699180d0.webp?v=1713857679"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfb65021830a00a5e49e1d241c1ec2d8c6c227cb_b13c3c21-d91b-45b3-8f2c-dc67699180d0.webp?v=1713857679","width":2000},{"alt":null,"id":23789163315299,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681","width":2000},{"alt":null,"id":23789164068963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c72e80fec4d7e42768c94448706fe2d260d8d0_1635662b-992a-4032-bf48-b5d423c90aa1.webp?v=1713857684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c72e80fec4d7e42768c94448706fe2d260d8d0_1635662b-992a-4032-bf48-b5d423c90aa1.webp?v=1713857684","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793068826723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PL60","requires_shipping":true,"taxable":true,"featured_image":{"id":31386925203555,"product_id":7369151610979,"position":9,"created_at":"2024-04-23T15:34:41+08:00","updated_at":"2024-04-23T15:34:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681","variant_ids":[41793068826723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-PL60","featured_media":{"alt":null,"id":23789163315299,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793068826723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PL60","requires_shipping":true,"taxable":true,"featured_image":{"id":31386925203555,"product_id":7369151610979,"position":9,"created_at":"2024-04-23T15:34:41+08:00","updated_at":"2024-04-23T15:34:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681","variant_ids":[41793068826723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-PL60","featured_media":{"alt":null,"id":23789163315299,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c443cc1d99ab75f7d7722843d6af4a1060e63c35_505fe73b-3666-4f38-8a6c-ff43cecfccca.webp?v=1713857681"}},"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: "停產" }