$product = {"id":7416375345251,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Aloha!","handle":"iphone-8-mod-nx-printable-yf08","description":null,"published_at":"2024-06-11T16:57:21+08:00","created_at":"2024-05-06T14:44:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","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":41919056380003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31491976134755,"product_id":7416375345251,"position":8,"created_at":"2024-05-06T14:45:10+08:00","updated_at":"2024-05-06T14:45:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910","variant_ids":[41919056380003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Aloha! - 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-YF08","featured_media":{"alt":null,"id":23897389531235,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb821af8d1fb50fda12558cc94579c9089c1776a_cb068de1-1613-42c3-a2d7-a582c3ffd3ab.webp?v=1714977894","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/956eea7d20ab98ab09b6da363af627ac27e15276_8f743430-38e3-4a4e-8c60-cc3539d9d26f.webp?v=1714977897","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05001693522fbf3faf62a999eefb36e6294ab927_1c0d1be4-66d6-4f84-ab0a-2279c9da33a4.webp?v=1714977899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3496a0f67d1a791f522edf28fbbaa6ad6eab5cf_a4aa3ffd-511a-4679-a6c9-d4bb27b17c43.webp?v=1714977901","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64d9dd1bf6f3e95f684ae3aec26bbb630d45bdaa_c3a9cfdb-0e45-484b-85c2-c5f6def216e9.webp?v=1714977903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1388223d6e0d78411e1b6d1c98c2f132abad4f5_605ef3c8-818d-4c0b-b507-710461b7c549.webp?v=1714977906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe5497d789ae09896410b2328070474c3b0b7323_a9858917-307a-45b3-a1b7-aaa7b4e7e9ce.webp?v=1714977908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39de28a794796799e7679ecf187b814cbcd5c1d9_c1a0a4ee-b6b1-4770-871e-b3e488e20d96.webp?v=1714977912","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c119bd5345f08f11f97807eff69f2558976eb47_84f84da4-6b56-4e40-8848-0730eccafa43.webp?v=1714977915"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb821af8d1fb50fda12558cc94579c9089c1776a_cb068de1-1613-42c3-a2d7-a582c3ffd3ab.webp?v=1714977894","options":["color"],"media":[{"alt":null,"id":23897386188899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb821af8d1fb50fda12558cc94579c9089c1776a_cb068de1-1613-42c3-a2d7-a582c3ffd3ab.webp?v=1714977894"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb821af8d1fb50fda12558cc94579c9089c1776a_cb068de1-1613-42c3-a2d7-a582c3ffd3ab.webp?v=1714977894","width":2000},{"alt":null,"id":23897386713187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/956eea7d20ab98ab09b6da363af627ac27e15276_8f743430-38e3-4a4e-8c60-cc3539d9d26f.webp?v=1714977897"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/956eea7d20ab98ab09b6da363af627ac27e15276_8f743430-38e3-4a4e-8c60-cc3539d9d26f.webp?v=1714977897","width":2000},{"alt":null,"id":23897387171939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05001693522fbf3faf62a999eefb36e6294ab927_1c0d1be4-66d6-4f84-ab0a-2279c9da33a4.webp?v=1714977899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05001693522fbf3faf62a999eefb36e6294ab927_1c0d1be4-66d6-4f84-ab0a-2279c9da33a4.webp?v=1714977899","width":2000},{"alt":null,"id":23897387597923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3496a0f67d1a791f522edf28fbbaa6ad6eab5cf_a4aa3ffd-511a-4679-a6c9-d4bb27b17c43.webp?v=1714977901"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3496a0f67d1a791f522edf28fbbaa6ad6eab5cf_a4aa3ffd-511a-4679-a6c9-d4bb27b17c43.webp?v=1714977901","width":2000},{"alt":null,"id":23897388220515,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64d9dd1bf6f3e95f684ae3aec26bbb630d45bdaa_c3a9cfdb-0e45-484b-85c2-c5f6def216e9.webp?v=1714977903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64d9dd1bf6f3e95f684ae3aec26bbb630d45bdaa_c3a9cfdb-0e45-484b-85c2-c5f6def216e9.webp?v=1714977903","width":2000},{"alt":null,"id":23897388646499,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1388223d6e0d78411e1b6d1c98c2f132abad4f5_605ef3c8-818d-4c0b-b507-710461b7c549.webp?v=1714977906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1388223d6e0d78411e1b6d1c98c2f132abad4f5_605ef3c8-818d-4c0b-b507-710461b7c549.webp?v=1714977906","width":2000},{"alt":null,"id":23897389138019,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe5497d789ae09896410b2328070474c3b0b7323_a9858917-307a-45b3-a1b7-aaa7b4e7e9ce.webp?v=1714977908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe5497d789ae09896410b2328070474c3b0b7323_a9858917-307a-45b3-a1b7-aaa7b4e7e9ce.webp?v=1714977908","width":2000},{"alt":null,"id":23897389531235,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910","width":2000},{"alt":null,"id":23897389989987,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39de28a794796799e7679ecf187b814cbcd5c1d9_c1a0a4ee-b6b1-4770-871e-b3e488e20d96.webp?v=1714977912"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39de28a794796799e7679ecf187b814cbcd5c1d9_c1a0a4ee-b6b1-4770-871e-b3e488e20d96.webp?v=1714977912","width":2000},{"alt":null,"id":23897390350435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c119bd5345f08f11f97807eff69f2558976eb47_84f84da4-6b56-4e40-8848-0730eccafa43.webp?v=1714977915"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c119bd5345f08f11f97807eff69f2558976eb47_84f84da4-6b56-4e40-8848-0730eccafa43.webp?v=1714977915","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919056380003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31491976134755,"product_id":7416375345251,"position":8,"created_at":"2024-05-06T14:45:10+08:00","updated_at":"2024-05-06T14:45:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910","variant_ids":[41919056380003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Aloha! - 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-YF08","featured_media":{"alt":null,"id":23897389531235,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919056380003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31491976134755,"product_id":7416375345251,"position":8,"created_at":"2024-05-06T14:45:10+08:00","updated_at":"2024-05-06T14:45:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910","variant_ids":[41919056380003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Aloha! - 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-YF08","featured_media":{"alt":null,"id":23897389531235,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9b946cfe2cd99d6117c6ad1cd3ff3c986fd9d4d_a93888b5-7126-4896-94a0-a495b4285135.webp?v=1714977910"}},"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: "停產" }