$product = {"id":7411447922787,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - POP全載具2-白","handle":"iphone-14-plus-mod-nx-magsafe-printable-pb12","description":null,"published_at":"2024-06-11T17:45:17+08:00","created_at":"2024-05-05T00:31:45+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41899015241827,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31480453365859,"product_id":7411447922787,"position":10,"created_at":"2024-05-05T00:32:08+08:00","updated_at":"2024-05-05T00:32:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328","variant_ids":[41899015241827]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23885705117795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65bc1ce27dca85a61aaed6e291ce80dd9718182f_5f6b1bf2-fc2b-4b72-a49f-f8b7bf05fd8e.webp?v=1714840308","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0d72a317c52406bae425bbb2f4120456bdc8462_a1904c76-da9c-478d-be73-f92bfaca0c77.webp?v=1714840310","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1b91ad5893b348ee45ede9a55deb4c35a49aeec_e7e3466f-9e20-4914-8cce-40fbb4cb41c7.webp?v=1714840312","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5558b197c9c6d45eccacd4ad5163ad5860edd74_35f6b408-eac5-4375-b1a2-80953264f42a.webp?v=1714840314","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e2278c7c0431e321a04374283fd1415e0c0e787_e6e9bb46-321f-445f-977b-02c976108c08.webp?v=1714840317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd9e3f34eb13466becc97f2c2c61d60a8b17478_29e03b2f-241f-4168-be05-932560932d31.webp?v=1714840319","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2cca2151a74443e0d5c88d71e0cd344aa5e5dae_853238d5-e790-4627-9cdb-64eaf7ec7495.webp?v=1714840321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39707d50100b741b4c8fc6f84708066ccb36822a_6a0c15a3-a226-4ada-81a8-a1736aec3fe0.webp?v=1714840324","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d9f60f5c0007a70f14d91d6978b973933319f28_9a9e9858-030b-42b9-a454-d0bf3d2a6173.webp?v=1714840326","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65bc1ce27dca85a61aaed6e291ce80dd9718182f_5f6b1bf2-fc2b-4b72-a49f-f8b7bf05fd8e.webp?v=1714840308","options":["color"],"media":[{"alt":null,"id":23885700857955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65bc1ce27dca85a61aaed6e291ce80dd9718182f_5f6b1bf2-fc2b-4b72-a49f-f8b7bf05fd8e.webp?v=1714840308"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65bc1ce27dca85a61aaed6e291ce80dd9718182f_5f6b1bf2-fc2b-4b72-a49f-f8b7bf05fd8e.webp?v=1714840308","width":2000},{"alt":null,"id":23885701185635,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0d72a317c52406bae425bbb2f4120456bdc8462_a1904c76-da9c-478d-be73-f92bfaca0c77.webp?v=1714840310"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0d72a317c52406bae425bbb2f4120456bdc8462_a1904c76-da9c-478d-be73-f92bfaca0c77.webp?v=1714840310","width":2000},{"alt":null,"id":23885701578851,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1b91ad5893b348ee45ede9a55deb4c35a49aeec_e7e3466f-9e20-4914-8cce-40fbb4cb41c7.webp?v=1714840312"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1b91ad5893b348ee45ede9a55deb4c35a49aeec_e7e3466f-9e20-4914-8cce-40fbb4cb41c7.webp?v=1714840312","width":2000},{"alt":null,"id":23885702135907,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5558b197c9c6d45eccacd4ad5163ad5860edd74_35f6b408-eac5-4375-b1a2-80953264f42a.webp?v=1714840314"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5558b197c9c6d45eccacd4ad5163ad5860edd74_35f6b408-eac5-4375-b1a2-80953264f42a.webp?v=1714840314","width":2000},{"alt":null,"id":23885702529123,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e2278c7c0431e321a04374283fd1415e0c0e787_e6e9bb46-321f-445f-977b-02c976108c08.webp?v=1714840317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e2278c7c0431e321a04374283fd1415e0c0e787_e6e9bb46-321f-445f-977b-02c976108c08.webp?v=1714840317","width":2000},{"alt":null,"id":23885703118947,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd9e3f34eb13466becc97f2c2c61d60a8b17478_29e03b2f-241f-4168-be05-932560932d31.webp?v=1714840319"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd9e3f34eb13466becc97f2c2c61d60a8b17478_29e03b2f-241f-4168-be05-932560932d31.webp?v=1714840319","width":2000},{"alt":null,"id":23885703544931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2cca2151a74443e0d5c88d71e0cd344aa5e5dae_853238d5-e790-4627-9cdb-64eaf7ec7495.webp?v=1714840321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2cca2151a74443e0d5c88d71e0cd344aa5e5dae_853238d5-e790-4627-9cdb-64eaf7ec7495.webp?v=1714840321","width":2000},{"alt":null,"id":23885704167523,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39707d50100b741b4c8fc6f84708066ccb36822a_6a0c15a3-a226-4ada-81a8-a1736aec3fe0.webp?v=1714840324"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39707d50100b741b4c8fc6f84708066ccb36822a_6a0c15a3-a226-4ada-81a8-a1736aec3fe0.webp?v=1714840324","width":2000},{"alt":null,"id":23885704593507,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d9f60f5c0007a70f14d91d6978b973933319f28_9a9e9858-030b-42b9-a454-d0bf3d2a6173.webp?v=1714840326"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d9f60f5c0007a70f14d91d6978b973933319f28_9a9e9858-030b-42b9-a454-d0bf3d2a6173.webp?v=1714840326","width":2000},{"alt":null,"id":23885705117795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41899015241827,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31480453365859,"product_id":7411447922787,"position":10,"created_at":"2024-05-05T00:32:08+08:00","updated_at":"2024-05-05T00:32:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328","variant_ids":[41899015241827]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23885705117795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41899015241827,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31480453365859,"product_id":7411447922787,"position":10,"created_at":"2024-05-05T00:32:08+08:00","updated_at":"2024-05-05T00:32:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328","variant_ids":[41899015241827]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23885705117795,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec890ad30202854be37ccc2fccb84c05bfa3552c_440f2229-dabf-4a9d-b4c6-a981ccf2db94.webp?v=1714840328"}},"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: "停產" }