$product = {"id":7407843999843,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 經典幾何Pattern","handle":"iphone-14-plus-mod-nx-printable-pc03","description":null,"published_at":"2024-06-11T16:24:25+08:00","created_at":"2024-05-03T11:01:05+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":41879537746019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC03","requires_shipping":true,"taxable":true,"featured_image":{"id":31470507098211,"product_id":7407843999843,"position":1,"created_at":"2024-05-03T11:01:08+08:00","updated_at":"2024-05-03T11:01:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268","variant_ids":[41879537746019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 經典幾何Pattern - 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-PC03","featured_media":{"alt":null,"id":23875410853987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1a90062bad6d5c7caa1bd78a32c8cf35e05f1a_7c8be470-b5c6-43a1-8a36-22d176eb06ab.webp?v=1714705270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196ffd2e7766597c91240881c068b6d2ecc77caf_a59ef55b-d249-4e17-98b1-1cd4330822e5.webp?v=1714705273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f87a30bde9e67115e3a89030e4cbe4d52ce46975_ef0dfff7-ad2a-4ce5-adbf-d35208457b45.webp?v=1714705275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39cc9f9a63478e00863689d3172a3de8e15ad25e_56441f8a-7ae4-4758-aaeb-cab5de0ab278.webp?v=1714705277","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4565920a1415178b7b5e2606f287848c26d94549_99739d66-6566-45bd-8b65-83d29eaea06c.webp?v=1714705280","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2894dd63b926bd16606ceb0769fca46d8b28cf86_56841d3c-84f8-48a9-86bb-a3aef3e63e6e.webp?v=1714705282","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7e3d1559e498a817c09c3e0dfc2961598051f31_813d62e7-f957-4ccd-a35a-d19c4f99f7a7.webp?v=1714705285","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1dc24d6b29f66f60669840fe2b4504c29a8a43a_88e275c1-51eb-4c10-bc70-16e41f38fa5b.webp?v=1714705287","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3de66cd22a42eb8d15222f2fff3df7850d010746_9b49bd79-782a-4432-a9a4-d6ce3150cb14.webp?v=1714705289"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268","options":["color"],"media":[{"alt":null,"id":23875410853987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268","width":2000},{"alt":null,"id":23875411378275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1a90062bad6d5c7caa1bd78a32c8cf35e05f1a_7c8be470-b5c6-43a1-8a36-22d176eb06ab.webp?v=1714705270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1a90062bad6d5c7caa1bd78a32c8cf35e05f1a_7c8be470-b5c6-43a1-8a36-22d176eb06ab.webp?v=1714705270","width":2000},{"alt":null,"id":23875411804259,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196ffd2e7766597c91240881c068b6d2ecc77caf_a59ef55b-d249-4e17-98b1-1cd4330822e5.webp?v=1714705273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196ffd2e7766597c91240881c068b6d2ecc77caf_a59ef55b-d249-4e17-98b1-1cd4330822e5.webp?v=1714705273","width":2000},{"alt":null,"id":23875412197475,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f87a30bde9e67115e3a89030e4cbe4d52ce46975_ef0dfff7-ad2a-4ce5-adbf-d35208457b45.webp?v=1714705275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f87a30bde9e67115e3a89030e4cbe4d52ce46975_ef0dfff7-ad2a-4ce5-adbf-d35208457b45.webp?v=1714705275","width":2000},{"alt":null,"id":23875412688995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39cc9f9a63478e00863689d3172a3de8e15ad25e_56441f8a-7ae4-4758-aaeb-cab5de0ab278.webp?v=1714705277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39cc9f9a63478e00863689d3172a3de8e15ad25e_56441f8a-7ae4-4758-aaeb-cab5de0ab278.webp?v=1714705277","width":2000},{"alt":null,"id":23875413082211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4565920a1415178b7b5e2606f287848c26d94549_99739d66-6566-45bd-8b65-83d29eaea06c.webp?v=1714705280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4565920a1415178b7b5e2606f287848c26d94549_99739d66-6566-45bd-8b65-83d29eaea06c.webp?v=1714705280","width":2000},{"alt":null,"id":23875413540963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2894dd63b926bd16606ceb0769fca46d8b28cf86_56841d3c-84f8-48a9-86bb-a3aef3e63e6e.webp?v=1714705282"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2894dd63b926bd16606ceb0769fca46d8b28cf86_56841d3c-84f8-48a9-86bb-a3aef3e63e6e.webp?v=1714705282","width":2000},{"alt":null,"id":23875413966947,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7e3d1559e498a817c09c3e0dfc2961598051f31_813d62e7-f957-4ccd-a35a-d19c4f99f7a7.webp?v=1714705285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7e3d1559e498a817c09c3e0dfc2961598051f31_813d62e7-f957-4ccd-a35a-d19c4f99f7a7.webp?v=1714705285","width":2000},{"alt":null,"id":23875414425699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1dc24d6b29f66f60669840fe2b4504c29a8a43a_88e275c1-51eb-4c10-bc70-16e41f38fa5b.webp?v=1714705287"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1dc24d6b29f66f60669840fe2b4504c29a8a43a_88e275c1-51eb-4c10-bc70-16e41f38fa5b.webp?v=1714705287","width":2000},{"alt":null,"id":23875414851683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3de66cd22a42eb8d15222f2fff3df7850d010746_9b49bd79-782a-4432-a9a4-d6ce3150cb14.webp?v=1714705289"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3de66cd22a42eb8d15222f2fff3df7850d010746_9b49bd79-782a-4432-a9a4-d6ce3150cb14.webp?v=1714705289","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879537746019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC03","requires_shipping":true,"taxable":true,"featured_image":{"id":31470507098211,"product_id":7407843999843,"position":1,"created_at":"2024-05-03T11:01:08+08:00","updated_at":"2024-05-03T11:01:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268","variant_ids":[41879537746019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 經典幾何Pattern - 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-PC03","featured_media":{"alt":null,"id":23875410853987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879537746019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC03","requires_shipping":true,"taxable":true,"featured_image":{"id":31470507098211,"product_id":7407843999843,"position":1,"created_at":"2024-05-03T11:01:08+08:00","updated_at":"2024-05-03T11:01:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268","variant_ids":[41879537746019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 經典幾何Pattern - 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-PC03","featured_media":{"alt":null,"id":23875410853987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9ebd2ea84dda8437a068263cf7b63734fc1638_4dc15546-c974-410d-9ec4-fd06a32cc35c.webp?v=1714705268"}},"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: "停產" }