$product = {"id":7407922053219,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-線稿風格","handle":"iphone-14-plus-mod-nx-printable-pb53","description":null,"published_at":"2024-06-11T16:26:37+08:00","created_at":"2024-05-03T11:16:24+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41880560500835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB53","requires_shipping":true,"taxable":true,"featured_image":{"id":31470710358115,"product_id":7407922053219,"position":10,"created_at":"2024-05-03T11:16:46+08:00","updated_at":"2024-05-03T11:16:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206","variant_ids":[41880560500835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-線稿風格 - 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":"NPB0126124-PB53","featured_media":{"alt":null,"id":23875614408803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b977d5e0ab9f8b23c70aa1e00e6c05c75366e2f_3a3ec00a-5427-441e-b631-99b2ba12cd25.webp?v=1714706186","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0290903571c05ae9884ce92f3b3bbebf98ab4f4d_a4a5e30c-b747-4dcc-bbd2-82f0e0afc503.webp?v=1714706188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0271a87e5450889e1cf0a7cd412604da03dba69d_320df696-01bc-4e92-a1b1-984799685aa8.webp?v=1714706190","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0051b7c6f9bdf92f7c8c20b8d65246aa08e9af8_1b459bb4-68b9-43ed-831f-0217ba4c4003.webp?v=1714706193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66fbab34235dde67b583d95f41ecd6a1a3bdf75e_f2f06efa-e180-4a70-a143-b2e11c72b9c7.webp?v=1714706195","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60fdb88aa92645a1f2931805ecfeb9ef68c70d5_88ed8616-d4da-4b3a-a6e5-d964ff5d4e78.webp?v=1714706197","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0da0ab750654168541684365042bb11b32efed45_35a324c3-99a2-45e8-b110-3b0739500521.webp?v=1714706200","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed57930aeb9822bc7035bbaab4bfd18c6cb1c3d6_2f6524a7-1507-4f74-80af-79faea07f002.webp?v=1714706202","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a7abaa09fd64ddb1bc831c14a367ef548c7efc6_a1052bd7-afd8-426d-aac8-410455265478.webp?v=1714706204","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b977d5e0ab9f8b23c70aa1e00e6c05c75366e2f_3a3ec00a-5427-441e-b631-99b2ba12cd25.webp?v=1714706186","options":["color"],"media":[{"alt":null,"id":23875608477795,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b977d5e0ab9f8b23c70aa1e00e6c05c75366e2f_3a3ec00a-5427-441e-b631-99b2ba12cd25.webp?v=1714706186"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b977d5e0ab9f8b23c70aa1e00e6c05c75366e2f_3a3ec00a-5427-441e-b631-99b2ba12cd25.webp?v=1714706186","width":2000},{"alt":null,"id":23875608936547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0290903571c05ae9884ce92f3b3bbebf98ab4f4d_a4a5e30c-b747-4dcc-bbd2-82f0e0afc503.webp?v=1714706188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0290903571c05ae9884ce92f3b3bbebf98ab4f4d_a4a5e30c-b747-4dcc-bbd2-82f0e0afc503.webp?v=1714706188","width":2000},{"alt":null,"id":23875609428067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0271a87e5450889e1cf0a7cd412604da03dba69d_320df696-01bc-4e92-a1b1-984799685aa8.webp?v=1714706190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0271a87e5450889e1cf0a7cd412604da03dba69d_320df696-01bc-4e92-a1b1-984799685aa8.webp?v=1714706190","width":2000},{"alt":null,"id":23875609985123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0051b7c6f9bdf92f7c8c20b8d65246aa08e9af8_1b459bb4-68b9-43ed-831f-0217ba4c4003.webp?v=1714706193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0051b7c6f9bdf92f7c8c20b8d65246aa08e9af8_1b459bb4-68b9-43ed-831f-0217ba4c4003.webp?v=1714706193","width":2000},{"alt":null,"id":23875610345571,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66fbab34235dde67b583d95f41ecd6a1a3bdf75e_f2f06efa-e180-4a70-a143-b2e11c72b9c7.webp?v=1714706195"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66fbab34235dde67b583d95f41ecd6a1a3bdf75e_f2f06efa-e180-4a70-a143-b2e11c72b9c7.webp?v=1714706195","width":2000},{"alt":null,"id":23875610869859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60fdb88aa92645a1f2931805ecfeb9ef68c70d5_88ed8616-d4da-4b3a-a6e5-d964ff5d4e78.webp?v=1714706197"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c60fdb88aa92645a1f2931805ecfeb9ef68c70d5_88ed8616-d4da-4b3a-a6e5-d964ff5d4e78.webp?v=1714706197","width":2000},{"alt":null,"id":23875612999779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0da0ab750654168541684365042bb11b32efed45_35a324c3-99a2-45e8-b110-3b0739500521.webp?v=1714706200"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0da0ab750654168541684365042bb11b32efed45_35a324c3-99a2-45e8-b110-3b0739500521.webp?v=1714706200","width":2000},{"alt":null,"id":23875613556835,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed57930aeb9822bc7035bbaab4bfd18c6cb1c3d6_2f6524a7-1507-4f74-80af-79faea07f002.webp?v=1714706202"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed57930aeb9822bc7035bbaab4bfd18c6cb1c3d6_2f6524a7-1507-4f74-80af-79faea07f002.webp?v=1714706202","width":2000},{"alt":null,"id":23875613982819,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a7abaa09fd64ddb1bc831c14a367ef548c7efc6_a1052bd7-afd8-426d-aac8-410455265478.webp?v=1714706204"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a7abaa09fd64ddb1bc831c14a367ef548c7efc6_a1052bd7-afd8-426d-aac8-410455265478.webp?v=1714706204","width":2000},{"alt":null,"id":23875614408803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41880560500835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB53","requires_shipping":true,"taxable":true,"featured_image":{"id":31470710358115,"product_id":7407922053219,"position":10,"created_at":"2024-05-03T11:16:46+08:00","updated_at":"2024-05-03T11:16:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206","variant_ids":[41880560500835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-線稿風格 - 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":"NPB0126124-PB53","featured_media":{"alt":null,"id":23875614408803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880560500835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB53","requires_shipping":true,"taxable":true,"featured_image":{"id":31470710358115,"product_id":7407922053219,"position":10,"created_at":"2024-05-03T11:16:46+08:00","updated_at":"2024-05-03T11:16:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206","variant_ids":[41880560500835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-線稿風格 - 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":"NPB0126124-PB53","featured_media":{"alt":null,"id":23875614408803,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c599929937a8aa71a4bbebd034b80d235c6095_2adb5812-3318-4b69-92b0-334c77deefa4.webp?v=1714706206"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }