$product = {"id":7408513941603,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-不游泳但衝浪","handle":"iphone-12-mini-mod-nx-printable-yf09","description":null,"published_at":"2024-06-11T16:39:22+08:00","created_at":"2024-05-03T15:41:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","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":41886345920611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472470163555,"product_id":7408513941603,"position":1,"created_at":"2024-05-03T15:41:32+08:00","updated_at":"2024-05-03T15:41:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092","variant_ids":[41886345920611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-不游泳但衝浪 - 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-YF09","featured_media":{"alt":null,"id":23877387386979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47cc7a4bced648f466080f17da91dd708c948657_97d1ecbf-4964-42db-9f0d-d203cd02fbd3.webp?v=1714722094","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/015eec3c543e59d1520576cdf27d6548a3a7b0c3_ee25c0a5-ee2c-48c7-a125-594aa5b4bdae.webp?v=1714722097","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/615d8fe782d0349b02fa5b21a503af39e0103677_5f2f8411-1eab-49bb-93a6-7519192bc1b2.webp?v=1714722099","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31186a977d38438df3c77d05ecb136a6d76c4f0d_12c3d9c5-d542-4899-832b-794e8a8a5df1.webp?v=1714722101","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2954306162c3fbfc1d3b10e36d593f48a819894_37a047ca-4f22-4732-8051-55b472d43a1c.webp?v=1714722104","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a93ef4c6392408af6c1a2caeb23c91557c7aa98e_08bbe4b5-5309-4990-9223-e2d8a10a9159.webp?v=1714722107","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3057aca9cd00fd431c8be1219472cc28948483_94294949-8ded-40b1-8f76-05748d64ae3f.webp?v=1714722109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fda55afccf6a5978a8895de94ec9bf8b2f3063ce_84920590-db8b-4d3f-acfa-a2be887cba4c.webp?v=1714722111","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d642082f90a8deaaa0b07dbdeb43fcbde619c40_8223b4c7-582f-4532-84cf-ec7588c96f5c.webp?v=1714722114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d74015d9f8ac170a4ea24a780ea75dff7e982d3_3d999769-04c1-4142-9847-4e6cb5f55635.webp?v=1714722116"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092","options":["color"],"media":[{"alt":null,"id":23877387386979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092","width":2000},{"alt":null,"id":23877387911267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47cc7a4bced648f466080f17da91dd708c948657_97d1ecbf-4964-42db-9f0d-d203cd02fbd3.webp?v=1714722094"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47cc7a4bced648f466080f17da91dd708c948657_97d1ecbf-4964-42db-9f0d-d203cd02fbd3.webp?v=1714722094","width":2000},{"alt":null,"id":23877388599395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/015eec3c543e59d1520576cdf27d6548a3a7b0c3_ee25c0a5-ee2c-48c7-a125-594aa5b4bdae.webp?v=1714722097"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/015eec3c543e59d1520576cdf27d6548a3a7b0c3_ee25c0a5-ee2c-48c7-a125-594aa5b4bdae.webp?v=1714722097","width":2000},{"alt":null,"id":23877389189219,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/615d8fe782d0349b02fa5b21a503af39e0103677_5f2f8411-1eab-49bb-93a6-7519192bc1b2.webp?v=1714722099"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/615d8fe782d0349b02fa5b21a503af39e0103677_5f2f8411-1eab-49bb-93a6-7519192bc1b2.webp?v=1714722099","width":2000},{"alt":null,"id":23877389746275,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31186a977d38438df3c77d05ecb136a6d76c4f0d_12c3d9c5-d542-4899-832b-794e8a8a5df1.webp?v=1714722101"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31186a977d38438df3c77d05ecb136a6d76c4f0d_12c3d9c5-d542-4899-832b-794e8a8a5df1.webp?v=1714722101","width":2000},{"alt":null,"id":23877390205027,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2954306162c3fbfc1d3b10e36d593f48a819894_37a047ca-4f22-4732-8051-55b472d43a1c.webp?v=1714722104"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2954306162c3fbfc1d3b10e36d593f48a819894_37a047ca-4f22-4732-8051-55b472d43a1c.webp?v=1714722104","width":2000},{"alt":null,"id":23877390827619,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a93ef4c6392408af6c1a2caeb23c91557c7aa98e_08bbe4b5-5309-4990-9223-e2d8a10a9159.webp?v=1714722107"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a93ef4c6392408af6c1a2caeb23c91557c7aa98e_08bbe4b5-5309-4990-9223-e2d8a10a9159.webp?v=1714722107","width":2000},{"alt":null,"id":23877391286371,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3057aca9cd00fd431c8be1219472cc28948483_94294949-8ded-40b1-8f76-05748d64ae3f.webp?v=1714722109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3057aca9cd00fd431c8be1219472cc28948483_94294949-8ded-40b1-8f76-05748d64ae3f.webp?v=1714722109","width":2000},{"alt":null,"id":23877391777891,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fda55afccf6a5978a8895de94ec9bf8b2f3063ce_84920590-db8b-4d3f-acfa-a2be887cba4c.webp?v=1714722111"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fda55afccf6a5978a8895de94ec9bf8b2f3063ce_84920590-db8b-4d3f-acfa-a2be887cba4c.webp?v=1714722111","width":2000},{"alt":null,"id":23877392400483,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d642082f90a8deaaa0b07dbdeb43fcbde619c40_8223b4c7-582f-4532-84cf-ec7588c96f5c.webp?v=1714722114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d642082f90a8deaaa0b07dbdeb43fcbde619c40_8223b4c7-582f-4532-84cf-ec7588c96f5c.webp?v=1714722114","width":2000},{"alt":null,"id":23877392957539,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d74015d9f8ac170a4ea24a780ea75dff7e982d3_3d999769-04c1-4142-9847-4e6cb5f55635.webp?v=1714722116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d74015d9f8ac170a4ea24a780ea75dff7e982d3_3d999769-04c1-4142-9847-4e6cb5f55635.webp?v=1714722116","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886345920611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472470163555,"product_id":7408513941603,"position":1,"created_at":"2024-05-03T15:41:32+08:00","updated_at":"2024-05-03T15:41:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092","variant_ids":[41886345920611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-不游泳但衝浪 - 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-YF09","featured_media":{"alt":null,"id":23877387386979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886345920611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472470163555,"product_id":7408513941603,"position":1,"created_at":"2024-05-03T15:41:32+08:00","updated_at":"2024-05-03T15:41:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092","variant_ids":[41886345920611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-不游泳但衝浪 - 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-YF09","featured_media":{"alt":null,"id":23877387386979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542f8e5f084b9cfca7b992ad68b2a7932d05639e_8f156e73-7cf7-470d-9ebf-10c5f858c92a.webp?v=1714722092"}},"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: "停產" }