$product = {"id":7407651881059,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 死星-黑白條紋","handle":"iphone-14-plus-mod-nx-printable-pb21","description":null,"published_at":"2024-06-11T16:21:33+08:00","created_at":"2024-05-03T10:37:35+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":41877214724195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31470158807139,"product_id":7407651881059,"position":8,"created_at":"2024-05-03T10:37:56+08:00","updated_at":"2024-05-03T10:37:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876","variant_ids":[41877214724195]},"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-PB21","featured_media":{"alt":null,"id":23875061678179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d10279c29b4ed898a321cfbf94ac5e6a3bfbdfaf_7b237b29-3e32-4e5b-b8e9-d5615312c82c.webp?v=1714703858","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be9741971afb940502f4425b102b8231a3533fd7_03e15c21-a15d-4cc7-8d81-645feca8493a.webp?v=1714703861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef308a24ba9f7ba1f5b4e49ddb915e6f967ad53e_79a270fc-fb7a-4191-b99c-067b1bf43a6b.webp?v=1714703864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a306b2c129f16e4a474d254d53acab07fd8b1222_c138b7f3-0220-4684-9af7-20146cdc4cd6.webp?v=1714703866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a224524c930bea4f54fa2efe539d9981cf66ef_d6ee11cb-c444-467e-ba6f-1f3144029ce3.webp?v=1714703868","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7ce1218878a746466ca76757ebdd0ac3986bbe_9b806f8d-581f-4c8b-bc2f-79b6fcd2c528.webp?v=1714703871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa9e83c73a536bbee27ddfb99523372a1d3316c7_906dded2-7dac-46e5-84aa-6f84d81cbd5e.webp?v=1714703873","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba2378e3c7eef77d3d989f360269b9243ac560d3_90c62b33-64f7-451c-9e2f-725f4797aa3e.webp?v=1714703878","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab023770be4707fa4758de3647e7b1605800d84_37424a4a-8e80-42ca-b1ad-c7dc459156fb.webp?v=1714703881"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d10279c29b4ed898a321cfbf94ac5e6a3bfbdfaf_7b237b29-3e32-4e5b-b8e9-d5615312c82c.webp?v=1714703858","options":["color"],"media":[{"alt":null,"id":23875056795747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d10279c29b4ed898a321cfbf94ac5e6a3bfbdfaf_7b237b29-3e32-4e5b-b8e9-d5615312c82c.webp?v=1714703858"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d10279c29b4ed898a321cfbf94ac5e6a3bfbdfaf_7b237b29-3e32-4e5b-b8e9-d5615312c82c.webp?v=1714703858","width":2000},{"alt":null,"id":23875057418339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be9741971afb940502f4425b102b8231a3533fd7_03e15c21-a15d-4cc7-8d81-645feca8493a.webp?v=1714703861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be9741971afb940502f4425b102b8231a3533fd7_03e15c21-a15d-4cc7-8d81-645feca8493a.webp?v=1714703861","width":2000},{"alt":null,"id":23875058073699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef308a24ba9f7ba1f5b4e49ddb915e6f967ad53e_79a270fc-fb7a-4191-b99c-067b1bf43a6b.webp?v=1714703864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef308a24ba9f7ba1f5b4e49ddb915e6f967ad53e_79a270fc-fb7a-4191-b99c-067b1bf43a6b.webp?v=1714703864","width":2000},{"alt":null,"id":23875058892899,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a306b2c129f16e4a474d254d53acab07fd8b1222_c138b7f3-0220-4684-9af7-20146cdc4cd6.webp?v=1714703866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a306b2c129f16e4a474d254d53acab07fd8b1222_c138b7f3-0220-4684-9af7-20146cdc4cd6.webp?v=1714703866","width":2000},{"alt":null,"id":23875059581027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a224524c930bea4f54fa2efe539d9981cf66ef_d6ee11cb-c444-467e-ba6f-1f3144029ce3.webp?v=1714703868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a224524c930bea4f54fa2efe539d9981cf66ef_d6ee11cb-c444-467e-ba6f-1f3144029ce3.webp?v=1714703868","width":2000},{"alt":null,"id":23875060269155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7ce1218878a746466ca76757ebdd0ac3986bbe_9b806f8d-581f-4c8b-bc2f-79b6fcd2c528.webp?v=1714703871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7ce1218878a746466ca76757ebdd0ac3986bbe_9b806f8d-581f-4c8b-bc2f-79b6fcd2c528.webp?v=1714703871","width":2000},{"alt":null,"id":23875060990051,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa9e83c73a536bbee27ddfb99523372a1d3316c7_906dded2-7dac-46e5-84aa-6f84d81cbd5e.webp?v=1714703873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa9e83c73a536bbee27ddfb99523372a1d3316c7_906dded2-7dac-46e5-84aa-6f84d81cbd5e.webp?v=1714703873","width":2000},{"alt":null,"id":23875061678179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876","width":2000},{"alt":null,"id":23875062268003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba2378e3c7eef77d3d989f360269b9243ac560d3_90c62b33-64f7-451c-9e2f-725f4797aa3e.webp?v=1714703878"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba2378e3c7eef77d3d989f360269b9243ac560d3_90c62b33-64f7-451c-9e2f-725f4797aa3e.webp?v=1714703878","width":2000},{"alt":null,"id":23875063218275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab023770be4707fa4758de3647e7b1605800d84_37424a4a-8e80-42ca-b1ad-c7dc459156fb.webp?v=1714703881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab023770be4707fa4758de3647e7b1605800d84_37424a4a-8e80-42ca-b1ad-c7dc459156fb.webp?v=1714703881","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41877214724195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31470158807139,"product_id":7407651881059,"position":8,"created_at":"2024-05-03T10:37:56+08:00","updated_at":"2024-05-03T10:37:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876","variant_ids":[41877214724195]},"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-PB21","featured_media":{"alt":null,"id":23875061678179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877214724195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31470158807139,"product_id":7407651881059,"position":8,"created_at":"2024-05-03T10:37:56+08:00","updated_at":"2024-05-03T10:37:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876","variant_ids":[41877214724195]},"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-PB21","featured_media":{"alt":null,"id":23875061678179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7b1616ab570e762bab652855afc852c5833376b_bc3dd776-8a86-47ea-b071-87aef3fe4372.webp?v=1714703876"}},"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: "停產" }