$product = {"id":7411265306723,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 經典系列-Ohana是家人","handle":"iphone-14-plus-mod-nx-magsafe-printable-yf10","description":null,"published_at":"2024-06-11T17:40:18+08:00","created_at":"2024-05-04T23:56:27+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41896712568931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31479996022883,"product_id":7411265306723,"position":7,"created_at":"2024-05-04T23:56:43+08:00","updated_at":"2024-05-04T23:56:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203","variant_ids":[41896712568931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 經典系列-Ohana是家人 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YF10","featured_media":{"alt":null,"id":23885246562403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a5a6a1b025614de08ebbcf7f3713437d6191322_3448beb7-7b3e-4cf7-a11e-227a45c205bf.webp?v=1714838189","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33b932c756530e7fa36c60a1b6678414914fbeab_111cf132-ff78-4631-b968-7fd700b7161d.webp?v=1714838192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc08bb098a5fd6a2b991f8200d9504bd8c2d5c1_ad916f38-63b8-4952-8f25-2fd708f07c51.webp?v=1714838194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c1400dece5db9b9fe9cafedd12a205d5131b779_a932a9d2-b7c8-4a30-8d29-6db3aba62001.webp?v=1714838196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71cc2865fc4e5e5a5f7eb4cd7a61defdf1566202_9845cabd-6c04-4e48-b37b-a38b60643d58.webp?v=1714838199","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc67cec18123a94b815f4338bb5916160b89aff3_d493f5b4-f26f-4381-9f6b-10d71cf90f0d.webp?v=1714838201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2971cf6ad65ac59033612c96b0806146160eaef0_8ffce327-fe69-408e-b1bd-b4c366bc89bf.webp?v=1714838205","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1346334288a8a029997e6576cef227a6174a2d8c_98eb404c-2821-41e9-b1d4-f78fa3240efa.webp?v=1714838208","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e9403f8e432780e88041f0bb80a5a6dacd626bb_36ea90d1-61eb-42ba-bc0d-f1ce55e2ece0.webp?v=1714838210"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a5a6a1b025614de08ebbcf7f3713437d6191322_3448beb7-7b3e-4cf7-a11e-227a45c205bf.webp?v=1714838189","options":["color"],"media":[{"alt":null,"id":23885243547747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a5a6a1b025614de08ebbcf7f3713437d6191322_3448beb7-7b3e-4cf7-a11e-227a45c205bf.webp?v=1714838189"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a5a6a1b025614de08ebbcf7f3713437d6191322_3448beb7-7b3e-4cf7-a11e-227a45c205bf.webp?v=1714838189","width":2000},{"alt":null,"id":23885244039267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33b932c756530e7fa36c60a1b6678414914fbeab_111cf132-ff78-4631-b968-7fd700b7161d.webp?v=1714838192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33b932c756530e7fa36c60a1b6678414914fbeab_111cf132-ff78-4631-b968-7fd700b7161d.webp?v=1714838192","width":2000},{"alt":null,"id":23885244629091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc08bb098a5fd6a2b991f8200d9504bd8c2d5c1_ad916f38-63b8-4952-8f25-2fd708f07c51.webp?v=1714838194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc08bb098a5fd6a2b991f8200d9504bd8c2d5c1_ad916f38-63b8-4952-8f25-2fd708f07c51.webp?v=1714838194","width":2000},{"alt":null,"id":23885245087843,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c1400dece5db9b9fe9cafedd12a205d5131b779_a932a9d2-b7c8-4a30-8d29-6db3aba62001.webp?v=1714838196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c1400dece5db9b9fe9cafedd12a205d5131b779_a932a9d2-b7c8-4a30-8d29-6db3aba62001.webp?v=1714838196","width":2000},{"alt":null,"id":23885245579363,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71cc2865fc4e5e5a5f7eb4cd7a61defdf1566202_9845cabd-6c04-4e48-b37b-a38b60643d58.webp?v=1714838199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71cc2865fc4e5e5a5f7eb4cd7a61defdf1566202_9845cabd-6c04-4e48-b37b-a38b60643d58.webp?v=1714838199","width":2000},{"alt":null,"id":23885245939811,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc67cec18123a94b815f4338bb5916160b89aff3_d493f5b4-f26f-4381-9f6b-10d71cf90f0d.webp?v=1714838201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc67cec18123a94b815f4338bb5916160b89aff3_d493f5b4-f26f-4381-9f6b-10d71cf90f0d.webp?v=1714838201","width":2000},{"alt":null,"id":23885246562403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203","width":2000},{"alt":null,"id":23885246955619,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2971cf6ad65ac59033612c96b0806146160eaef0_8ffce327-fe69-408e-b1bd-b4c366bc89bf.webp?v=1714838205"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2971cf6ad65ac59033612c96b0806146160eaef0_8ffce327-fe69-408e-b1bd-b4c366bc89bf.webp?v=1714838205","width":2000},{"alt":null,"id":23885247414371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1346334288a8a029997e6576cef227a6174a2d8c_98eb404c-2821-41e9-b1d4-f78fa3240efa.webp?v=1714838208"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1346334288a8a029997e6576cef227a6174a2d8c_98eb404c-2821-41e9-b1d4-f78fa3240efa.webp?v=1714838208","width":2000},{"alt":null,"id":23885248004195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e9403f8e432780e88041f0bb80a5a6dacd626bb_36ea90d1-61eb-42ba-bc0d-f1ce55e2ece0.webp?v=1714838210"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e9403f8e432780e88041f0bb80a5a6dacd626bb_36ea90d1-61eb-42ba-bc0d-f1ce55e2ece0.webp?v=1714838210","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896712568931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31479996022883,"product_id":7411265306723,"position":7,"created_at":"2024-05-04T23:56:43+08:00","updated_at":"2024-05-04T23:56:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203","variant_ids":[41896712568931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 經典系列-Ohana是家人 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YF10","featured_media":{"alt":null,"id":23885246562403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896712568931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31479996022883,"product_id":7411265306723,"position":7,"created_at":"2024-05-04T23:56:43+08:00","updated_at":"2024-05-04T23:56:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203","variant_ids":[41896712568931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 經典系列-Ohana是家人 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YF10","featured_media":{"alt":null,"id":23885246562403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc87a3217f54a47bc3f65c18678ca38c9445629_7e9bd4f9-fd2b-4ca0-af41-d53fde29a966.webp?v=1714838203"}},"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: "停產" }