$product = {"id":7408389324899,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白","handle":"iphone-12-mini-mod-nx-printable-pb12","description":null,"published_at":"2024-06-11T16:35:54+08:00","created_at":"2024-05-03T15:16:53+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 12 mini","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":41884937715811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472134127715,"product_id":7408389324899,"position":2,"created_at":"2024-05-03T15:16:59+08:00","updated_at":"2024-05-03T15:16:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619","variant_ids":[41884937715811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0118424-PB12","featured_media":{"alt":null,"id":23877049679971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08835f3375b3bd3caa3287e216e61bbf72613371_c7bc3e49-d0b5-43f5-87ae-42a261bb3a57.webp?v=1714720616","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c074f14b0e54ecc5928c85784e4d0000d71afdc8_1593f5e6-303b-467c-8f3a-b72701616f4f.webp?v=1714720621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/142bf1cd723cc587a2eb51cc9eb379361349bc0c_167384c8-fc53-434f-95d7-7d0aac48d6fe.webp?v=1714720623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5ecb315c4299754a09e3db8bea8a99eb534ef39_262919d5-1f7a-40cc-9967-bcc60b898bda.webp?v=1714720626","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1524b6bdef2976e53b762040487242c6a3405d3_80b98cb6-e75f-4bbf-9209-59d224e6a042.webp?v=1714720628","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4fcc8b2e0227de1e92782801e9fb02049e47b2_b25333c2-fee0-4d53-893b-2307e5db5cf5.webp?v=1714720631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/732a7778d3ea711b56b92d381b00b07efdcfd109_04ece942-09b1-4db3-b4b4-d76912f07342.webp?v=1714720633","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8254393b84037bfcca9ce12f10987d373de5443b_fc599525-5680-4784-8c0a-a54b912e35ab.webp?v=1714720635","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b09195dee9b6160b11a267042e417ba5b70ba422_c759e661-ea9b-4151-89ac-9db9279eb818.webp?v=1714720637","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6a848056f012c64652aa19293ecf30454dd453b_ad3a4cdb-6928-47e7-adbb-4cf635a748b3.webp?v=1714720640"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08835f3375b3bd3caa3287e216e61bbf72613371_c7bc3e49-d0b5-43f5-87ae-42a261bb3a57.webp?v=1714720616","options":["color"],"media":[{"alt":null,"id":23877048991843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08835f3375b3bd3caa3287e216e61bbf72613371_c7bc3e49-d0b5-43f5-87ae-42a261bb3a57.webp?v=1714720616"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08835f3375b3bd3caa3287e216e61bbf72613371_c7bc3e49-d0b5-43f5-87ae-42a261bb3a57.webp?v=1714720616","width":2000},{"alt":null,"id":23877049679971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619","width":2000},{"alt":null,"id":23877050138723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c074f14b0e54ecc5928c85784e4d0000d71afdc8_1593f5e6-303b-467c-8f3a-b72701616f4f.webp?v=1714720621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c074f14b0e54ecc5928c85784e4d0000d71afdc8_1593f5e6-303b-467c-8f3a-b72701616f4f.webp?v=1714720621","width":2000},{"alt":null,"id":23877050859619,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/142bf1cd723cc587a2eb51cc9eb379361349bc0c_167384c8-fc53-434f-95d7-7d0aac48d6fe.webp?v=1714720623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/142bf1cd723cc587a2eb51cc9eb379361349bc0c_167384c8-fc53-434f-95d7-7d0aac48d6fe.webp?v=1714720623","width":2000},{"alt":null,"id":23877051220067,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5ecb315c4299754a09e3db8bea8a99eb534ef39_262919d5-1f7a-40cc-9967-bcc60b898bda.webp?v=1714720626"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5ecb315c4299754a09e3db8bea8a99eb534ef39_262919d5-1f7a-40cc-9967-bcc60b898bda.webp?v=1714720626","width":2000},{"alt":null,"id":23877051777123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1524b6bdef2976e53b762040487242c6a3405d3_80b98cb6-e75f-4bbf-9209-59d224e6a042.webp?v=1714720628"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1524b6bdef2976e53b762040487242c6a3405d3_80b98cb6-e75f-4bbf-9209-59d224e6a042.webp?v=1714720628","width":2000},{"alt":null,"id":23877052104803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4fcc8b2e0227de1e92782801e9fb02049e47b2_b25333c2-fee0-4d53-893b-2307e5db5cf5.webp?v=1714720631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4fcc8b2e0227de1e92782801e9fb02049e47b2_b25333c2-fee0-4d53-893b-2307e5db5cf5.webp?v=1714720631","width":2000},{"alt":null,"id":23877052596323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/732a7778d3ea711b56b92d381b00b07efdcfd109_04ece942-09b1-4db3-b4b4-d76912f07342.webp?v=1714720633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/732a7778d3ea711b56b92d381b00b07efdcfd109_04ece942-09b1-4db3-b4b4-d76912f07342.webp?v=1714720633","width":2000},{"alt":null,"id":23877053284451,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8254393b84037bfcca9ce12f10987d373de5443b_fc599525-5680-4784-8c0a-a54b912e35ab.webp?v=1714720635"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8254393b84037bfcca9ce12f10987d373de5443b_fc599525-5680-4784-8c0a-a54b912e35ab.webp?v=1714720635","width":2000},{"alt":null,"id":23877053644899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b09195dee9b6160b11a267042e417ba5b70ba422_c759e661-ea9b-4151-89ac-9db9279eb818.webp?v=1714720637"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b09195dee9b6160b11a267042e417ba5b70ba422_c759e661-ea9b-4151-89ac-9db9279eb818.webp?v=1714720637","width":2000},{"alt":null,"id":23877054234723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6a848056f012c64652aa19293ecf30454dd453b_ad3a4cdb-6928-47e7-adbb-4cf635a748b3.webp?v=1714720640"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6a848056f012c64652aa19293ecf30454dd453b_ad3a4cdb-6928-47e7-adbb-4cf635a748b3.webp?v=1714720640","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884937715811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472134127715,"product_id":7408389324899,"position":2,"created_at":"2024-05-03T15:16:59+08:00","updated_at":"2024-05-03T15:16:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619","variant_ids":[41884937715811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0118424-PB12","featured_media":{"alt":null,"id":23877049679971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884937715811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472134127715,"product_id":7408389324899,"position":2,"created_at":"2024-05-03T15:16:59+08:00","updated_at":"2024-05-03T15:16:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619","variant_ids":[41884937715811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0118424-PB12","featured_media":{"alt":null,"id":23877049679971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd7b607c5c3a83424bcc7c024e9f502537e271d_8e9445bc-7de7-46cc-87b0-0c44e934d092.webp?v=1714720619"}},"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: "停產" }