$product = {"id":7407857565795,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Look - 願傷疤 有天開出花(泰國林地濫伐)","handle":"iphone-14-plus-mod-nx-printable-af04","description":null,"published_at":"2024-06-11T16:24:47+08:00","created_at":"2024-05-03T11:03:39+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 14 Plus","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":41879705780323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-AF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470547697763,"product_id":7407857565795,"position":3,"created_at":"2024-05-03T11:03:47+08:00","updated_at":"2024-05-03T11:03:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427","variant_ids":[41879705780323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-AF04","featured_media":{"alt":null,"id":23875451551843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaf52f73ee29e6dee2fd601262e2a47f78776631_8c06de28-994f-49ac-aca8-4e9bb5349f14.webp?v=1714705422","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ca93b5f3166f864eb840a4ab5bab5ce5f0b4811_f6a053e3-a173-4659-a583-9f27a60348b6.webp?v=1714705424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8de26499db0937d3e1f3d93e79191a3ef4279bb_3218372c-d960-476e-b3a4-be8af4314f94.webp?v=1714705429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2cc55fc9be73792804af0f17aa60a64ba07049_88ff16c3-91c6-486b-ae11-542c7a34b4a9.webp?v=1714705432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba6e09aa838c15c877d95736b27d9000a75caff2_97e2f9ee-8a64-4a86-8745-ae2721c84ee2.webp?v=1714705434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51eb4c2c95361362d9bc2779391e4573af767ca2_0fd3b1be-c5f2-4d45-9b0b-d1ab7b25356d.webp?v=1714705437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d87f756e4162c70f012107eae957da51df9ea6c_3b43c3b4-0cf1-44d6-9bf6-24d3ca0f4960.webp?v=1714705439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4c11afaf8ea19748f2cb19add7d66c1a4bc474a_72db7a78-4095-4b7f-be74-1a5cbf04bcc8.webp?v=1714705441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccd7f1dac087f3404247a9a81f0f29f6df2b250f_e1303453-7591-41b4-b960-95a118ff4b7e.webp?v=1714705444"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaf52f73ee29e6dee2fd601262e2a47f78776631_8c06de28-994f-49ac-aca8-4e9bb5349f14.webp?v=1714705422","options":["color"],"media":[{"alt":null,"id":23875449782371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaf52f73ee29e6dee2fd601262e2a47f78776631_8c06de28-994f-49ac-aca8-4e9bb5349f14.webp?v=1714705422"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaf52f73ee29e6dee2fd601262e2a47f78776631_8c06de28-994f-49ac-aca8-4e9bb5349f14.webp?v=1714705422","width":2000},{"alt":null,"id":23875450634339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ca93b5f3166f864eb840a4ab5bab5ce5f0b4811_f6a053e3-a173-4659-a583-9f27a60348b6.webp?v=1714705424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ca93b5f3166f864eb840a4ab5bab5ce5f0b4811_f6a053e3-a173-4659-a583-9f27a60348b6.webp?v=1714705424","width":2000},{"alt":null,"id":23875451551843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427","width":2000},{"alt":null,"id":23875452076131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8de26499db0937d3e1f3d93e79191a3ef4279bb_3218372c-d960-476e-b3a4-be8af4314f94.webp?v=1714705429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8de26499db0937d3e1f3d93e79191a3ef4279bb_3218372c-d960-476e-b3a4-be8af4314f94.webp?v=1714705429","width":2000},{"alt":null,"id":23875452534883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2cc55fc9be73792804af0f17aa60a64ba07049_88ff16c3-91c6-486b-ae11-542c7a34b4a9.webp?v=1714705432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab2cc55fc9be73792804af0f17aa60a64ba07049_88ff16c3-91c6-486b-ae11-542c7a34b4a9.webp?v=1714705432","width":2000},{"alt":null,"id":23875453059171,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba6e09aa838c15c877d95736b27d9000a75caff2_97e2f9ee-8a64-4a86-8745-ae2721c84ee2.webp?v=1714705434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba6e09aa838c15c877d95736b27d9000a75caff2_97e2f9ee-8a64-4a86-8745-ae2721c84ee2.webp?v=1714705434","width":2000},{"alt":null,"id":23875453616227,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51eb4c2c95361362d9bc2779391e4573af767ca2_0fd3b1be-c5f2-4d45-9b0b-d1ab7b25356d.webp?v=1714705437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51eb4c2c95361362d9bc2779391e4573af767ca2_0fd3b1be-c5f2-4d45-9b0b-d1ab7b25356d.webp?v=1714705437","width":2000},{"alt":null,"id":23875454304355,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d87f756e4162c70f012107eae957da51df9ea6c_3b43c3b4-0cf1-44d6-9bf6-24d3ca0f4960.webp?v=1714705439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d87f756e4162c70f012107eae957da51df9ea6c_3b43c3b4-0cf1-44d6-9bf6-24d3ca0f4960.webp?v=1714705439","width":2000},{"alt":null,"id":23875455156323,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4c11afaf8ea19748f2cb19add7d66c1a4bc474a_72db7a78-4095-4b7f-be74-1a5cbf04bcc8.webp?v=1714705441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4c11afaf8ea19748f2cb19add7d66c1a4bc474a_72db7a78-4095-4b7f-be74-1a5cbf04bcc8.webp?v=1714705441","width":2000},{"alt":null,"id":23875456106595,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccd7f1dac087f3404247a9a81f0f29f6df2b250f_e1303453-7591-41b4-b960-95a118ff4b7e.webp?v=1714705444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccd7f1dac087f3404247a9a81f0f29f6df2b250f_e1303453-7591-41b4-b960-95a118ff4b7e.webp?v=1714705444","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879705780323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-AF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470547697763,"product_id":7407857565795,"position":3,"created_at":"2024-05-03T11:03:47+08:00","updated_at":"2024-05-03T11:03:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427","variant_ids":[41879705780323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-AF04","featured_media":{"alt":null,"id":23875451551843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879705780323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-AF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470547697763,"product_id":7407857565795,"position":3,"created_at":"2024-05-03T11:03:47+08:00","updated_at":"2024-05-03T11:03:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427","variant_ids":[41879705780323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 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":"NPB0126124-AF04","featured_media":{"alt":null,"id":23875451551843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6721190b0968f0b5fbe60664e811d16c55427946_d84bf626-2447-4cee-be31-701d5fda643a.webp?v=1714705427"}},"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: "停產" }