$product = {"id":7416010735715,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰角色-漫畫系列","handle":"iphone-xs-max-mod-nx-printable-pb84","description":null,"published_at":"2024-06-11T16:50:21+08:00","created_at":"2024-05-06T12:41:47+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":41916484911203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31490978250851,"product_id":7416010735715,"position":2,"created_at":"2024-05-06T12:41:52+08:00","updated_at":"2024-05-06T12:41:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512","variant_ids":[41916484911203]},"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-PB84","featured_media":{"alt":null,"id":23896385421411,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/419e9d555a2e2c0ebba484cddad8bb14fc082385_4528e98b-ab5a-4748-bb3b-38771b950b9b.webp?v=1714970510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26c481e8016a38ca4c264d07d4c3f2e1eccb0252_baa677cd-cd8a-413f-8dbc-45496f73f857.webp?v=1714970517","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/810d8245ef90fd9c7b7a76425c7178180405a30e_eb9f0625-7ca6-4f74-9c2a-88f0f0a13763.webp?v=1714970520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36990f68ad5120b92d78ba73963652db4a55c9f5_ab6c55ec-ecdc-4cfb-9a78-57a41e2c933b.webp?v=1714970522","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfad6e614a5d594339259ad0a6750b62f89a785a_a0a8633a-5050-414d-8864-42585f14ab5d.webp?v=1714970525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93e2e62cbe8380eac9e57765d39f96ec21332486_a177770e-880e-45d3-8d7b-823c96a2d4b8.webp?v=1714970527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbfe7b554c728a3a9e247cac0b85414586e8f880_651cb631-eb8c-48d3-8619-59ec7d1e27b2.webp?v=1714970530","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8642a8c5ba32e465228c4d786529c9cef5d7e04_6b64077d-03d5-4567-8428-549c6c5e828d.webp?v=1714970532"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/419e9d555a2e2c0ebba484cddad8bb14fc082385_4528e98b-ab5a-4748-bb3b-38771b950b9b.webp?v=1714970510","options":["color"],"media":[{"alt":null,"id":23896384929891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/419e9d555a2e2c0ebba484cddad8bb14fc082385_4528e98b-ab5a-4748-bb3b-38771b950b9b.webp?v=1714970510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/419e9d555a2e2c0ebba484cddad8bb14fc082385_4528e98b-ab5a-4748-bb3b-38771b950b9b.webp?v=1714970510","width":2000},{"alt":null,"id":23896385421411,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512","width":2000},{"alt":null,"id":23896386699363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26c481e8016a38ca4c264d07d4c3f2e1eccb0252_baa677cd-cd8a-413f-8dbc-45496f73f857.webp?v=1714970517"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26c481e8016a38ca4c264d07d4c3f2e1eccb0252_baa677cd-cd8a-413f-8dbc-45496f73f857.webp?v=1714970517","width":2000},{"alt":null,"id":23896387420259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/810d8245ef90fd9c7b7a76425c7178180405a30e_eb9f0625-7ca6-4f74-9c2a-88f0f0a13763.webp?v=1714970520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/810d8245ef90fd9c7b7a76425c7178180405a30e_eb9f0625-7ca6-4f74-9c2a-88f0f0a13763.webp?v=1714970520","width":2000},{"alt":null,"id":23896387846243,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36990f68ad5120b92d78ba73963652db4a55c9f5_ab6c55ec-ecdc-4cfb-9a78-57a41e2c933b.webp?v=1714970522"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36990f68ad5120b92d78ba73963652db4a55c9f5_ab6c55ec-ecdc-4cfb-9a78-57a41e2c933b.webp?v=1714970522","width":2000},{"alt":null,"id":23896388501603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfad6e614a5d594339259ad0a6750b62f89a785a_a0a8633a-5050-414d-8864-42585f14ab5d.webp?v=1714970525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfad6e614a5d594339259ad0a6750b62f89a785a_a0a8633a-5050-414d-8864-42585f14ab5d.webp?v=1714970525","width":2000},{"alt":null,"id":23896389353571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93e2e62cbe8380eac9e57765d39f96ec21332486_a177770e-880e-45d3-8d7b-823c96a2d4b8.webp?v=1714970527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93e2e62cbe8380eac9e57765d39f96ec21332486_a177770e-880e-45d3-8d7b-823c96a2d4b8.webp?v=1714970527","width":2000},{"alt":null,"id":23896389845091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbfe7b554c728a3a9e247cac0b85414586e8f880_651cb631-eb8c-48d3-8619-59ec7d1e27b2.webp?v=1714970530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbfe7b554c728a3a9e247cac0b85414586e8f880_651cb631-eb8c-48d3-8619-59ec7d1e27b2.webp?v=1714970530","width":2000},{"alt":null,"id":23896390402147,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8642a8c5ba32e465228c4d786529c9cef5d7e04_6b64077d-03d5-4567-8428-549c6c5e828d.webp?v=1714970532"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8642a8c5ba32e465228c4d786529c9cef5d7e04_6b64077d-03d5-4567-8428-549c6c5e828d.webp?v=1714970532","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916484911203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31490978250851,"product_id":7416010735715,"position":2,"created_at":"2024-05-06T12:41:52+08:00","updated_at":"2024-05-06T12:41:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512","variant_ids":[41916484911203]},"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-PB84","featured_media":{"alt":null,"id":23896385421411,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916484911203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31490978250851,"product_id":7416010735715,"position":2,"created_at":"2024-05-06T12:41:52+08:00","updated_at":"2024-05-06T12:41:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512","variant_ids":[41916484911203]},"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-PB84","featured_media":{"alt":null,"id":23896385421411,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ba73c772dd0c756d61c788d20cd3a368df4b94f_bbd25c94-29d8-4966-a6c3-a7f23255d7a6.webp?v=1714970512"}},"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: "停產" }