$product = {"id":7416366694499,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【獨家設計款】 - 春夏犬の時裝週","handle":"iphone-8-mod-nx-printable-b071","description":null,"published_at":"2024-06-11T16:57:06+08:00","created_at":"2024-05-06T14:43:09+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 8","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-original-design","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":41918962499683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31491953623139,"product_id":7416366694499,"position":5,"created_at":"2024-05-06T14:43:21+08:00","updated_at":"2024-05-06T14:43:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801","variant_ids":[41918962499683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【獨家設計款】 - 春夏犬の時裝週 - 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":"NPB0105424-B071","featured_media":{"alt":null,"id":23897366823011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5a7edfe4943aa92967d23cb72f76e09fb849eb_f9277268-8613-4d63-aee2-1ecd63edff05.webp?v=1714977792","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969d8cd1fc639d8afad2a0ecbfcb163bd53ad5be_37b25d03-79ed-4efb-89f4-12fbf8f66b95.webp?v=1714977794","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fe2cb98d0a3fbf5c66ee66036db06235b443477_32d95346-8054-45b4-8164-e01b9fa1d9c5.webp?v=1714977796","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04646bd24eb906448c1c598b1bd93216f452a23_06396427-6468-4192-a473-92fdbf9d1d7a.webp?v=1714977799","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7975b684c5f967e093ef7b1d5382938641a7833e_f6efcc84-1f43-415e-8969-87cd1dd35ea9.webp?v=1714977803","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d7bb369ffe356cdecf29080f431c5cf692e9a04_5a82a0af-b6ff-437d-96db-92ecfee8e21d.webp?v=1714977805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc8f66816e889e2a10e64e92c47eaa0c81b87ad_0ecc8518-5615-47de-b08d-8e323e44cbec.webp?v=1714977808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/160fb25e6692d4f683d0f69d0b5c5f2a8c824bd8_885a5184-03b6-4238-a454-6d132e562fdf.webp?v=1714977811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a70d95509fa431f869c81fc9402676afadccb598_e5154f71-1a59-4082-856a-bb7392cfe6ab.webp?v=1714977813"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5a7edfe4943aa92967d23cb72f76e09fb849eb_f9277268-8613-4d63-aee2-1ecd63edff05.webp?v=1714977792","options":["color"],"media":[{"alt":null,"id":23897364922467,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5a7edfe4943aa92967d23cb72f76e09fb849eb_f9277268-8613-4d63-aee2-1ecd63edff05.webp?v=1714977792"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a5a7edfe4943aa92967d23cb72f76e09fb849eb_f9277268-8613-4d63-aee2-1ecd63edff05.webp?v=1714977792","width":2000},{"alt":null,"id":23897365381219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969d8cd1fc639d8afad2a0ecbfcb163bd53ad5be_37b25d03-79ed-4efb-89f4-12fbf8f66b95.webp?v=1714977794"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969d8cd1fc639d8afad2a0ecbfcb163bd53ad5be_37b25d03-79ed-4efb-89f4-12fbf8f66b95.webp?v=1714977794","width":2000},{"alt":null,"id":23897365938275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fe2cb98d0a3fbf5c66ee66036db06235b443477_32d95346-8054-45b4-8164-e01b9fa1d9c5.webp?v=1714977796"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fe2cb98d0a3fbf5c66ee66036db06235b443477_32d95346-8054-45b4-8164-e01b9fa1d9c5.webp?v=1714977796","width":2000},{"alt":null,"id":23897366331491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04646bd24eb906448c1c598b1bd93216f452a23_06396427-6468-4192-a473-92fdbf9d1d7a.webp?v=1714977799"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04646bd24eb906448c1c598b1bd93216f452a23_06396427-6468-4192-a473-92fdbf9d1d7a.webp?v=1714977799","width":2000},{"alt":null,"id":23897366823011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801","width":2000},{"alt":null,"id":23897367314531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7975b684c5f967e093ef7b1d5382938641a7833e_f6efcc84-1f43-415e-8969-87cd1dd35ea9.webp?v=1714977803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7975b684c5f967e093ef7b1d5382938641a7833e_f6efcc84-1f43-415e-8969-87cd1dd35ea9.webp?v=1714977803","width":2000},{"alt":null,"id":23897367707747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d7bb369ffe356cdecf29080f431c5cf692e9a04_5a82a0af-b6ff-437d-96db-92ecfee8e21d.webp?v=1714977805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d7bb369ffe356cdecf29080f431c5cf692e9a04_5a82a0af-b6ff-437d-96db-92ecfee8e21d.webp?v=1714977805","width":2000},{"alt":null,"id":23897368264803,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc8f66816e889e2a10e64e92c47eaa0c81b87ad_0ecc8518-5615-47de-b08d-8e323e44cbec.webp?v=1714977808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc8f66816e889e2a10e64e92c47eaa0c81b87ad_0ecc8518-5615-47de-b08d-8e323e44cbec.webp?v=1714977808","width":2000},{"alt":null,"id":23897368854627,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/160fb25e6692d4f683d0f69d0b5c5f2a8c824bd8_885a5184-03b6-4238-a454-6d132e562fdf.webp?v=1714977811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/160fb25e6692d4f683d0f69d0b5c5f2a8c824bd8_885a5184-03b6-4238-a454-6d132e562fdf.webp?v=1714977811","width":2000},{"alt":null,"id":23897369313379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a70d95509fa431f869c81fc9402676afadccb598_e5154f71-1a59-4082-856a-bb7392cfe6ab.webp?v=1714977813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a70d95509fa431f869c81fc9402676afadccb598_e5154f71-1a59-4082-856a-bb7392cfe6ab.webp?v=1714977813","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918962499683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31491953623139,"product_id":7416366694499,"position":5,"created_at":"2024-05-06T14:43:21+08:00","updated_at":"2024-05-06T14:43:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801","variant_ids":[41918962499683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【獨家設計款】 - 春夏犬の時裝週 - 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":"NPB0105424-B071","featured_media":{"alt":null,"id":23897366823011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918962499683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31491953623139,"product_id":7416366694499,"position":5,"created_at":"2024-05-06T14:43:21+08:00","updated_at":"2024-05-06T14:43:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801","variant_ids":[41918962499683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【獨家設計款】 - 春夏犬の時裝週 - 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":"NPB0105424-B071","featured_media":{"alt":null,"id":23897366823011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f67b948e2c4ab4bea7be79b2fc6dcca1e9c6e3b_dca8debc-e8db-4024-8dbb-a9023b53f62c.webp?v=1714977801"}},"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: "停產" }