$product = {"id":7415957323875,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術","handle":"iphone-xs-max-mod-nx-printable-pb34","description":null,"published_at":"2024-06-11T16:48:54+08:00","created_at":"2024-05-06T12:31:52+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":41915923660899,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31490832171107,"product_id":7415957323875,"position":2,"created_at":"2024-05-06T12:31:57+08:00","updated_at":"2024-05-06T12:31:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917","variant_ids":[41915923660899]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23896239145059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/895dea3615b0110a26dfd5dc136a29ff251a5ac7_ddac41c9-1ea6-4500-8c8f-9686b534e2f2.webp?v=1714969915","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7693122609bfd8c11920ae2a6a32613f1663bc28_31876eda-88c2-4539-9286-0271a01b7e69.webp?v=1714969920","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0775f9a1faf5529c11a939907b69c5b870b387_189399a5-6977-46e7-ace2-05dc0d63208b.webp?v=1714969922","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/152202c57cb646936bb25c0c8f861fcfeee96573_cabc905e-bcae-46f2-af81-d79cc48da2b9.webp?v=1714969924","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58ff2bf482992db249757d5e6ca70ad6a2c4d2fa_d21bf59b-8357-47d4-a341-e37ea5192f97.webp?v=1714969926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e92ebe559058f2fac752f7e8712860b42b3744_f1cbe58e-ab15-4900-bda1-3cbe7ef00ea3.webp?v=1714969929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb603d274764e9f59eabe9162d5c1553d737461_d3fb87e5-9736-4da4-8971-b7432da849d9.webp?v=1714969931","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7fbf87ec05f46f0892fbc36664f7e805b402111_8a3237d6-cfb1-4833-a489-d3add903775e.webp?v=1714969933","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaca09688fd659ce9e72cfe1902b39ee0824345e_62c1fab5-f481-4449-8ce8-85a758bd2afd.webp?v=1714969935"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/895dea3615b0110a26dfd5dc136a29ff251a5ac7_ddac41c9-1ea6-4500-8c8f-9686b534e2f2.webp?v=1714969915","options":["color"],"media":[{"alt":null,"id":23896238620771,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/895dea3615b0110a26dfd5dc136a29ff251a5ac7_ddac41c9-1ea6-4500-8c8f-9686b534e2f2.webp?v=1714969915"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/895dea3615b0110a26dfd5dc136a29ff251a5ac7_ddac41c9-1ea6-4500-8c8f-9686b534e2f2.webp?v=1714969915","width":2000},{"alt":null,"id":23896239145059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917","width":2000},{"alt":null,"id":23896239571043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7693122609bfd8c11920ae2a6a32613f1663bc28_31876eda-88c2-4539-9286-0271a01b7e69.webp?v=1714969920"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7693122609bfd8c11920ae2a6a32613f1663bc28_31876eda-88c2-4539-9286-0271a01b7e69.webp?v=1714969920","width":2000},{"alt":null,"id":23896239964259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0775f9a1faf5529c11a939907b69c5b870b387_189399a5-6977-46e7-ace2-05dc0d63208b.webp?v=1714969922"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d0775f9a1faf5529c11a939907b69c5b870b387_189399a5-6977-46e7-ace2-05dc0d63208b.webp?v=1714969922","width":2000},{"alt":null,"id":23896241012835,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/152202c57cb646936bb25c0c8f861fcfeee96573_cabc905e-bcae-46f2-af81-d79cc48da2b9.webp?v=1714969924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/152202c57cb646936bb25c0c8f861fcfeee96573_cabc905e-bcae-46f2-af81-d79cc48da2b9.webp?v=1714969924","width":2000},{"alt":null,"id":23896241406051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58ff2bf482992db249757d5e6ca70ad6a2c4d2fa_d21bf59b-8357-47d4-a341-e37ea5192f97.webp?v=1714969926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58ff2bf482992db249757d5e6ca70ad6a2c4d2fa_d21bf59b-8357-47d4-a341-e37ea5192f97.webp?v=1714969926","width":2000},{"alt":null,"id":23896241864803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e92ebe559058f2fac752f7e8712860b42b3744_f1cbe58e-ab15-4900-bda1-3cbe7ef00ea3.webp?v=1714969929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e92ebe559058f2fac752f7e8712860b42b3744_f1cbe58e-ab15-4900-bda1-3cbe7ef00ea3.webp?v=1714969929","width":2000},{"alt":null,"id":23896242159715,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb603d274764e9f59eabe9162d5c1553d737461_d3fb87e5-9736-4da4-8971-b7432da849d9.webp?v=1714969931"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb603d274764e9f59eabe9162d5c1553d737461_d3fb87e5-9736-4da4-8971-b7432da849d9.webp?v=1714969931","width":2000},{"alt":null,"id":23896243011683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7fbf87ec05f46f0892fbc36664f7e805b402111_8a3237d6-cfb1-4833-a489-d3add903775e.webp?v=1714969933"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7fbf87ec05f46f0892fbc36664f7e805b402111_8a3237d6-cfb1-4833-a489-d3add903775e.webp?v=1714969933","width":2000},{"alt":null,"id":23896243667043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaca09688fd659ce9e72cfe1902b39ee0824345e_62c1fab5-f481-4449-8ce8-85a758bd2afd.webp?v=1714969935"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaca09688fd659ce9e72cfe1902b39ee0824345e_62c1fab5-f481-4449-8ce8-85a758bd2afd.webp?v=1714969935","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915923660899,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31490832171107,"product_id":7415957323875,"position":2,"created_at":"2024-05-06T12:31:57+08:00","updated_at":"2024-05-06T12:31:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917","variant_ids":[41915923660899]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23896239145059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915923660899,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31490832171107,"product_id":7415957323875,"position":2,"created_at":"2024-05-06T12:31:57+08:00","updated_at":"2024-05-06T12:31:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917","variant_ids":[41915923660899]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23896239145059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd925587bf5ad71083b8b2de9218785166f08525_580ef501-5ef4-45c9-beca-242bf97d3799.webp?v=1714969917"}},"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: "停產" }