$product = {"id":7415984259171,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵","handle":"iphone-xs-max-mod-nx-printable-pc01","description":null,"published_at":"2024-06-11T16:49:38+08:00","created_at":"2024-05-06T12:36:50+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":41916202713187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490908029027,"product_id":7415984259171,"position":8,"created_at":"2024-05-06T12:37:11+08:00","updated_at":"2024-05-06T12:37:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231","variant_ids":[41916202713187]},"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-PC01","featured_media":{"alt":null,"id":23896315101283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f03da740d0d993fe2003804a7805708e43739ba_cbcec7ce-558f-4b90-8110-538be5f91e39.webp?v=1714970212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f61924d892c8e29d70d735e256883c614e9c986_f368ad79-85b9-469c-8232-f9a974ee31d7.webp?v=1714970215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ab1c7b6b67f8bd2a09c4a21465482da8d3680ec_2f5312c5-9ab1-4c95-b9ed-a2aa89a6e1b1.webp?v=1714970218","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca61dd2f164072f5c5770503391cc24bda97edb8_41e5e2d5-e098-418a-a04d-c0aa69ee6b86.webp?v=1714970220","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1399558e9a11e1c1fbb7bd7b2cd950e8ffcf725d_2d6da2bc-fe4f-4c8c-a24d-c7a99ec9429c.webp?v=1714970223","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f929803a3b09aea75cb23966ac278977641aca8b_845cdd4a-5ce6-45fb-b97e-a322f6389f3d.webp?v=1714970225","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e47abc62623a65a4254fb79ec692fd1e46e67f_fcf27344-3c45-452c-8858-fe66611956c1.webp?v=1714970228","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb7d285d309d0f4c9a737ad00271e2d0222988fc_f5274331-e34d-41d7-abb9-8b47c4b2fb53.webp?v=1714970233","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ee8febdf3d6c868df34a90cdb25a0195c67f9e5_bbabdec5-b474-49c9-8f25-f04d1f893ef8.webp?v=1714970236"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f03da740d0d993fe2003804a7805708e43739ba_cbcec7ce-558f-4b90-8110-538be5f91e39.webp?v=1714970212","options":["color"],"media":[{"alt":null,"id":23896311398499,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f03da740d0d993fe2003804a7805708e43739ba_cbcec7ce-558f-4b90-8110-538be5f91e39.webp?v=1714970212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f03da740d0d993fe2003804a7805708e43739ba_cbcec7ce-558f-4b90-8110-538be5f91e39.webp?v=1714970212","width":2000},{"alt":null,"id":23896311857251,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f61924d892c8e29d70d735e256883c614e9c986_f368ad79-85b9-469c-8232-f9a974ee31d7.webp?v=1714970215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f61924d892c8e29d70d735e256883c614e9c986_f368ad79-85b9-469c-8232-f9a974ee31d7.webp?v=1714970215","width":2000},{"alt":null,"id":23896312381539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ab1c7b6b67f8bd2a09c4a21465482da8d3680ec_2f5312c5-9ab1-4c95-b9ed-a2aa89a6e1b1.webp?v=1714970218"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ab1c7b6b67f8bd2a09c4a21465482da8d3680ec_2f5312c5-9ab1-4c95-b9ed-a2aa89a6e1b1.webp?v=1714970218","width":2000},{"alt":null,"id":23896312938595,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca61dd2f164072f5c5770503391cc24bda97edb8_41e5e2d5-e098-418a-a04d-c0aa69ee6b86.webp?v=1714970220"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca61dd2f164072f5c5770503391cc24bda97edb8_41e5e2d5-e098-418a-a04d-c0aa69ee6b86.webp?v=1714970220","width":2000},{"alt":null,"id":23896313462883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1399558e9a11e1c1fbb7bd7b2cd950e8ffcf725d_2d6da2bc-fe4f-4c8c-a24d-c7a99ec9429c.webp?v=1714970223"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1399558e9a11e1c1fbb7bd7b2cd950e8ffcf725d_2d6da2bc-fe4f-4c8c-a24d-c7a99ec9429c.webp?v=1714970223","width":2000},{"alt":null,"id":23896313954403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f929803a3b09aea75cb23966ac278977641aca8b_845cdd4a-5ce6-45fb-b97e-a322f6389f3d.webp?v=1714970225"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f929803a3b09aea75cb23966ac278977641aca8b_845cdd4a-5ce6-45fb-b97e-a322f6389f3d.webp?v=1714970225","width":2000},{"alt":null,"id":23896314544227,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e47abc62623a65a4254fb79ec692fd1e46e67f_fcf27344-3c45-452c-8858-fe66611956c1.webp?v=1714970228"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e47abc62623a65a4254fb79ec692fd1e46e67f_fcf27344-3c45-452c-8858-fe66611956c1.webp?v=1714970228","width":2000},{"alt":null,"id":23896315101283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231","width":2000},{"alt":null,"id":23896315920483,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb7d285d309d0f4c9a737ad00271e2d0222988fc_f5274331-e34d-41d7-abb9-8b47c4b2fb53.webp?v=1714970233"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb7d285d309d0f4c9a737ad00271e2d0222988fc_f5274331-e34d-41d7-abb9-8b47c4b2fb53.webp?v=1714970233","width":2000},{"alt":null,"id":23896316510307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ee8febdf3d6c868df34a90cdb25a0195c67f9e5_bbabdec5-b474-49c9-8f25-f04d1f893ef8.webp?v=1714970236"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ee8febdf3d6c868df34a90cdb25a0195c67f9e5_bbabdec5-b474-49c9-8f25-f04d1f893ef8.webp?v=1714970236","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916202713187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490908029027,"product_id":7415984259171,"position":8,"created_at":"2024-05-06T12:37:11+08:00","updated_at":"2024-05-06T12:37:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231","variant_ids":[41916202713187]},"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-PC01","featured_media":{"alt":null,"id":23896315101283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916202713187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31490908029027,"product_id":7415984259171,"position":8,"created_at":"2024-05-06T12:37:11+08:00","updated_at":"2024-05-06T12:37:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231","variant_ids":[41916202713187]},"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-PC01","featured_media":{"alt":null,"id":23896315101283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c80fcc4a3703ab5b09de36d2408be2d44e1b38_4858d8ce-1870-498e-86be-d412830aabf3.webp?v=1714970231"}},"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: "停產" }