$product = {"id":7407971008611,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰角色-漫畫系列","handle":"iphone-14-plus-mod-nx-printable-pb84","description":null,"published_at":"2024-06-11T16:27:58+08:00","created_at":"2024-05-03T11:26:08+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":41881210191971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31470843527267,"product_id":7407971008611,"position":10,"created_at":"2024-05-03T11:26:33+08:00","updated_at":"2024-05-03T11:26:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793","variant_ids":[41881210191971]},"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-PB84","featured_media":{"alt":null,"id":23875747971171,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80373867b81cb28ec95b977447ff838042ec34c0_76156a04-7d44-4f68-92cc-01c46ac5b59c.webp?v=1714706770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a238a963133216bc8a429adaf8810dfe902dc61d_2e02573b-62b7-49e1-b2a2-7463fc99ae42.webp?v=1714706773","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5e43f53d2e97052b3506c4d3c12503666560c1f_6ccbcc00-bf6c-4a55-8bdf-5aa72eacaa09.webp?v=1714706775","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28b7811eeaa45e9edbbb4fd259df40f3d83e4ff9_6b631813-197c-4c21-8c9a-c23c03581fd3.webp?v=1714706778","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/207e73286ecf413318365590b7889522e3444e04_2b2e841b-5372-4f6d-8418-0a6aeb6439c3.webp?v=1714706780","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cebd61b19465cc2627635fa7a0ea905061ab4efe_2397fbbb-4423-45f5-8636-58eeb0e1c101.webp?v=1714706783","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62f2db97522a2cf9aaa612a5942dbf900da6b0b7_ff5cd9c1-cba7-41b4-9b7e-0c3d6bab9f44.webp?v=1714706786","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2eef16a4dd54d2176f73b5c9e873171d7f47c6_45064729-f63e-4234-a5ad-b96e6011a9b2.webp?v=1714706788","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca50d6e843640dc81905b943054b64b5897b6199_d1605477-93df-4f90-a30e-d7582b961cb0.webp?v=1714706791","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80373867b81cb28ec95b977447ff838042ec34c0_76156a04-7d44-4f68-92cc-01c46ac5b59c.webp?v=1714706770","options":["color"],"media":[{"alt":null,"id":23875740500067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80373867b81cb28ec95b977447ff838042ec34c0_76156a04-7d44-4f68-92cc-01c46ac5b59c.webp?v=1714706770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80373867b81cb28ec95b977447ff838042ec34c0_76156a04-7d44-4f68-92cc-01c46ac5b59c.webp?v=1714706770","width":2000},{"alt":null,"id":23875741155427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a238a963133216bc8a429adaf8810dfe902dc61d_2e02573b-62b7-49e1-b2a2-7463fc99ae42.webp?v=1714706773"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a238a963133216bc8a429adaf8810dfe902dc61d_2e02573b-62b7-49e1-b2a2-7463fc99ae42.webp?v=1714706773","width":2000},{"alt":null,"id":23875741778019,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5e43f53d2e97052b3506c4d3c12503666560c1f_6ccbcc00-bf6c-4a55-8bdf-5aa72eacaa09.webp?v=1714706775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5e43f53d2e97052b3506c4d3c12503666560c1f_6ccbcc00-bf6c-4a55-8bdf-5aa72eacaa09.webp?v=1714706775","width":2000},{"alt":null,"id":23875742236771,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28b7811eeaa45e9edbbb4fd259df40f3d83e4ff9_6b631813-197c-4c21-8c9a-c23c03581fd3.webp?v=1714706778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28b7811eeaa45e9edbbb4fd259df40f3d83e4ff9_6b631813-197c-4c21-8c9a-c23c03581fd3.webp?v=1714706778","width":2000},{"alt":null,"id":23875742793827,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/207e73286ecf413318365590b7889522e3444e04_2b2e841b-5372-4f6d-8418-0a6aeb6439c3.webp?v=1714706780"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/207e73286ecf413318365590b7889522e3444e04_2b2e841b-5372-4f6d-8418-0a6aeb6439c3.webp?v=1714706780","width":2000},{"alt":null,"id":23875743285347,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cebd61b19465cc2627635fa7a0ea905061ab4efe_2397fbbb-4423-45f5-8636-58eeb0e1c101.webp?v=1714706783"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cebd61b19465cc2627635fa7a0ea905061ab4efe_2397fbbb-4423-45f5-8636-58eeb0e1c101.webp?v=1714706783","width":2000},{"alt":null,"id":23875743875171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62f2db97522a2cf9aaa612a5942dbf900da6b0b7_ff5cd9c1-cba7-41b4-9b7e-0c3d6bab9f44.webp?v=1714706786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62f2db97522a2cf9aaa612a5942dbf900da6b0b7_ff5cd9c1-cba7-41b4-9b7e-0c3d6bab9f44.webp?v=1714706786","width":2000},{"alt":null,"id":23875744399459,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2eef16a4dd54d2176f73b5c9e873171d7f47c6_45064729-f63e-4234-a5ad-b96e6011a9b2.webp?v=1714706788"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2eef16a4dd54d2176f73b5c9e873171d7f47c6_45064729-f63e-4234-a5ad-b96e6011a9b2.webp?v=1714706788","width":2000},{"alt":null,"id":23875744890979,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca50d6e843640dc81905b943054b64b5897b6199_d1605477-93df-4f90-a30e-d7582b961cb0.webp?v=1714706791"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca50d6e843640dc81905b943054b64b5897b6199_d1605477-93df-4f90-a30e-d7582b961cb0.webp?v=1714706791","width":2000},{"alt":null,"id":23875747971171,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41881210191971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31470843527267,"product_id":7407971008611,"position":10,"created_at":"2024-05-03T11:26:33+08:00","updated_at":"2024-05-03T11:26:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793","variant_ids":[41881210191971]},"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-PB84","featured_media":{"alt":null,"id":23875747971171,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41881210191971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31470843527267,"product_id":7407971008611,"position":10,"created_at":"2024-05-03T11:26:33+08:00","updated_at":"2024-05-03T11:26:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793","variant_ids":[41881210191971]},"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-PB84","featured_media":{"alt":null,"id":23875747971171,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfdd2a8c290d2724e49fbd2881e9a3c4c61c301_bb181c85-45b5-4c32-8df8-6abb401eb234.webp?v=1714706793"}},"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: "停產" }