Home Forums WoodMart support forum Add Attributes to AJAX Live Search Results (Dropdown)

Add Attributes to AJAX Live Search Results (Dropdown)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #434758

    support-wordpress
    Participant

    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

    #434759

    support-wordpress
    Participant

    Additional information / screenshots of the search, how it looks like now and how it should look like.

    Attachments:
    You must be logged in to view attached files.
    #434832

    Luke Nielsen
    Keymaster

    Hello,

    Thank you for reaching out to us!

    Sorry to say but right now there is no option in Theme Settings available for that. It requires Customization and this is beyond our limitations and support policy scope. Hope you can understand our limitations.

    I’d be happy to assist if you have any other questions or concerns.

    Kind Regards

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)