$product = {"id":7416014897251,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-日文字系列","handle":"iphone-xs-max-mod-nx-printable-pb66","description":null,"published_at":"2024-06-11T16:50:27+08:00","created_at":"2024-05-06T12:42:33+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":41916524953699,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB66","requires_shipping":true,"taxable":true,"featured_image":{"id":31490993225827,"product_id":7416014897251,"position":7,"created_at":"2024-05-06T12:42:52+08:00","updated_at":"2024-05-06T12:42:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572","variant_ids":[41916524953699]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-日文字系列 - 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-PB66","featured_media":{"alt":null,"id":23896400461923,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9bed403465a82047a2285429fb5433b4da7382e_bed168b8-4b2a-4d19-9ffe-5f52ce9ddb97.webp?v=1714970556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78957ffdaae967bc6dbe4949027c05a82b130e14_bc539630-3076-4a67-80d0-bc8c9b26ef4b.webp?v=1714970558","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0da68825df2f9bdfd9364efed5cbf9dc4bc6a248_98e1dee7-57be-41cb-ac5a-c0b0026551f4.webp?v=1714970563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8296726a15b2bc7dc9737c4e280f941d3d5f6948_fee80150-071d-493d-8db7-c086661dac74.webp?v=1714970565","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688aa1fb3af829fa8b36a0d94510c2e8b232ea75_6cc0ac00-4ed0-435f-b74f-4faf03deb704.webp?v=1714970568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d413d5257b6787dab3b00044c6547434aa0072ff_803e2705-17cf-4fdc-a0a1-8ec824cd2416.webp?v=1714970570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/026940195845d8e0f30d246b45074726024cc928_7574530f-1e87-4d19-be68-4f883b9b0f6b.webp?v=1714970575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b567dcdbf204fb65e9729cd21bad6e4992376edc_3c257f30-52b9-4f1e-a1f1-2de2728d92ac.webp?v=1714970577"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9bed403465a82047a2285429fb5433b4da7382e_bed168b8-4b2a-4d19-9ffe-5f52ce9ddb97.webp?v=1714970556","options":["color"],"media":[{"alt":null,"id":23896396922979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9bed403465a82047a2285429fb5433b4da7382e_bed168b8-4b2a-4d19-9ffe-5f52ce9ddb97.webp?v=1714970556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9bed403465a82047a2285429fb5433b4da7382e_bed168b8-4b2a-4d19-9ffe-5f52ce9ddb97.webp?v=1714970556","width":2000},{"alt":null,"id":23896397316195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78957ffdaae967bc6dbe4949027c05a82b130e14_bc539630-3076-4a67-80d0-bc8c9b26ef4b.webp?v=1714970558"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78957ffdaae967bc6dbe4949027c05a82b130e14_bc539630-3076-4a67-80d0-bc8c9b26ef4b.webp?v=1714970558","width":2000},{"alt":null,"id":23896398299235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0da68825df2f9bdfd9364efed5cbf9dc4bc6a248_98e1dee7-57be-41cb-ac5a-c0b0026551f4.webp?v=1714970563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0da68825df2f9bdfd9364efed5cbf9dc4bc6a248_98e1dee7-57be-41cb-ac5a-c0b0026551f4.webp?v=1714970563","width":2000},{"alt":null,"id":23896398823523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8296726a15b2bc7dc9737c4e280f941d3d5f6948_fee80150-071d-493d-8db7-c086661dac74.webp?v=1714970565"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8296726a15b2bc7dc9737c4e280f941d3d5f6948_fee80150-071d-493d-8db7-c086661dac74.webp?v=1714970565","width":2000},{"alt":null,"id":23896399380579,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688aa1fb3af829fa8b36a0d94510c2e8b232ea75_6cc0ac00-4ed0-435f-b74f-4faf03deb704.webp?v=1714970568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688aa1fb3af829fa8b36a0d94510c2e8b232ea75_6cc0ac00-4ed0-435f-b74f-4faf03deb704.webp?v=1714970568","width":2000},{"alt":null,"id":23896399904867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d413d5257b6787dab3b00044c6547434aa0072ff_803e2705-17cf-4fdc-a0a1-8ec824cd2416.webp?v=1714970570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d413d5257b6787dab3b00044c6547434aa0072ff_803e2705-17cf-4fdc-a0a1-8ec824cd2416.webp?v=1714970570","width":2000},{"alt":null,"id":23896400461923,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572","width":2000},{"alt":null,"id":23896401346659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/026940195845d8e0f30d246b45074726024cc928_7574530f-1e87-4d19-be68-4f883b9b0f6b.webp?v=1714970575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/026940195845d8e0f30d246b45074726024cc928_7574530f-1e87-4d19-be68-4f883b9b0f6b.webp?v=1714970575","width":2000},{"alt":null,"id":23896401838179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b567dcdbf204fb65e9729cd21bad6e4992376edc_3c257f30-52b9-4f1e-a1f1-2de2728d92ac.webp?v=1714970577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b567dcdbf204fb65e9729cd21bad6e4992376edc_3c257f30-52b9-4f1e-a1f1-2de2728d92ac.webp?v=1714970577","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916524953699,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB66","requires_shipping":true,"taxable":true,"featured_image":{"id":31490993225827,"product_id":7416014897251,"position":7,"created_at":"2024-05-06T12:42:52+08:00","updated_at":"2024-05-06T12:42:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572","variant_ids":[41916524953699]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-日文字系列 - 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-PB66","featured_media":{"alt":null,"id":23896400461923,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916524953699,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB66","requires_shipping":true,"taxable":true,"featured_image":{"id":31490993225827,"product_id":7416014897251,"position":7,"created_at":"2024-05-06T12:42:52+08:00","updated_at":"2024-05-06T12:42:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572","variant_ids":[41916524953699]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-日文字系列 - 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-PB66","featured_media":{"alt":null,"id":23896400461923,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bafaa2c2373a770985090412fb0a47c3bc96e64_828d7f38-55f2-4121-bf0e-68a8ef70b650.webp?v=1714970572"}},"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: "停產" }