$product = {"id":7415945101411,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑","handle":"iphone-xs-max-mod-nx-printable-pb07","description":null,"published_at":"2024-06-11T16:48:35+08:00","created_at":"2024-05-06T12:29:30+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":41915791048803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490802483299,"product_id":7415945101411,"position":6,"created_at":"2024-05-06T12:29:44+08:00","updated_at":"2024-05-06T12:29:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784","variant_ids":[41915791048803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23896209293411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e48397072623f30c3502d77f16c91976513439_570ddac7-b30a-4da5-a4fa-11a3e63a5a0a.webp?v=1714969773","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ddbe3375e0d3fc59b902901ee4cdfa75b5b9ba_f4109d04-3623-4359-8b08-dd9031886865.webp?v=1714969775","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d48c2a776076eddc4f65552046ab22b9da7fb2_4b9e2fb7-e0b0-49b0-b5d6-39ca7440ebe2.webp?v=1714969777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cfc31d1150139f8ffc108462bc0fd579c81e10b_000458ca-4780-4e87-8493-6ed025ddafbc.webp?v=1714969779","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060d102e95ec747b023c01febf845a053564caba_0454b25a-0cd8-4696-b6ab-18d005f767f5.webp?v=1714969782","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81a962c5dd43a7c5b5c6b509b95e2e51538e2da9_daf55b85-b69b-4067-9299-fb86da221814.webp?v=1714969786","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9cc75594d98c39ef86fef080bb14a8ecbe9599_ab672391-e062-4ea4-bd96-e71b7e19145b.webp?v=1714969789","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3bea13410a30b43674005ec2df27b4116ccace0_5262d63a-a402-404c-ab03-cad86ebc24f0.webp?v=1714969791","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a041f363f682c65b56242b376ec0e28c7bfb461f_d7f1770f-6ca1-4eb7-b4f4-e60e49e43c75.webp?v=1714969793"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e48397072623f30c3502d77f16c91976513439_570ddac7-b30a-4da5-a4fa-11a3e63a5a0a.webp?v=1714969773","options":["color"],"media":[{"alt":null,"id":23896207032419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e48397072623f30c3502d77f16c91976513439_570ddac7-b30a-4da5-a4fa-11a3e63a5a0a.webp?v=1714969773"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e48397072623f30c3502d77f16c91976513439_570ddac7-b30a-4da5-a4fa-11a3e63a5a0a.webp?v=1714969773","width":2000},{"alt":null,"id":23896207458403,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ddbe3375e0d3fc59b902901ee4cdfa75b5b9ba_f4109d04-3623-4359-8b08-dd9031886865.webp?v=1714969775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ddbe3375e0d3fc59b902901ee4cdfa75b5b9ba_f4109d04-3623-4359-8b08-dd9031886865.webp?v=1714969775","width":2000},{"alt":null,"id":23896207753315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d48c2a776076eddc4f65552046ab22b9da7fb2_4b9e2fb7-e0b0-49b0-b5d6-39ca7440ebe2.webp?v=1714969777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d48c2a776076eddc4f65552046ab22b9da7fb2_4b9e2fb7-e0b0-49b0-b5d6-39ca7440ebe2.webp?v=1714969777","width":2000},{"alt":null,"id":23896208343139,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cfc31d1150139f8ffc108462bc0fd579c81e10b_000458ca-4780-4e87-8493-6ed025ddafbc.webp?v=1714969779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cfc31d1150139f8ffc108462bc0fd579c81e10b_000458ca-4780-4e87-8493-6ed025ddafbc.webp?v=1714969779","width":2000},{"alt":null,"id":23896208834659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060d102e95ec747b023c01febf845a053564caba_0454b25a-0cd8-4696-b6ab-18d005f767f5.webp?v=1714969782"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060d102e95ec747b023c01febf845a053564caba_0454b25a-0cd8-4696-b6ab-18d005f767f5.webp?v=1714969782","width":2000},{"alt":null,"id":23896209293411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784","width":2000},{"alt":null,"id":23896209883235,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81a962c5dd43a7c5b5c6b509b95e2e51538e2da9_daf55b85-b69b-4067-9299-fb86da221814.webp?v=1714969786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81a962c5dd43a7c5b5c6b509b95e2e51538e2da9_daf55b85-b69b-4067-9299-fb86da221814.webp?v=1714969786","width":2000},{"alt":null,"id":23896210767971,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9cc75594d98c39ef86fef080bb14a8ecbe9599_ab672391-e062-4ea4-bd96-e71b7e19145b.webp?v=1714969789"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b9cc75594d98c39ef86fef080bb14a8ecbe9599_ab672391-e062-4ea4-bd96-e71b7e19145b.webp?v=1714969789","width":2000},{"alt":null,"id":23896211128419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3bea13410a30b43674005ec2df27b4116ccace0_5262d63a-a402-404c-ab03-cad86ebc24f0.webp?v=1714969791"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3bea13410a30b43674005ec2df27b4116ccace0_5262d63a-a402-404c-ab03-cad86ebc24f0.webp?v=1714969791","width":2000},{"alt":null,"id":23896211751011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a041f363f682c65b56242b376ec0e28c7bfb461f_d7f1770f-6ca1-4eb7-b4f4-e60e49e43c75.webp?v=1714969793"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a041f363f682c65b56242b376ec0e28c7bfb461f_d7f1770f-6ca1-4eb7-b4f4-e60e49e43c75.webp?v=1714969793","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915791048803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490802483299,"product_id":7415945101411,"position":6,"created_at":"2024-05-06T12:29:44+08:00","updated_at":"2024-05-06T12:29:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784","variant_ids":[41915791048803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23896209293411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915791048803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31490802483299,"product_id":7415945101411,"position":6,"created_at":"2024-05-06T12:29:44+08:00","updated_at":"2024-05-06T12:29:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784","variant_ids":[41915791048803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23896209293411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4340fbc1e5b76503587f26cae3532922e359ef5_2251d12f-9a48-4086-9f9f-25cf2433bb6a.webp?v=1714969784"}},"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: "停產" }