Replace description with SKU/Variation Description or?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Replace description with SKU/Variation Description or?

This topic contains 4 replies, has 2 voices, and was last updated by

 
Keymaster
5 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8944

    Participant

    Hi,
    I just purchased the plugin and am testing it and all the configurations for my woocommerce site.

    First, questions, is there a way to include the SKU in place of the description in the search results?

    The main reason for this is that I have variations turned on or included in the list so the same title shows up 5 times without any indication that it’s different. So I was hoping to display either the SKU or the variation description (or even both).

    The other option and question 2 is there a way to search variation as well but only display the parent product ones?

    I’ve included the screenshot to show you what I’m talking about.

    Thanks for the great plugin!
    -Chase

    #8945

    Participant

    sorry the page reloaded and lost the attachment.

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

    Hi Chase,

    Thanks for your kind words!

    It is possible to display the SKU instead of the description.

    On the Advanced Options -> Content panel, there is an option called Advanced Description Field, which allows you to enter custom fields alongside with the product description: https://i.imgur.com/WLrnYYe.png
    Basically, in your case I would use this value there:

    {_sku} - {descriptionfield}

    This should result: ProductSKU – Product description

    Or if you simply only need the sku, then use only:

    {_sku}

    I hope this helps your case!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #8968

    Participant

    Thanks for catching and fixing my typo in my email. That’s a great feature and makes it easy to display what every I want, I like that.

    The second part to this is that I need to search Variations, but is there a way to search variations but only display the parent product or if the variation is listed to not display the parent of that variation? I’m just curious if there is a way to do this so I can test it.

    Right now the confusing thing is that the parent product is listed as well as the variations but you can’t actually purchase the parent.

    thanks in advance!

    #8995

    Hi again!

    There is no option to do that, unfortunately product variations are stored as separate post objects, however I might have found a possible solution for you.

    After some experimenting I was able to come up with this code:

    You can put this code to the functions.php file in your active theme directory. It locates product variations from the reuslts and collect their product IDs. Then removes the parents from the list if it’s present – so only variations are left.

    This is the closest I could get, I hope it’s something you needed.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.