Hi,
we use the AJAX Live Search in your theme and we’d like to ask if it is possible to add some more attributes to the search results (dropdown) for WooCommerce products? Is it possible to display:
Article description
Unit
Unit of measure
Base price per unit (from germanized pro)
“Add to cart” button
Like the same way you already do it with: SKU / Price, we found it in “woodmart/js/scripts/global/ajaxSearch.js”
if (suggestion.value) {
returnValue += ‘ <div class=”suggestion-content set-cont-mb-s reset-last-child”>’;
returnValue += ‘<h4 class=”wd-entities-title”>’ + suggestion.value
.replace(new RegExp(pattern, ‘gi’), ‘$1<\/strong>’)
.replace(/<(\/?strong)>/g, ‘<$1>’) + ‘</h4>’;
}
if (sku && suggestion.sku) {
returnValue += ‘ <p class=”suggestion-sku”>’ + suggestion.sku + ‘</p>’;
}
if (price && suggestion.price) {
returnValue += ‘ <p class=”price”>’ + suggestion.price + ‘</p>’;
}
Thanks and all best,
Kathrin