$product = {"id":7416380555363,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號","handle":"iphone-8-mod-nx-printable-pb68","description":null,"published_at":"2024-06-11T16:57:30+08:00","created_at":"2024-05-06T14:45:48+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 8","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":41919114870883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31491988521059,"product_id":7416380555363,"position":9,"created_at":"2024-05-06T14:46:09+08:00","updated_at":"2024-05-06T14:46:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969","variant_ids":[41919114870883]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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-PB68","featured_media":{"alt":null,"id":23897402015843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa25ae8ca2b6f59d6e5562ad9aa600e5a591184_dfba818c-ab62-4ef8-81ed-2c23351d3824.webp?v=1714977950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c45f9c00c958e4cc570027c61cf7ecf40f7338e_664c0e22-405b-430a-b427-88b3dbef68ae.webp?v=1714977953","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63a07d5a4812a37434f939c0d9c7944e81b9c732_14a0db3f-45f5-4bd2-97d2-137e6515ad2d.webp?v=1714977955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fbbde24257d5d6ea43ce39b80c1cf4a587f7d2_1507f0a7-76f4-4b66-9eab-18b0e47d1296.webp?v=1714977958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c6cc0c4b35b9d38f7b691156402524e10da5240_9d4eb38f-0d96-446f-83ce-b301b2ff0c2a.webp?v=1714977960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f581649f0d8c3ae844550da10e9f30138587c1c0_561444e8-b2a7-4908-9387-bf6f236b8e5e.webp?v=1714977962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1deb61b6dc7dc6994caf6401e9b5e2581987e041_d1f73714-0375-491d-b9fa-3b3fbd1f6378.webp?v=1714977965","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b96d7e10c6bc3e143c8f22fc2ee50df47c8dad_d039f3d6-4dc3-4234-b88a-f52dd1999504.webp?v=1714977967","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e62a3b289ca40a8b2eb7990d385a2354c61007_158bb9cf-7fd0-4283-b2cc-8f058e4bbd1b.webp?v=1714977972"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa25ae8ca2b6f59d6e5562ad9aa600e5a591184_dfba818c-ab62-4ef8-81ed-2c23351d3824.webp?v=1714977950","options":["color"],"media":[{"alt":null,"id":23897397919843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa25ae8ca2b6f59d6e5562ad9aa600e5a591184_dfba818c-ab62-4ef8-81ed-2c23351d3824.webp?v=1714977950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfa25ae8ca2b6f59d6e5562ad9aa600e5a591184_dfba818c-ab62-4ef8-81ed-2c23351d3824.webp?v=1714977950","width":2000},{"alt":null,"id":23897398575203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c45f9c00c958e4cc570027c61cf7ecf40f7338e_664c0e22-405b-430a-b427-88b3dbef68ae.webp?v=1714977953"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c45f9c00c958e4cc570027c61cf7ecf40f7338e_664c0e22-405b-430a-b427-88b3dbef68ae.webp?v=1714977953","width":2000},{"alt":null,"id":23897399066723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63a07d5a4812a37434f939c0d9c7944e81b9c732_14a0db3f-45f5-4bd2-97d2-137e6515ad2d.webp?v=1714977955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63a07d5a4812a37434f939c0d9c7944e81b9c732_14a0db3f-45f5-4bd2-97d2-137e6515ad2d.webp?v=1714977955","width":2000},{"alt":null,"id":23897399558243,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fbbde24257d5d6ea43ce39b80c1cf4a587f7d2_1507f0a7-76f4-4b66-9eab-18b0e47d1296.webp?v=1714977958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fbbde24257d5d6ea43ce39b80c1cf4a587f7d2_1507f0a7-76f4-4b66-9eab-18b0e47d1296.webp?v=1714977958","width":2000},{"alt":null,"id":23897400115299,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c6cc0c4b35b9d38f7b691156402524e10da5240_9d4eb38f-0d96-446f-83ce-b301b2ff0c2a.webp?v=1714977960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c6cc0c4b35b9d38f7b691156402524e10da5240_9d4eb38f-0d96-446f-83ce-b301b2ff0c2a.webp?v=1714977960","width":2000},{"alt":null,"id":23897400770659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f581649f0d8c3ae844550da10e9f30138587c1c0_561444e8-b2a7-4908-9387-bf6f236b8e5e.webp?v=1714977962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f581649f0d8c3ae844550da10e9f30138587c1c0_561444e8-b2a7-4908-9387-bf6f236b8e5e.webp?v=1714977962","width":2000},{"alt":null,"id":23897401196643,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1deb61b6dc7dc6994caf6401e9b5e2581987e041_d1f73714-0375-491d-b9fa-3b3fbd1f6378.webp?v=1714977965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1deb61b6dc7dc6994caf6401e9b5e2581987e041_d1f73714-0375-491d-b9fa-3b3fbd1f6378.webp?v=1714977965","width":2000},{"alt":null,"id":23897401655395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b96d7e10c6bc3e143c8f22fc2ee50df47c8dad_d039f3d6-4dc3-4234-b88a-f52dd1999504.webp?v=1714977967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b96d7e10c6bc3e143c8f22fc2ee50df47c8dad_d039f3d6-4dc3-4234-b88a-f52dd1999504.webp?v=1714977967","width":2000},{"alt":null,"id":23897402015843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969","width":2000},{"alt":null,"id":23897402638435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e62a3b289ca40a8b2eb7990d385a2354c61007_158bb9cf-7fd0-4283-b2cc-8f058e4bbd1b.webp?v=1714977972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57e62a3b289ca40a8b2eb7990d385a2354c61007_158bb9cf-7fd0-4283-b2cc-8f058e4bbd1b.webp?v=1714977972","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919114870883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31491988521059,"product_id":7416380555363,"position":9,"created_at":"2024-05-06T14:46:09+08:00","updated_at":"2024-05-06T14:46:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969","variant_ids":[41919114870883]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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-PB68","featured_media":{"alt":null,"id":23897402015843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919114870883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31491988521059,"product_id":7416380555363,"position":9,"created_at":"2024-05-06T14:46:09+08:00","updated_at":"2024-05-06T14:46:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969","variant_ids":[41919114870883]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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-PB68","featured_media":{"alt":null,"id":23897402015843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bad8653d37360df19637ee672439764cafdba69_bb70132a-cd39-44ea-9f42-56d08e6239a3.webp?v=1714977969"}},"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: "停產" }