$product = {"id":7415992025187,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 千年鷹-線條白","handle":"iphone-xs-max-mod-nx-printable-pb14","description":null,"published_at":"2024-06-11T16:49:50+08:00","created_at":"2024-05-06T12:38:27+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 XS Max","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":41916289450083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490932408419,"product_id":7415992025187,"position":6,"created_at":"2024-05-06T12:38:41+08:00","updated_at":"2024-05-06T12:38:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321","variant_ids":[41916289450083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB14","featured_media":{"alt":null,"id":23896339480675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5f10b439d616d71497434c381e6bcb2597dd7cc_c8734b75-e513-4839-914f-0342e0abe90e.webp?v=1714970309","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6099a4c218ab9ab90ff90249511586378aabb4b6_816a82e1-2ede-48cd-a29b-41f423307b27.webp?v=1714970311","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ad7415dfaeabb78bfd5862a8f0361c7f39b0478_fb372590-af8a-4c35-9094-dbd0b783695c.webp?v=1714970314","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67fd108cc91f4ccf39e4b906aa51a01ede297dda_d7787d3d-cbce-411c-bda1-9ef06659b014.webp?v=1714970316","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/529d799abe7524b0a8b2e321e050b1ad1b29be9a_448cd15a-4baf-4af9-bda5-c2cbb6fc5469.webp?v=1714970319","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21366eaddaaac45abbd0b0e2001fda90fac04426_b19c6bc4-bb65-4bf9-b5eb-d5a7e0e2f05f.webp?v=1714970323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/707f35a394f30cb8cf36a30d7aea2a4c116e6ec4_560f3759-b12d-4322-a2cc-517495428705.webp?v=1714970326","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d3e868627a7aa5bb088ff452396135bc178567d_42a227de-bfb3-4bb7-ae38-e666f794403e.webp?v=1714970328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c85ea63ad685469699cd5dcdeb46c3d00c61c4_90e993bc-b0b6-42d5-8fdf-e20663531ba0.webp?v=1714970330"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5f10b439d616d71497434c381e6bcb2597dd7cc_c8734b75-e513-4839-914f-0342e0abe90e.webp?v=1714970309","options":["color"],"media":[{"alt":null,"id":23896335876195,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5f10b439d616d71497434c381e6bcb2597dd7cc_c8734b75-e513-4839-914f-0342e0abe90e.webp?v=1714970309"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5f10b439d616d71497434c381e6bcb2597dd7cc_c8734b75-e513-4839-914f-0342e0abe90e.webp?v=1714970309","width":2000},{"alt":null,"id":23896336564323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6099a4c218ab9ab90ff90249511586378aabb4b6_816a82e1-2ede-48cd-a29b-41f423307b27.webp?v=1714970311"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6099a4c218ab9ab90ff90249511586378aabb4b6_816a82e1-2ede-48cd-a29b-41f423307b27.webp?v=1714970311","width":2000},{"alt":null,"id":23896337055843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ad7415dfaeabb78bfd5862a8f0361c7f39b0478_fb372590-af8a-4c35-9094-dbd0b783695c.webp?v=1714970314"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ad7415dfaeabb78bfd5862a8f0361c7f39b0478_fb372590-af8a-4c35-9094-dbd0b783695c.webp?v=1714970314","width":2000},{"alt":null,"id":23896337580131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67fd108cc91f4ccf39e4b906aa51a01ede297dda_d7787d3d-cbce-411c-bda1-9ef06659b014.webp?v=1714970316"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67fd108cc91f4ccf39e4b906aa51a01ede297dda_d7787d3d-cbce-411c-bda1-9ef06659b014.webp?v=1714970316","width":2000},{"alt":null,"id":23896338595939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/529d799abe7524b0a8b2e321e050b1ad1b29be9a_448cd15a-4baf-4af9-bda5-c2cbb6fc5469.webp?v=1714970319"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/529d799abe7524b0a8b2e321e050b1ad1b29be9a_448cd15a-4baf-4af9-bda5-c2cbb6fc5469.webp?v=1714970319","width":2000},{"alt":null,"id":23896339480675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321","width":2000},{"alt":null,"id":23896339873891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21366eaddaaac45abbd0b0e2001fda90fac04426_b19c6bc4-bb65-4bf9-b5eb-d5a7e0e2f05f.webp?v=1714970323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21366eaddaaac45abbd0b0e2001fda90fac04426_b19c6bc4-bb65-4bf9-b5eb-d5a7e0e2f05f.webp?v=1714970323","width":2000},{"alt":null,"id":23896340758627,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/707f35a394f30cb8cf36a30d7aea2a4c116e6ec4_560f3759-b12d-4322-a2cc-517495428705.webp?v=1714970326"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/707f35a394f30cb8cf36a30d7aea2a4c116e6ec4_560f3759-b12d-4322-a2cc-517495428705.webp?v=1714970326","width":2000},{"alt":null,"id":23896341119075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d3e868627a7aa5bb088ff452396135bc178567d_42a227de-bfb3-4bb7-ae38-e666f794403e.webp?v=1714970328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d3e868627a7aa5bb088ff452396135bc178567d_42a227de-bfb3-4bb7-ae38-e666f794403e.webp?v=1714970328","width":2000},{"alt":null,"id":23896341774435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c85ea63ad685469699cd5dcdeb46c3d00c61c4_90e993bc-b0b6-42d5-8fdf-e20663531ba0.webp?v=1714970330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c85ea63ad685469699cd5dcdeb46c3d00c61c4_90e993bc-b0b6-42d5-8fdf-e20663531ba0.webp?v=1714970330","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916289450083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490932408419,"product_id":7415992025187,"position":6,"created_at":"2024-05-06T12:38:41+08:00","updated_at":"2024-05-06T12:38:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321","variant_ids":[41916289450083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB14","featured_media":{"alt":null,"id":23896339480675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916289450083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490932408419,"product_id":7415992025187,"position":6,"created_at":"2024-05-06T12:38:41+08:00","updated_at":"2024-05-06T12:38:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321","variant_ids":[41916289450083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB14","featured_media":{"alt":null,"id":23896339480675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be728b4363ed63090e1743a0d8d950a93c6aef2a_0d7d2479-5f84-4767-809d-4def9de7695f.webp?v=1714970321"}},"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: "停產" }