$product = {"id":7408521019491,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 人在做 加納利群島在看","handle":"iphone-12-pro-max-mod-nx-printable-af08","description":null,"published_at":"2024-06-11T16:39:34+08:00","created_at":"2024-05-03T15:42:52+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":41886428758115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472490938467,"product_id":7408521019491,"position":6,"created_at":"2024-05-03T15:43:07+08:00","updated_at":"2024-05-03T15:43:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187","variant_ids":[41886428758115]},"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-AF08","featured_media":{"alt":null,"id":23877408325731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87eb117ffa4c5a89853f040446e647704a327cfb_52315dcf-bd70-47c1-b746-dd82bb720579.webp?v=1714722175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a450d72d6e53890e4d2aafa665aae4092c76bd_3f30edfa-234c-408d-889f-01617433b7a8.webp?v=1714722177","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/447b87c19c2e8739fbf8855fd5989e7ac957564b_ea13d9cf-4402-4072-9cc2-cfd83b49547b.webp?v=1714722179","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5513f3e2afa0cbebb776dd53ca087c136dbad91f_3fbcf307-63d2-4419-9b2b-47f615d84f23.webp?v=1714722182","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbea423593306b5954fc0fcc06d4829cc6dc0a23_ffd6a9ca-7464-4f71-a8da-754b2a442fb8.webp?v=1714722185","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b5b80e1771fd89243d98beebba33813035b30de_f1eb3277-7bc5-4704-b9f8-0a5a110fad56.webp?v=1714722190","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5545863b0cda9944c4fc216dcaa5e85e7e473388_266a6132-e118-432a-9cb6-015251fea25b.webp?v=1714722192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20b12e1f210776b6df81886c29a13c5526227cc0_05a89fc9-5b46-42ee-b8c7-54c11fdd142d.webp?v=1714722195","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b31a0524c528da6d7edc044ba67dcbfe6b4613cb_bd623370-995a-46ef-8165-07947dd7b658.webp?v=1714722197"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87eb117ffa4c5a89853f040446e647704a327cfb_52315dcf-bd70-47c1-b746-dd82bb720579.webp?v=1714722175","options":["color"],"media":[{"alt":null,"id":23877405343843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87eb117ffa4c5a89853f040446e647704a327cfb_52315dcf-bd70-47c1-b746-dd82bb720579.webp?v=1714722175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87eb117ffa4c5a89853f040446e647704a327cfb_52315dcf-bd70-47c1-b746-dd82bb720579.webp?v=1714722175","width":2000},{"alt":null,"id":23877405835363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a450d72d6e53890e4d2aafa665aae4092c76bd_3f30edfa-234c-408d-889f-01617433b7a8.webp?v=1714722177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a450d72d6e53890e4d2aafa665aae4092c76bd_3f30edfa-234c-408d-889f-01617433b7a8.webp?v=1714722177","width":2000},{"alt":null,"id":23877406425187,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/447b87c19c2e8739fbf8855fd5989e7ac957564b_ea13d9cf-4402-4072-9cc2-cfd83b49547b.webp?v=1714722179"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/447b87c19c2e8739fbf8855fd5989e7ac957564b_ea13d9cf-4402-4072-9cc2-cfd83b49547b.webp?v=1714722179","width":2000},{"alt":null,"id":23877406949475,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5513f3e2afa0cbebb776dd53ca087c136dbad91f_3fbcf307-63d2-4419-9b2b-47f615d84f23.webp?v=1714722182"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5513f3e2afa0cbebb776dd53ca087c136dbad91f_3fbcf307-63d2-4419-9b2b-47f615d84f23.webp?v=1714722182","width":2000},{"alt":null,"id":23877407834211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbea423593306b5954fc0fcc06d4829cc6dc0a23_ffd6a9ca-7464-4f71-a8da-754b2a442fb8.webp?v=1714722185"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbea423593306b5954fc0fcc06d4829cc6dc0a23_ffd6a9ca-7464-4f71-a8da-754b2a442fb8.webp?v=1714722185","width":2000},{"alt":null,"id":23877408325731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187","width":2000},{"alt":null,"id":23877408784483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b5b80e1771fd89243d98beebba33813035b30de_f1eb3277-7bc5-4704-b9f8-0a5a110fad56.webp?v=1714722190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b5b80e1771fd89243d98beebba33813035b30de_f1eb3277-7bc5-4704-b9f8-0a5a110fad56.webp?v=1714722190","width":2000},{"alt":null,"id":23877409177699,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5545863b0cda9944c4fc216dcaa5e85e7e473388_266a6132-e118-432a-9cb6-015251fea25b.webp?v=1714722192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5545863b0cda9944c4fc216dcaa5e85e7e473388_266a6132-e118-432a-9cb6-015251fea25b.webp?v=1714722192","width":2000},{"alt":null,"id":23877409734755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20b12e1f210776b6df81886c29a13c5526227cc0_05a89fc9-5b46-42ee-b8c7-54c11fdd142d.webp?v=1714722195"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20b12e1f210776b6df81886c29a13c5526227cc0_05a89fc9-5b46-42ee-b8c7-54c11fdd142d.webp?v=1714722195","width":2000},{"alt":null,"id":23877410324579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b31a0524c528da6d7edc044ba67dcbfe6b4613cb_bd623370-995a-46ef-8165-07947dd7b658.webp?v=1714722197"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b31a0524c528da6d7edc044ba67dcbfe6b4613cb_bd623370-995a-46ef-8165-07947dd7b658.webp?v=1714722197","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886428758115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472490938467,"product_id":7408521019491,"position":6,"created_at":"2024-05-03T15:43:07+08:00","updated_at":"2024-05-03T15:43:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187","variant_ids":[41886428758115]},"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-AF08","featured_media":{"alt":null,"id":23877408325731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886428758115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472490938467,"product_id":7408521019491,"position":6,"created_at":"2024-05-03T15:43:07+08:00","updated_at":"2024-05-03T15:43:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187","variant_ids":[41886428758115]},"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-AF08","featured_media":{"alt":null,"id":23877408325731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a978be9bc2fca5459a4c3217fc2dedda7903ba8a_922d8f9e-17c0-4664-bfc0-65f46f64f6ce.webp?v=1714722187"}},"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: "停產" }