$product = {"id":7416023580771,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族1-塗鴉藝術","handle":"iphone-xs-max-mod-nx-printable-pb35","description":null,"published_at":"2024-06-11T16:50:41+08:00","created_at":"2024-05-06T12:44:05+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":41916615295075,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB35","requires_shipping":true,"taxable":true,"featured_image":{"id":31491014131811,"product_id":7416023580771,"position":7,"created_at":"2024-05-06T12:44:21+08:00","updated_at":"2024-05-06T12:44:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661","variant_ids":[41916615295075]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族1-塗鴉藝術 - 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-PB35","featured_media":{"alt":null,"id":23896421367907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9bece7b6db74c379198eacb5b6059437a7eaea_ac085eaa-0208-4763-aebf-5f3d65e34393.webp?v=1714970647","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/452745869419b994e36c35a7f192eb1166b3f553_7c0bf584-a153-457a-8f89-499ab3d18136.webp?v=1714970649","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7beb3af48ae241303f31984eefc84559e81d9b6e_fcb13a82-6250-453e-a8c4-e9a75d212266.webp?v=1714970652","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2844293886459f2d6e269b9b0f47bd71fe9587c_98e603ad-1954-41cc-9689-96f7fbdbbf52.webp?v=1714970654","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99b14841d696dec78ac8d1e0091f4389a83b40e7_11144bf9-4e88-4b8b-ac59-4448b1df4850.webp?v=1714970656","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d46e542297b193b89df1e636064395dd20ccf2a_dac75fec-2389-4fc9-be82-b73d6738a54b.webp?v=1714970658","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2def47854bbd46dfe511fab69ea09cd57f7f4e_be25708b-ee83-4bca-b20a-db27b91f2121.webp?v=1714970663","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5a05e58032ddb5a58e3ba9bbc3db8363f94d72e_d9dd6b98-68b5-49f2-862f-68bfa29f073a.webp?v=1714970665","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8658b43585cb23bf63db959dda9f67bd038aac_ca5fbff9-ffd2-4df3-8441-b9cace71ec70.webp?v=1714970668"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9bece7b6db74c379198eacb5b6059437a7eaea_ac085eaa-0208-4763-aebf-5f3d65e34393.webp?v=1714970647","options":["color"],"media":[{"alt":null,"id":23896418353251,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9bece7b6db74c379198eacb5b6059437a7eaea_ac085eaa-0208-4763-aebf-5f3d65e34393.webp?v=1714970647"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9bece7b6db74c379198eacb5b6059437a7eaea_ac085eaa-0208-4763-aebf-5f3d65e34393.webp?v=1714970647","width":2000},{"alt":null,"id":23896419074147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/452745869419b994e36c35a7f192eb1166b3f553_7c0bf584-a153-457a-8f89-499ab3d18136.webp?v=1714970649"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/452745869419b994e36c35a7f192eb1166b3f553_7c0bf584-a153-457a-8f89-499ab3d18136.webp?v=1714970649","width":2000},{"alt":null,"id":23896419762275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7beb3af48ae241303f31984eefc84559e81d9b6e_fcb13a82-6250-453e-a8c4-e9a75d212266.webp?v=1714970652"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7beb3af48ae241303f31984eefc84559e81d9b6e_fcb13a82-6250-453e-a8c4-e9a75d212266.webp?v=1714970652","width":2000},{"alt":null,"id":23896420057187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2844293886459f2d6e269b9b0f47bd71fe9587c_98e603ad-1954-41cc-9689-96f7fbdbbf52.webp?v=1714970654"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2844293886459f2d6e269b9b0f47bd71fe9587c_98e603ad-1954-41cc-9689-96f7fbdbbf52.webp?v=1714970654","width":2000},{"alt":null,"id":23896420548707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99b14841d696dec78ac8d1e0091f4389a83b40e7_11144bf9-4e88-4b8b-ac59-4448b1df4850.webp?v=1714970656"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99b14841d696dec78ac8d1e0091f4389a83b40e7_11144bf9-4e88-4b8b-ac59-4448b1df4850.webp?v=1714970656","width":2000},{"alt":null,"id":23896420909155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d46e542297b193b89df1e636064395dd20ccf2a_dac75fec-2389-4fc9-be82-b73d6738a54b.webp?v=1714970658"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d46e542297b193b89df1e636064395dd20ccf2a_dac75fec-2389-4fc9-be82-b73d6738a54b.webp?v=1714970658","width":2000},{"alt":null,"id":23896421367907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661","width":2000},{"alt":null,"id":23896421826659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2def47854bbd46dfe511fab69ea09cd57f7f4e_be25708b-ee83-4bca-b20a-db27b91f2121.webp?v=1714970663"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2def47854bbd46dfe511fab69ea09cd57f7f4e_be25708b-ee83-4bca-b20a-db27b91f2121.webp?v=1714970663","width":2000},{"alt":null,"id":23896422547555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5a05e58032ddb5a58e3ba9bbc3db8363f94d72e_d9dd6b98-68b5-49f2-862f-68bfa29f073a.webp?v=1714970665"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5a05e58032ddb5a58e3ba9bbc3db8363f94d72e_d9dd6b98-68b5-49f2-862f-68bfa29f073a.webp?v=1714970665","width":2000},{"alt":null,"id":23896423039075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8658b43585cb23bf63db959dda9f67bd038aac_ca5fbff9-ffd2-4df3-8441-b9cace71ec70.webp?v=1714970668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8658b43585cb23bf63db959dda9f67bd038aac_ca5fbff9-ffd2-4df3-8441-b9cace71ec70.webp?v=1714970668","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916615295075,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB35","requires_shipping":true,"taxable":true,"featured_image":{"id":31491014131811,"product_id":7416023580771,"position":7,"created_at":"2024-05-06T12:44:21+08:00","updated_at":"2024-05-06T12:44:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661","variant_ids":[41916615295075]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族1-塗鴉藝術 - 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-PB35","featured_media":{"alt":null,"id":23896421367907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916615295075,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB35","requires_shipping":true,"taxable":true,"featured_image":{"id":31491014131811,"product_id":7416023580771,"position":7,"created_at":"2024-05-06T12:44:21+08:00","updated_at":"2024-05-06T12:44:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661","variant_ids":[41916615295075]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族1-塗鴉藝術 - 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-PB35","featured_media":{"alt":null,"id":23896421367907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62356cfc46e4b252ef816fe1c896fdd4e03da6b2_d4514966-9423-4514-942b-83541ccfb502.webp?v=1714970661"}},"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: "停產" }