$product = {"id":7416374427747,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - The Powerpuff Girls - 泡泡","handle":"iphone-8-mod-nx-printable-sr06","description":null,"published_at":"2024-06-11T16:57:19+08:00","created_at":"2024-05-06T14:44:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-The Powerpuff Girls","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-the-power-puff-girls","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-the-power-puff-girls","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":41919045992547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SR06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491975315555,"product_id":7416374427747,"position":9,"created_at":"2024-05-06T14:45:06+08:00","updated_at":"2024-05-06T14:45:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906","variant_ids":[41919045992547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - The Powerpuff Girls - 泡泡 - 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-SR06","featured_media":{"alt":null,"id":23897388679267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80c521b257cfb1bebfa792df8f451d94d3dcb1d5_fbcabf59-1a05-40e6-bc71-0d7478d0ffc2.webp?v=1714977883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c75d446e338986e469dcb49eea2c50cc1ed2ae01_2f09e267-7e36-42cf-bd33-f5cf7eea6d72.webp?v=1714977886","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa801911c1e3f97b5245cb5f8867830719a526d_14495340-c73d-4fd1-8cbe-72aedb218019.webp?v=1714977888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79cae481a884b8168638a4cdb9994af7388a22db_1a1ec1f5-30f5-4548-ab68-64c8f9a390bd.webp?v=1714977891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9ead758af58ef05aa28d16baefe1a80c186a67d_83b937fe-7af6-4344-8f6d-1844ecc02544.webp?v=1714977893","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41d93c69ba06b6f612ac52fbf6ae680729283f7_e784a19e-13d5-4f63-be6f-f683efa091dd.webp?v=1714977896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5f00e3f2a2baa946fff8aaf56d24665eefc83dc_d6b52435-9e75-4797-99df-ac58518f1c8e.webp?v=1714977898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4d7f2fb8b905adcadd6a3206c1cdbd9dfe7dee_5788aa0a-322e-4fdd-b448-4cca7d493589.webp?v=1714977901","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80c521b257cfb1bebfa792df8f451d94d3dcb1d5_fbcabf59-1a05-40e6-bc71-0d7478d0ffc2.webp?v=1714977883","options":["color"],"media":[{"alt":null,"id":23897383403619,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80c521b257cfb1bebfa792df8f451d94d3dcb1d5_fbcabf59-1a05-40e6-bc71-0d7478d0ffc2.webp?v=1714977883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80c521b257cfb1bebfa792df8f451d94d3dcb1d5_fbcabf59-1a05-40e6-bc71-0d7478d0ffc2.webp?v=1714977883","width":2000},{"alt":null,"id":23897384026211,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c75d446e338986e469dcb49eea2c50cc1ed2ae01_2f09e267-7e36-42cf-bd33-f5cf7eea6d72.webp?v=1714977886"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c75d446e338986e469dcb49eea2c50cc1ed2ae01_2f09e267-7e36-42cf-bd33-f5cf7eea6d72.webp?v=1714977886","width":2000},{"alt":null,"id":23897384616035,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa801911c1e3f97b5245cb5f8867830719a526d_14495340-c73d-4fd1-8cbe-72aedb218019.webp?v=1714977888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa801911c1e3f97b5245cb5f8867830719a526d_14495340-c73d-4fd1-8cbe-72aedb218019.webp?v=1714977888","width":2000},{"alt":null,"id":23897385205859,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79cae481a884b8168638a4cdb9994af7388a22db_1a1ec1f5-30f5-4548-ab68-64c8f9a390bd.webp?v=1714977891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79cae481a884b8168638a4cdb9994af7388a22db_1a1ec1f5-30f5-4548-ab68-64c8f9a390bd.webp?v=1714977891","width":2000},{"alt":null,"id":23897385926755,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9ead758af58ef05aa28d16baefe1a80c186a67d_83b937fe-7af6-4344-8f6d-1844ecc02544.webp?v=1714977893"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9ead758af58ef05aa28d16baefe1a80c186a67d_83b937fe-7af6-4344-8f6d-1844ecc02544.webp?v=1714977893","width":2000},{"alt":null,"id":23897386483811,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41d93c69ba06b6f612ac52fbf6ae680729283f7_e784a19e-13d5-4f63-be6f-f683efa091dd.webp?v=1714977896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f41d93c69ba06b6f612ac52fbf6ae680729283f7_e784a19e-13d5-4f63-be6f-f683efa091dd.webp?v=1714977896","width":2000},{"alt":null,"id":23897387008099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5f00e3f2a2baa946fff8aaf56d24665eefc83dc_d6b52435-9e75-4797-99df-ac58518f1c8e.webp?v=1714977898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5f00e3f2a2baa946fff8aaf56d24665eefc83dc_d6b52435-9e75-4797-99df-ac58518f1c8e.webp?v=1714977898","width":2000},{"alt":null,"id":23897387434083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4d7f2fb8b905adcadd6a3206c1cdbd9dfe7dee_5788aa0a-322e-4fdd-b448-4cca7d493589.webp?v=1714977901"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4d7f2fb8b905adcadd6a3206c1cdbd9dfe7dee_5788aa0a-322e-4fdd-b448-4cca7d493589.webp?v=1714977901","width":2000},{"alt":null,"id":23897388679267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919045992547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SR06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491975315555,"product_id":7416374427747,"position":9,"created_at":"2024-05-06T14:45:06+08:00","updated_at":"2024-05-06T14:45:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906","variant_ids":[41919045992547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - The Powerpuff Girls - 泡泡 - 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-SR06","featured_media":{"alt":null,"id":23897388679267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919045992547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SR06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491975315555,"product_id":7416374427747,"position":9,"created_at":"2024-05-06T14:45:06+08:00","updated_at":"2024-05-06T14:45:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906","variant_ids":[41919045992547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - The Powerpuff Girls - 泡泡 - 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-SR06","featured_media":{"alt":null,"id":23897388679267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5c0e560847157a115315e00f1769f34ec99fa7e_7fc71bff-e898-43ad-8444-377b11097240.webp?v=1714977906"}},"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: "停產" }