$product = {"id":7408405446755,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - yaya款","handle":"iphone-12-mini-mod-nx-printable-iv09","description":null,"published_at":"2024-06-11T16:36:21+08:00","created_at":"2024-05-03T15:20:13+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41885118300259,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472183574627,"product_id":7408405446755,"position":8,"created_at":"2024-05-03T15:20:32+08:00","updated_at":"2024-05-03T15:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832","variant_ids":[41885118300259]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - yaya款 - 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":"NPB0118424-IV09","featured_media":{"alt":null,"id":23877099421795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d60707d9446f183a7cdd8a2e6bc8b986bbbe7419_ca96fe2a-b25e-4e00-8c9d-e0772361edc7.webp?v=1714720815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe7cf85133e21a6159ea91e6f1534d8e4ea208cf_79dddbde-65e0-4956-969e-61e5aed24093.webp?v=1714720817","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009b0c9c89809fb58329aa38224c0f70ddad0307_5b95b2a7-7754-45bc-88ab-9363a80bd2e2.webp?v=1714720820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a685343c6b44b06a7cce0c38af277096276c73db_f0c4b5fc-9d9b-4561-a5b7-abc422592de3.webp?v=1714720822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c7f47543794d01c625f9350b0005fa9200b3eb6_8676773d-1c1e-40d8-a55b-d603fc7efa23.webp?v=1714720824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796a898a7cced0aaaa7353e66b8a09fb87a14026_f2f57839-4e66-4d18-82cc-86bee68dd489.webp?v=1714720827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb1213905eaad2100f2c8eda303fb36ca6333726_eeba15ca-2ea8-4a03-8279-36a1ab4543ae.webp?v=1714720829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81045b0e24efbaa49cd022c1a0131c32442e7025_017d0f4f-7a51-4b6b-beb5-cf51e2909d09.webp?v=1714720834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75b7c459bf5c52a3ef094a0549cd778e73b75efb_db3862b7-30ab-4b76-bf30-a391cb73ec06.webp?v=1714720837","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77585ebeaa324eeaed331978fc3e3f42d384fbc1_411ac894-1740-4830-ba1b-876df9abbb9b.webp?v=1714720839"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d60707d9446f183a7cdd8a2e6bc8b986bbbe7419_ca96fe2a-b25e-4e00-8c9d-e0772361edc7.webp?v=1714720815","options":["color"],"media":[{"alt":null,"id":23877094015075,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d60707d9446f183a7cdd8a2e6bc8b986bbbe7419_ca96fe2a-b25e-4e00-8c9d-e0772361edc7.webp?v=1714720815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d60707d9446f183a7cdd8a2e6bc8b986bbbe7419_ca96fe2a-b25e-4e00-8c9d-e0772361edc7.webp?v=1714720815","width":2000},{"alt":null,"id":23877095030883,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe7cf85133e21a6159ea91e6f1534d8e4ea208cf_79dddbde-65e0-4956-969e-61e5aed24093.webp?v=1714720817"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe7cf85133e21a6159ea91e6f1534d8e4ea208cf_79dddbde-65e0-4956-969e-61e5aed24093.webp?v=1714720817","width":2000},{"alt":null,"id":23877096276067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009b0c9c89809fb58329aa38224c0f70ddad0307_5b95b2a7-7754-45bc-88ab-9363a80bd2e2.webp?v=1714720820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009b0c9c89809fb58329aa38224c0f70ddad0307_5b95b2a7-7754-45bc-88ab-9363a80bd2e2.webp?v=1714720820","width":2000},{"alt":null,"id":23877096833123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a685343c6b44b06a7cce0c38af277096276c73db_f0c4b5fc-9d9b-4561-a5b7-abc422592de3.webp?v=1714720822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a685343c6b44b06a7cce0c38af277096276c73db_f0c4b5fc-9d9b-4561-a5b7-abc422592de3.webp?v=1714720822","width":2000},{"alt":null,"id":23877097521251,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c7f47543794d01c625f9350b0005fa9200b3eb6_8676773d-1c1e-40d8-a55b-d603fc7efa23.webp?v=1714720824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c7f47543794d01c625f9350b0005fa9200b3eb6_8676773d-1c1e-40d8-a55b-d603fc7efa23.webp?v=1714720824","width":2000},{"alt":null,"id":23877098045539,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796a898a7cced0aaaa7353e66b8a09fb87a14026_f2f57839-4e66-4d18-82cc-86bee68dd489.webp?v=1714720827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796a898a7cced0aaaa7353e66b8a09fb87a14026_f2f57839-4e66-4d18-82cc-86bee68dd489.webp?v=1714720827","width":2000},{"alt":null,"id":23877098799203,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb1213905eaad2100f2c8eda303fb36ca6333726_eeba15ca-2ea8-4a03-8279-36a1ab4543ae.webp?v=1714720829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb1213905eaad2100f2c8eda303fb36ca6333726_eeba15ca-2ea8-4a03-8279-36a1ab4543ae.webp?v=1714720829","width":2000},{"alt":null,"id":23877099421795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832","width":2000},{"alt":null,"id":23877100372067,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81045b0e24efbaa49cd022c1a0131c32442e7025_017d0f4f-7a51-4b6b-beb5-cf51e2909d09.webp?v=1714720834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81045b0e24efbaa49cd022c1a0131c32442e7025_017d0f4f-7a51-4b6b-beb5-cf51e2909d09.webp?v=1714720834","width":2000},{"alt":null,"id":23877101387875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75b7c459bf5c52a3ef094a0549cd778e73b75efb_db3862b7-30ab-4b76-bf30-a391cb73ec06.webp?v=1714720837"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75b7c459bf5c52a3ef094a0549cd778e73b75efb_db3862b7-30ab-4b76-bf30-a391cb73ec06.webp?v=1714720837","width":2000},{"alt":null,"id":23877102174307,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77585ebeaa324eeaed331978fc3e3f42d384fbc1_411ac894-1740-4830-ba1b-876df9abbb9b.webp?v=1714720839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77585ebeaa324eeaed331978fc3e3f42d384fbc1_411ac894-1740-4830-ba1b-876df9abbb9b.webp?v=1714720839","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885118300259,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472183574627,"product_id":7408405446755,"position":8,"created_at":"2024-05-03T15:20:32+08:00","updated_at":"2024-05-03T15:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832","variant_ids":[41885118300259]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - yaya款 - 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":"NPB0118424-IV09","featured_media":{"alt":null,"id":23877099421795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885118300259,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472183574627,"product_id":7408405446755,"position":8,"created_at":"2024-05-03T15:20:32+08:00","updated_at":"2024-05-03T15:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832","variant_ids":[41885118300259]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - yaya款 - 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":"NPB0118424-IV09","featured_media":{"alt":null,"id":23877099421795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5c58189dfcd96275d9488f6f74a0e8781b42d3_00464738-d475-4dde-83d6-8eb46b566115.webp?v=1714720832"}},"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: "停產" }