$product = {"id":7408397549667,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 人在做 大堡礁在看","handle":"iphone-12-pro-max-mod-nx-printable-af07","description":null,"published_at":"2024-06-11T16:36:08+08:00","created_at":"2024-05-03T15:18:33+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-look","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":41885026779235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472160211043,"product_id":7408397549667,"position":10,"created_at":"2024-05-03T15:18:58+08:00","updated_at":"2024-05-03T15:18:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738","variant_ids":[41885026779235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 人在做 大堡礁在看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF07","featured_media":{"alt":null,"id":23877075861603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/451e04288c299e5ffc1d12af328c40df852605f1_665cd52a-6560-4080-ad18-9181a4aa8302.webp?v=1714720715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/201ef7eb7dd92779135724965ed98948575983dc_53131d8f-ec61-4f4b-8a08-373649feb25d.webp?v=1714720718","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e077885ac8f4c00c853337acbcad5aae54b08835_e13c6821-690a-4d17-bb08-0115dd71c1b1.webp?v=1714720720","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b8568bad1cfb9425420c1c2692addebe648ace_bf7ae256-e1a4-4a86-bf85-8b43f63480da.webp?v=1714720723","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/378a06991d16aae1d43be2a42d969f6cb5e7a80e_8f3bc95b-78ba-4109-a9d8-8a6949c953b9.webp?v=1714720725","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa29c4d99cdd8a9ad544a9423647df7e7d64a5a4_26e43cca-b326-44b0-8361-ef3b4cb943c8.webp?v=1714720728","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8f93685a894d66fc9e9e685da1675dd25c47e82_c1164740-7200-4ff7-a0fb-8bf99848f216.webp?v=1714720731","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f66b6db10ba589957f267fa07de857791c3df20a_df6e1e39-e714-473b-b792-bab2b4371679.webp?v=1714720733","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6705550ad5f1482bba1fabe7df4b0547a15a25_a7a40f5b-bf96-4129-905e-2044649acf20.webp?v=1714720736","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/451e04288c299e5ffc1d12af328c40df852605f1_665cd52a-6560-4080-ad18-9181a4aa8302.webp?v=1714720715","options":["color"],"media":[{"alt":null,"id":23877070913635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/451e04288c299e5ffc1d12af328c40df852605f1_665cd52a-6560-4080-ad18-9181a4aa8302.webp?v=1714720715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/451e04288c299e5ffc1d12af328c40df852605f1_665cd52a-6560-4080-ad18-9181a4aa8302.webp?v=1714720715","width":2000},{"alt":null,"id":23877071274083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/201ef7eb7dd92779135724965ed98948575983dc_53131d8f-ec61-4f4b-8a08-373649feb25d.webp?v=1714720718"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/201ef7eb7dd92779135724965ed98948575983dc_53131d8f-ec61-4f4b-8a08-373649feb25d.webp?v=1714720718","width":2000},{"alt":null,"id":23877071831139,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e077885ac8f4c00c853337acbcad5aae54b08835_e13c6821-690a-4d17-bb08-0115dd71c1b1.webp?v=1714720720"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e077885ac8f4c00c853337acbcad5aae54b08835_e13c6821-690a-4d17-bb08-0115dd71c1b1.webp?v=1714720720","width":2000},{"alt":null,"id":23877072191587,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b8568bad1cfb9425420c1c2692addebe648ace_bf7ae256-e1a4-4a86-bf85-8b43f63480da.webp?v=1714720723"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b8568bad1cfb9425420c1c2692addebe648ace_bf7ae256-e1a4-4a86-bf85-8b43f63480da.webp?v=1714720723","width":2000},{"alt":null,"id":23877072846947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/378a06991d16aae1d43be2a42d969f6cb5e7a80e_8f3bc95b-78ba-4109-a9d8-8a6949c953b9.webp?v=1714720725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/378a06991d16aae1d43be2a42d969f6cb5e7a80e_8f3bc95b-78ba-4109-a9d8-8a6949c953b9.webp?v=1714720725","width":2000},{"alt":null,"id":23877073338467,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa29c4d99cdd8a9ad544a9423647df7e7d64a5a4_26e43cca-b326-44b0-8361-ef3b4cb943c8.webp?v=1714720728"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa29c4d99cdd8a9ad544a9423647df7e7d64a5a4_26e43cca-b326-44b0-8361-ef3b4cb943c8.webp?v=1714720728","width":2000},{"alt":null,"id":23877074124899,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8f93685a894d66fc9e9e685da1675dd25c47e82_c1164740-7200-4ff7-a0fb-8bf99848f216.webp?v=1714720731"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8f93685a894d66fc9e9e685da1675dd25c47e82_c1164740-7200-4ff7-a0fb-8bf99848f216.webp?v=1714720731","width":2000},{"alt":null,"id":23877074681955,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f66b6db10ba589957f267fa07de857791c3df20a_df6e1e39-e714-473b-b792-bab2b4371679.webp?v=1714720733"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f66b6db10ba589957f267fa07de857791c3df20a_df6e1e39-e714-473b-b792-bab2b4371679.webp?v=1714720733","width":2000},{"alt":null,"id":23877075173475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6705550ad5f1482bba1fabe7df4b0547a15a25_a7a40f5b-bf96-4129-905e-2044649acf20.webp?v=1714720736"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6705550ad5f1482bba1fabe7df4b0547a15a25_a7a40f5b-bf96-4129-905e-2044649acf20.webp?v=1714720736","width":2000},{"alt":null,"id":23877075861603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885026779235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472160211043,"product_id":7408397549667,"position":10,"created_at":"2024-05-03T15:18:58+08:00","updated_at":"2024-05-03T15:18:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738","variant_ids":[41885026779235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 人在做 大堡礁在看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF07","featured_media":{"alt":null,"id":23877075861603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885026779235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472160211043,"product_id":7408397549667,"position":10,"created_at":"2024-05-03T15:18:58+08:00","updated_at":"2024-05-03T15:18:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738","variant_ids":[41885026779235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 人在做 大堡礁在看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF07","featured_media":{"alt":null,"id":23877075861603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1478a197347f34cd5455f678767338ff0e52db2a_d856ee58-f0d7-4840-ab66-37c24bd0df10.webp?v=1714720738"}},"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: "停產" }