$product = {"id":7407925821539,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-黑白條紋","handle":"iphone-14-plus-mod-nx-printable-pb19","description":null,"published_at":"2024-06-11T16:26:43+08:00","created_at":"2024-05-03T11:17:12+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":41880612307043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31470719533155,"product_id":7407925821539,"position":8,"created_at":"2024-05-03T11:17:32+08:00","updated_at":"2024-05-03T11:17:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252","variant_ids":[41880612307043]},"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-PB19","featured_media":{"alt":null,"id":23875623583843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd125e9514d6b2a5ff7dd1595907d47eecac9ba0_a6afdf36-0803-49ab-b7cd-919308e4e696.webp?v=1714706235","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a802c0c05ac60f6d4d809de6d7387e93f9e8d115_4c87223a-8a86-4127-9bfb-7c34d3ba831d.webp?v=1714706237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30060651c7a26b43b9f5016a301faed14d63b665_62b0bdd5-c56d-418c-b218-2d59f6b46021.webp?v=1714706239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c01784174c6168c9678899b951b580991ae0e5_4f84c267-8149-4101-b63e-0d0030e444ff.webp?v=1714706242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb479a3c8acd9481ffef16ddfc93b876530f38c4_5a5edb89-85e3-4090-860d-2f1ff06e11b9.webp?v=1714706244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2385012f86c7bfdb9b3d3deb64b268966e57896f_5c59598d-e33f-4917-80c4-f3ebe8565dd3.webp?v=1714706247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b451b6a1733423a7e50ef098e257c4f7c3d5911_de08d8a6-90ca-40be-8602-f213be2e4abe.webp?v=1714706249","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69110be9be51ca68007164aca4d849584933e3a9_ac7a5481-1913-4460-971c-eb6d54ebe4d6.webp?v=1714706254","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe24d28b7ffef07db077d5e1afb47ca9d6dad463_5f9c71bf-ca79-4c8c-adbe-2e9adc3c9698.webp?v=1714706256"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd125e9514d6b2a5ff7dd1595907d47eecac9ba0_a6afdf36-0803-49ab-b7cd-919308e4e696.webp?v=1714706235","options":["color"],"media":[{"alt":null,"id":23875619979363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd125e9514d6b2a5ff7dd1595907d47eecac9ba0_a6afdf36-0803-49ab-b7cd-919308e4e696.webp?v=1714706235"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd125e9514d6b2a5ff7dd1595907d47eecac9ba0_a6afdf36-0803-49ab-b7cd-919308e4e696.webp?v=1714706235","width":2000},{"alt":null,"id":23875620405347,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a802c0c05ac60f6d4d809de6d7387e93f9e8d115_4c87223a-8a86-4127-9bfb-7c34d3ba831d.webp?v=1714706237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a802c0c05ac60f6d4d809de6d7387e93f9e8d115_4c87223a-8a86-4127-9bfb-7c34d3ba831d.webp?v=1714706237","width":2000},{"alt":null,"id":23875620962403,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30060651c7a26b43b9f5016a301faed14d63b665_62b0bdd5-c56d-418c-b218-2d59f6b46021.webp?v=1714706239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30060651c7a26b43b9f5016a301faed14d63b665_62b0bdd5-c56d-418c-b218-2d59f6b46021.webp?v=1714706239","width":2000},{"alt":null,"id":23875621421155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c01784174c6168c9678899b951b580991ae0e5_4f84c267-8149-4101-b63e-0d0030e444ff.webp?v=1714706242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c01784174c6168c9678899b951b580991ae0e5_4f84c267-8149-4101-b63e-0d0030e444ff.webp?v=1714706242","width":2000},{"alt":null,"id":23875621879907,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb479a3c8acd9481ffef16ddfc93b876530f38c4_5a5edb89-85e3-4090-860d-2f1ff06e11b9.webp?v=1714706244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb479a3c8acd9481ffef16ddfc93b876530f38c4_5a5edb89-85e3-4090-860d-2f1ff06e11b9.webp?v=1714706244","width":2000},{"alt":null,"id":23875622207587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2385012f86c7bfdb9b3d3deb64b268966e57896f_5c59598d-e33f-4917-80c4-f3ebe8565dd3.webp?v=1714706247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2385012f86c7bfdb9b3d3deb64b268966e57896f_5c59598d-e33f-4917-80c4-f3ebe8565dd3.webp?v=1714706247","width":2000},{"alt":null,"id":23875622764643,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b451b6a1733423a7e50ef098e257c4f7c3d5911_de08d8a6-90ca-40be-8602-f213be2e4abe.webp?v=1714706249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b451b6a1733423a7e50ef098e257c4f7c3d5911_de08d8a6-90ca-40be-8602-f213be2e4abe.webp?v=1714706249","width":2000},{"alt":null,"id":23875623583843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252","width":2000},{"alt":null,"id":23875624140899,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69110be9be51ca68007164aca4d849584933e3a9_ac7a5481-1913-4460-971c-eb6d54ebe4d6.webp?v=1714706254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69110be9be51ca68007164aca4d849584933e3a9_ac7a5481-1913-4460-971c-eb6d54ebe4d6.webp?v=1714706254","width":2000},{"alt":null,"id":23875624566883,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe24d28b7ffef07db077d5e1afb47ca9d6dad463_5f9c71bf-ca79-4c8c-adbe-2e9adc3c9698.webp?v=1714706256"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe24d28b7ffef07db077d5e1afb47ca9d6dad463_5f9c71bf-ca79-4c8c-adbe-2e9adc3c9698.webp?v=1714706256","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41880612307043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31470719533155,"product_id":7407925821539,"position":8,"created_at":"2024-05-03T11:17:32+08:00","updated_at":"2024-05-03T11:17:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252","variant_ids":[41880612307043]},"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-PB19","featured_media":{"alt":null,"id":23875623583843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880612307043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31470719533155,"product_id":7407925821539,"position":8,"created_at":"2024-05-03T11:17:32+08:00","updated_at":"2024-05-03T11:17:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252","variant_ids":[41880612307043]},"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-PB19","featured_media":{"alt":null,"id":23875623583843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62e37775d4991797c0d66578ac70ebdc11287e2a_016ca0b3-4cf5-4ba2-a203-29cff6ea2cdd.webp?v=1714706252"}},"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: "停產" }