$product = {"id":7407989653603,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列","handle":"iphone-14-plus-mod-nx-printable-pb98","description":null,"published_at":"2024-06-11T16:28:28+08:00","created_at":"2024-05-03T11:29:45+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41881440354403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470886420579,"product_id":7407989653603,"position":1,"created_at":"2024-05-03T11:29:47+08:00","updated_at":"2024-05-03T11:29:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987","variant_ids":[41881440354403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - 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":"NPB0126124-PB98","featured_media":{"alt":null,"id":23875791028323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4c2c869d5301fe54f50635ae197293192a5a47d_02164807-9a35-40d6-977f-24be1c604ce6.webp?v=1714706990","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22406f5b644eef04fd2ed61dc91d67e197ec6940_d7eefced-9539-4ff0-afa5-e9d62bb4be23.webp?v=1714706992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75e42a6516b03308b67457908110144eda5335ef_c70d2eae-1954-4ca4-869a-44afbd361918.webp?v=1714706994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d92fe8dec7ec2e9f9d6ab39f9c78f40951711ef_cdbdc961-edb8-43da-b376-511671300214.webp?v=1714706997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcfc64a8d057439d0029c1c8c2598dcdb1ff2fba_51389fcb-ff00-43e3-b8b4-5c95547d43c2.webp?v=1714706999","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/076547442a7d97cf92dd68e204a42ff569fdb507_7efcbc73-ab71-425a-b38e-0db68434c897.webp?v=1714707001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/566953249c45fef6a63f7a60c14b0c096382453f_69c5e010-ea0d-4365-9d77-3eec7bfadac4.webp?v=1714707003","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1457b0b0503e05662241998d7f07f81c3a7f3_fbe75439-db13-4277-af04-c5ad366f0be8.webp?v=1714707006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3253057e1cb0be435b6cd9ab29591c0452e91066_fc8ae8a4-1849-4f22-bdda-81c980b91045.webp?v=1714707009"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987","options":["color"],"media":[{"alt":null,"id":23875791028323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987","width":2000},{"alt":null,"id":23875791618147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4c2c869d5301fe54f50635ae197293192a5a47d_02164807-9a35-40d6-977f-24be1c604ce6.webp?v=1714706990"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4c2c869d5301fe54f50635ae197293192a5a47d_02164807-9a35-40d6-977f-24be1c604ce6.webp?v=1714706990","width":2000},{"alt":null,"id":23875792207971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22406f5b644eef04fd2ed61dc91d67e197ec6940_d7eefced-9539-4ff0-afa5-e9d62bb4be23.webp?v=1714706992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22406f5b644eef04fd2ed61dc91d67e197ec6940_d7eefced-9539-4ff0-afa5-e9d62bb4be23.webp?v=1714706992","width":2000},{"alt":null,"id":23875792830563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75e42a6516b03308b67457908110144eda5335ef_c70d2eae-1954-4ca4-869a-44afbd361918.webp?v=1714706994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75e42a6516b03308b67457908110144eda5335ef_c70d2eae-1954-4ca4-869a-44afbd361918.webp?v=1714706994","width":2000},{"alt":null,"id":23875793322083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d92fe8dec7ec2e9f9d6ab39f9c78f40951711ef_cdbdc961-edb8-43da-b376-511671300214.webp?v=1714706997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d92fe8dec7ec2e9f9d6ab39f9c78f40951711ef_cdbdc961-edb8-43da-b376-511671300214.webp?v=1714706997","width":2000},{"alt":null,"id":23875793748067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcfc64a8d057439d0029c1c8c2598dcdb1ff2fba_51389fcb-ff00-43e3-b8b4-5c95547d43c2.webp?v=1714706999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcfc64a8d057439d0029c1c8c2598dcdb1ff2fba_51389fcb-ff00-43e3-b8b4-5c95547d43c2.webp?v=1714706999","width":2000},{"alt":null,"id":23875794042979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/076547442a7d97cf92dd68e204a42ff569fdb507_7efcbc73-ab71-425a-b38e-0db68434c897.webp?v=1714707001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/076547442a7d97cf92dd68e204a42ff569fdb507_7efcbc73-ab71-425a-b38e-0db68434c897.webp?v=1714707001","width":2000},{"alt":null,"id":23875794272355,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/566953249c45fef6a63f7a60c14b0c096382453f_69c5e010-ea0d-4365-9d77-3eec7bfadac4.webp?v=1714707003"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/566953249c45fef6a63f7a60c14b0c096382453f_69c5e010-ea0d-4365-9d77-3eec7bfadac4.webp?v=1714707003","width":2000},{"alt":null,"id":23875794600035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1457b0b0503e05662241998d7f07f81c3a7f3_fbe75439-db13-4277-af04-c5ad366f0be8.webp?v=1714707006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1457b0b0503e05662241998d7f07f81c3a7f3_fbe75439-db13-4277-af04-c5ad366f0be8.webp?v=1714707006","width":2000},{"alt":null,"id":23875794829411,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3253057e1cb0be435b6cd9ab29591c0452e91066_fc8ae8a4-1849-4f22-bdda-81c980b91045.webp?v=1714707009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3253057e1cb0be435b6cd9ab29591c0452e91066_fc8ae8a4-1849-4f22-bdda-81c980b91045.webp?v=1714707009","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41881440354403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470886420579,"product_id":7407989653603,"position":1,"created_at":"2024-05-03T11:29:47+08:00","updated_at":"2024-05-03T11:29:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987","variant_ids":[41881440354403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - 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":"NPB0126124-PB98","featured_media":{"alt":null,"id":23875791028323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41881440354403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB98","requires_shipping":true,"taxable":true,"featured_image":{"id":31470886420579,"product_id":7407989653603,"position":1,"created_at":"2024-05-03T11:29:47+08:00","updated_at":"2024-05-03T11:29:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987","variant_ids":[41881440354403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星球大戰-貼紙系列 - 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":"NPB0126124-PB98","featured_media":{"alt":null,"id":23875791028323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c41f57e662667b05c262158664a337b8f2e5666_789bcd41-894d-4cb9-aa0d-977048a40377.webp?v=1714706987"}},"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: "停產" }