this scripts shows how to add more data into the autocomplete bar
<script>
var __isp_options = __isp_options || {};
__isp_options.isp_dropdown_with_product_attributes= '1';
__isp_options.isp_dropdown_callback = function(li_element, item_data) {
var product_id = li_element.attr('isp_v_id');
if (!item_data.id || item_data.category || !item_data.product_url) {
return li_element;
}
var vendors = getProductVendor(item_data);
if (vendors.length > 0){
li_element.find(".as_magento_price").after(`<span class="as_magento_vendor">${vendors[0]}</span>`);
}
}
function getProductVendor(product) {
const vendors = product.att.find(x => x[0] === "Vendor");
return vendors ? vendors[1] : [];
}
</script>