$product = {"id":7408533995619,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-經典","handle":"iphone-12-mini-mod-nx-printable-pb23","description":null,"published_at":"2024-06-11T16:39:56+08:00","created_at":"2024-05-03T15:45:18+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":41886576115811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31472519544931,"product_id":7408533995619,"position":2,"created_at":"2024-05-03T15:45:23+08:00","updated_at":"2024-05-03T15:45:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323","variant_ids":[41886576115811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB23","featured_media":{"alt":null,"id":23877436833891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0ee0ea7deebeb548de55a234de2552525d05333_61d81ada-39ea-45ac-b325-a8561680ffc0.webp?v=1714722321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85b9577c809fc916e1e200d1d7624ef3dcbeb6e3_3598275e-77fc-4b09-b861-3ee47d31c49a.webp?v=1714722325","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d871eaa051a390f82492478db6c50fc9dcb6a4b3_4b1f134a-c602-4457-8e4d-6045d151e9ec.webp?v=1714722327","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/436f0fb004bf103c3982f53ff5681c00798a91ec_18cc565c-cc83-4d44-954e-5887012e7c59.webp?v=1714722330","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a1f63f71bcb918766bbdec21e2c17b08a375577_b1cff9bd-24b2-47d3-a421-9af10ad26075.webp?v=1714722332","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ff1a5ede97f3e7779d13bacfc593fa22ee47c1_489fc81c-0c71-460c-adc5-2c9503b8ab1b.webp?v=1714722334","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f471a3fe9b1fc7e35fd244a9d2c66d71a7098da4_ccf6d8f2-4ed5-4d21-8732-ed9d2ff82062.webp?v=1714722337","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4226f7524791630772103cfe59e1fbc777e7baac_89c1e45f-c6e4-4c3b-bce5-b22e5d1cfce8.webp?v=1714722339","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a3cc49cd6a14b97d28c4659d73b99a1927d9f9_114aef3b-08e2-438a-877b-9d75223587a1.webp?v=1714722342","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ef518020e9172ff5f0e6e6245cdd8d317261979_82128bb0-7ce6-4e3f-918f-994c68a51822.webp?v=1714722344"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0ee0ea7deebeb548de55a234de2552525d05333_61d81ada-39ea-45ac-b325-a8561680ffc0.webp?v=1714722321","options":["color"],"media":[{"alt":null,"id":23877436014691,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0ee0ea7deebeb548de55a234de2552525d05333_61d81ada-39ea-45ac-b325-a8561680ffc0.webp?v=1714722321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0ee0ea7deebeb548de55a234de2552525d05333_61d81ada-39ea-45ac-b325-a8561680ffc0.webp?v=1714722321","width":2000},{"alt":null,"id":23877436833891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323","width":2000},{"alt":null,"id":23877437358179,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85b9577c809fc916e1e200d1d7624ef3dcbeb6e3_3598275e-77fc-4b09-b861-3ee47d31c49a.webp?v=1714722325"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85b9577c809fc916e1e200d1d7624ef3dcbeb6e3_3598275e-77fc-4b09-b861-3ee47d31c49a.webp?v=1714722325","width":2000},{"alt":null,"id":23877437849699,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d871eaa051a390f82492478db6c50fc9dcb6a4b3_4b1f134a-c602-4457-8e4d-6045d151e9ec.webp?v=1714722327"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d871eaa051a390f82492478db6c50fc9dcb6a4b3_4b1f134a-c602-4457-8e4d-6045d151e9ec.webp?v=1714722327","width":2000},{"alt":null,"id":23877438373987,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/436f0fb004bf103c3982f53ff5681c00798a91ec_18cc565c-cc83-4d44-954e-5887012e7c59.webp?v=1714722330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/436f0fb004bf103c3982f53ff5681c00798a91ec_18cc565c-cc83-4d44-954e-5887012e7c59.webp?v=1714722330","width":2000},{"alt":null,"id":23877438865507,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a1f63f71bcb918766bbdec21e2c17b08a375577_b1cff9bd-24b2-47d3-a421-9af10ad26075.webp?v=1714722332"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a1f63f71bcb918766bbdec21e2c17b08a375577_b1cff9bd-24b2-47d3-a421-9af10ad26075.webp?v=1714722332","width":2000},{"alt":null,"id":23877439389795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ff1a5ede97f3e7779d13bacfc593fa22ee47c1_489fc81c-0c71-460c-adc5-2c9503b8ab1b.webp?v=1714722334"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ff1a5ede97f3e7779d13bacfc593fa22ee47c1_489fc81c-0c71-460c-adc5-2c9503b8ab1b.webp?v=1714722334","width":2000},{"alt":null,"id":23877440110691,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f471a3fe9b1fc7e35fd244a9d2c66d71a7098da4_ccf6d8f2-4ed5-4d21-8732-ed9d2ff82062.webp?v=1714722337"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f471a3fe9b1fc7e35fd244a9d2c66d71a7098da4_ccf6d8f2-4ed5-4d21-8732-ed9d2ff82062.webp?v=1714722337","width":2000},{"alt":null,"id":23877440700515,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4226f7524791630772103cfe59e1fbc777e7baac_89c1e45f-c6e4-4c3b-bce5-b22e5d1cfce8.webp?v=1714722339"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4226f7524791630772103cfe59e1fbc777e7baac_89c1e45f-c6e4-4c3b-bce5-b22e5d1cfce8.webp?v=1714722339","width":2000},{"alt":null,"id":23877441192035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a3cc49cd6a14b97d28c4659d73b99a1927d9f9_114aef3b-08e2-438a-877b-9d75223587a1.webp?v=1714722342"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18a3cc49cd6a14b97d28c4659d73b99a1927d9f9_114aef3b-08e2-438a-877b-9d75223587a1.webp?v=1714722342","width":2000},{"alt":null,"id":23877441716323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ef518020e9172ff5f0e6e6245cdd8d317261979_82128bb0-7ce6-4e3f-918f-994c68a51822.webp?v=1714722344"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ef518020e9172ff5f0e6e6245cdd8d317261979_82128bb0-7ce6-4e3f-918f-994c68a51822.webp?v=1714722344","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886576115811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31472519544931,"product_id":7408533995619,"position":2,"created_at":"2024-05-03T15:45:23+08:00","updated_at":"2024-05-03T15:45:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323","variant_ids":[41886576115811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB23","featured_media":{"alt":null,"id":23877436833891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886576115811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31472519544931,"product_id":7408533995619,"position":2,"created_at":"2024-05-03T15:45:23+08:00","updated_at":"2024-05-03T15:45:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323","variant_ids":[41886576115811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB23","featured_media":{"alt":null,"id":23877436833891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f484377c5b8a7e4d812bee5c41c927b323313354_90240389-baf9-4d9a-a429-6b751d32b93e.webp?v=1714722323"}},"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: "停產" }