$product = {"id":7408394960995,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(加州野火)","handle":"iphone-12-pro-max-mod-nx-printable-af03","description":null,"published_at":"2024-06-11T16:36:03+08:00","created_at":"2024-05-03T15:18:00+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":41884997353571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472147923043,"product_id":7408394960995,"position":1,"created_at":"2024-05-03T15:18:03+08:00","updated_at":"2024-05-03T15:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683","variant_ids":[41884997353571]},"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-AF03","featured_media":{"alt":null,"id":23877063540835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b50fee93cbd82217790ecfaa3c87e7de51549f1_344acc08-872b-4978-8dd4-aff1b48b132a.webp?v=1714720685","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6440f7047c495b2b325b7a448977d6bdead205c7_ad36a768-bfac-44af-96cf-41e3a9468b40.webp?v=1714720688","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/905a891b27562bc6b034b643ceb40682979bada7_749366cc-1a15-4f57-9dec-315c6a70fed0.webp?v=1714720690","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fea792c497fff4027ce068a2aba40d095379c1b_11364481-f710-4a69-b0e5-6247ee12b4fe.webp?v=1714720692","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c5323ec2f5f1f70acc28968f3be29f62825995d_ae53fb31-0d3e-45c4-bf9e-7ca17cf261e2.webp?v=1714720695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cd5dd28bb76e3570ca910d8aa445ca31f2fef1f_21e211b9-278b-47ab-93a8-dbb1c3817dca.webp?v=1714720698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95ebcb94d0489201c529288dd3088c0a38d7d0bd_87fba442-bd65-4f0c-afa7-55a413ee6b76.webp?v=1714720700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20705685febfa565703d25006f307f2b3962254a_c8a94965-f497-4f12-bb86-59b5febd2599.webp?v=1714720703","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b06739f958d38d92f301a4c7c6e97a49fa38521b_6d21f998-4418-428e-a0b5-892fff428e9d.webp?v=1714720705"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683","options":["color"],"media":[{"alt":null,"id":23877063540835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683","width":2000},{"alt":null,"id":23877063934051,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b50fee93cbd82217790ecfaa3c87e7de51549f1_344acc08-872b-4978-8dd4-aff1b48b132a.webp?v=1714720685"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b50fee93cbd82217790ecfaa3c87e7de51549f1_344acc08-872b-4978-8dd4-aff1b48b132a.webp?v=1714720685","width":2000},{"alt":null,"id":23877064491107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6440f7047c495b2b325b7a448977d6bdead205c7_ad36a768-bfac-44af-96cf-41e3a9468b40.webp?v=1714720688"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6440f7047c495b2b325b7a448977d6bdead205c7_ad36a768-bfac-44af-96cf-41e3a9468b40.webp?v=1714720688","width":2000},{"alt":null,"id":23877065080931,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/905a891b27562bc6b034b643ceb40682979bada7_749366cc-1a15-4f57-9dec-315c6a70fed0.webp?v=1714720690"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/905a891b27562bc6b034b643ceb40682979bada7_749366cc-1a15-4f57-9dec-315c6a70fed0.webp?v=1714720690","width":2000},{"alt":null,"id":23877065670755,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fea792c497fff4027ce068a2aba40d095379c1b_11364481-f710-4a69-b0e5-6247ee12b4fe.webp?v=1714720692"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fea792c497fff4027ce068a2aba40d095379c1b_11364481-f710-4a69-b0e5-6247ee12b4fe.webp?v=1714720692","width":2000},{"alt":null,"id":23877066358883,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c5323ec2f5f1f70acc28968f3be29f62825995d_ae53fb31-0d3e-45c4-bf9e-7ca17cf261e2.webp?v=1714720695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c5323ec2f5f1f70acc28968f3be29f62825995d_ae53fb31-0d3e-45c4-bf9e-7ca17cf261e2.webp?v=1714720695","width":2000},{"alt":null,"id":23877067079779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cd5dd28bb76e3570ca910d8aa445ca31f2fef1f_21e211b9-278b-47ab-93a8-dbb1c3817dca.webp?v=1714720698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cd5dd28bb76e3570ca910d8aa445ca31f2fef1f_21e211b9-278b-47ab-93a8-dbb1c3817dca.webp?v=1714720698","width":2000},{"alt":null,"id":23877067604067,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95ebcb94d0489201c529288dd3088c0a38d7d0bd_87fba442-bd65-4f0c-afa7-55a413ee6b76.webp?v=1714720700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95ebcb94d0489201c529288dd3088c0a38d7d0bd_87fba442-bd65-4f0c-afa7-55a413ee6b76.webp?v=1714720700","width":2000},{"alt":null,"id":23877068128355,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20705685febfa565703d25006f307f2b3962254a_c8a94965-f497-4f12-bb86-59b5febd2599.webp?v=1714720703"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20705685febfa565703d25006f307f2b3962254a_c8a94965-f497-4f12-bb86-59b5febd2599.webp?v=1714720703","width":2000},{"alt":null,"id":23877068685411,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b06739f958d38d92f301a4c7c6e97a49fa38521b_6d21f998-4418-428e-a0b5-892fff428e9d.webp?v=1714720705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b06739f958d38d92f301a4c7c6e97a49fa38521b_6d21f998-4418-428e-a0b5-892fff428e9d.webp?v=1714720705","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884997353571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472147923043,"product_id":7408394960995,"position":1,"created_at":"2024-05-03T15:18:03+08:00","updated_at":"2024-05-03T15:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683","variant_ids":[41884997353571]},"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-AF03","featured_media":{"alt":null,"id":23877063540835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884997353571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472147923043,"product_id":7408394960995,"position":1,"created_at":"2024-05-03T15:18:03+08:00","updated_at":"2024-05-03T15:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683","variant_ids":[41884997353571]},"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-AF03","featured_media":{"alt":null,"id":23877063540835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa80d8e3576eadfb8e15e072d0289e7dff05a15_df8ee48e-4888-46c8-ab6d-e6f2b4226c04.webp?v=1714720683"}},"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: "停產" }