$product = {"id":7415948378211,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo貼紙款","handle":"iphone-xs-max-mod-nx-printable-sb04","description":null,"published_at":"2024-06-11T16:48:41+08:00","created_at":"2024-05-06T12:30:09+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41915832565859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490808938595,"product_id":7415948378211,"position":1,"created_at":"2024-05-06T12:30:12+08:00","updated_at":"2024-05-06T12:30:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812","variant_ids":[41915832565859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo貼紙款 - 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":"NPB0108624-SB04","featured_media":{"alt":null,"id":23896215814243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3371306bc5edb99affd1a80ef6ac31f0df2bbee9_5f8ecbed-d6e3-402a-bf8f-ecb1750cb3ce.webp?v=1714969814","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13a9b9db6f8a693d9f30ee78d9e46ef466524622_9415d2d9-65f5-4101-8871-26152350cca7.webp?v=1714969820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00a966896d465a6fa39316d41cce3f87c7acf58f_626574a0-3f2c-4f96-b9d2-4dd8efb29b28.webp?v=1714969823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/680933a13e5d65a07d67c41fa2f8bde81e1dad0b_e432c713-1f7d-47dd-ad74-a1a5bed543dc.webp?v=1714969825","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c01100b956fb678a964f5f6be8e196b2225d3af_76d4147a-4e23-4539-8260-712cade78887.webp?v=1714969828","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc791f77bea1b6a79779bdafc397b1e97e677a22_29f36f36-72b4-465d-aac6-c230c03e7040.webp?v=1714969831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05b98531669623fe98216f675b9c8bfad4aa1638_61b1343e-4812-49f1-9533-974488d72ac1.webp?v=1714969833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e71f63f2c5651ce0cb05f3155ee79aee733886_0f61507b-2ba4-4e24-8644-cf73d5ad0bdc.webp?v=1714969836"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812","options":["color"],"media":[{"alt":null,"id":23896215814243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812","width":2000},{"alt":null,"id":23896216436835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3371306bc5edb99affd1a80ef6ac31f0df2bbee9_5f8ecbed-d6e3-402a-bf8f-ecb1750cb3ce.webp?v=1714969814"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3371306bc5edb99affd1a80ef6ac31f0df2bbee9_5f8ecbed-d6e3-402a-bf8f-ecb1750cb3ce.webp?v=1714969814","width":2000},{"alt":null,"id":23896217845859,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13a9b9db6f8a693d9f30ee78d9e46ef466524622_9415d2d9-65f5-4101-8871-26152350cca7.webp?v=1714969820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13a9b9db6f8a693d9f30ee78d9e46ef466524622_9415d2d9-65f5-4101-8871-26152350cca7.webp?v=1714969820","width":2000},{"alt":null,"id":23896218370147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00a966896d465a6fa39316d41cce3f87c7acf58f_626574a0-3f2c-4f96-b9d2-4dd8efb29b28.webp?v=1714969823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00a966896d465a6fa39316d41cce3f87c7acf58f_626574a0-3f2c-4f96-b9d2-4dd8efb29b28.webp?v=1714969823","width":2000},{"alt":null,"id":23896218927203,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/680933a13e5d65a07d67c41fa2f8bde81e1dad0b_e432c713-1f7d-47dd-ad74-a1a5bed543dc.webp?v=1714969825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/680933a13e5d65a07d67c41fa2f8bde81e1dad0b_e432c713-1f7d-47dd-ad74-a1a5bed543dc.webp?v=1714969825","width":2000},{"alt":null,"id":23896219648099,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c01100b956fb678a964f5f6be8e196b2225d3af_76d4147a-4e23-4539-8260-712cade78887.webp?v=1714969828"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c01100b956fb678a964f5f6be8e196b2225d3af_76d4147a-4e23-4539-8260-712cade78887.webp?v=1714969828","width":2000},{"alt":null,"id":23896219975779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc791f77bea1b6a79779bdafc397b1e97e677a22_29f36f36-72b4-465d-aac6-c230c03e7040.webp?v=1714969831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc791f77bea1b6a79779bdafc397b1e97e677a22_29f36f36-72b4-465d-aac6-c230c03e7040.webp?v=1714969831","width":2000},{"alt":null,"id":23896220500067,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05b98531669623fe98216f675b9c8bfad4aa1638_61b1343e-4812-49f1-9533-974488d72ac1.webp?v=1714969833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05b98531669623fe98216f675b9c8bfad4aa1638_61b1343e-4812-49f1-9533-974488d72ac1.webp?v=1714969833","width":2000},{"alt":null,"id":23896221188195,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e71f63f2c5651ce0cb05f3155ee79aee733886_0f61507b-2ba4-4e24-8644-cf73d5ad0bdc.webp?v=1714969836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48e71f63f2c5651ce0cb05f3155ee79aee733886_0f61507b-2ba4-4e24-8644-cf73d5ad0bdc.webp?v=1714969836","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915832565859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490808938595,"product_id":7415948378211,"position":1,"created_at":"2024-05-06T12:30:12+08:00","updated_at":"2024-05-06T12:30:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812","variant_ids":[41915832565859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo貼紙款 - 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":"NPB0108624-SB04","featured_media":{"alt":null,"id":23896215814243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915832565859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490808938595,"product_id":7415948378211,"position":1,"created_at":"2024-05-06T12:30:12+08:00","updated_at":"2024-05-06T12:30:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812","variant_ids":[41915832565859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo貼紙款 - 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":"NPB0108624-SB04","featured_media":{"alt":null,"id":23896215814243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd056f038cfd92d06ea97382bcf1d966d0e2a585_439b00cf-6f91-4b5a-a593-0ca4252814d8.webp?v=1714969812"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }