Connect ASP to Woocommerce Shop Page

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Connect ASP to Woocommerce Shop Page

This topic contains 13 replies, has 2 voices, and was last updated by Kolizo Kolizo 5 years, 10 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #18118
    Kolizo
    Kolizo
    Participant

    Hi,

    Please, how do I redirect ASP plugin to display only the woocommerce shop page result and not the single product page?

    Best,

    Kola.

    #18125
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Kola,

    If you refer to the return and magnifier button actions (redirection to the results page), then this should help you out: Documentation – Magnifier and Return button actions

    Best,
    Ernest Marcinko

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


    #18133
    Kolizo
    Kolizo
    Participant

    Hi Ernest,

    Thanks for your reply.
    I did try using the custom url “?s={phrase}&post_type=shop” but not redirected to the shop page.

    I’m still been redirected to the single page product when I search and click on a product. https://www.scipromar.com/product/acetone-2/

    So the idea is when a customer searches for a product on the home page or any page with ASP: https://www.scipromar.com/, It should take them to the SHOP PAGE showing the products been searched for in the product table format as shown on the shop page: https://www.scipromar.com/shop/
    You get?

    Thanks.

    Kola

    Attachments:
    You must be logged in to view attached files.
    #18145
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Kola,

    I understand what you need now, but unfortunately there is no option for that. Clicking on a result will redirect to the result as expected.

    This could be however possible using a specific configuration and a custom code:

    1. Make sure to change the configuration like this: https://i.imgur.com/aGsieEk.png
    2. Now, the custom code. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    3. Clear all layers of cache. Now clickin on a result should redirect to the shop results page.

    Best,
    Ernest Marcinko

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


    #18147
    Kolizo
    Kolizo
    Participant

    Hi Ernest,

    Thanks for your reply.
    I followed your instruction and also added the custom code. It seems to be working when I type the product name in the search box and press ENTER. However, when I search for a product, and the dropdown list comes up, when I click on the product in the dropdown list, it’s inactive and I’m not been redirected to any page which I think that’s what the code is doing right?
    Please, what setting do I need to change to redirect the dropdown list product result to the Shop page when I click on it?
    Please let me know if you need more clarification.

    Thanks again,

    Kola.

    #18148
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Kola,

    Sorry about that, there was a minor error in the code, I have corrected it via the back-end editor. If you clear the cache, then it should be all right now.

    For future reference, this is the corrected code:

    Best,
    Ernest Marcinko

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


    #18159
    Kolizo
    Kolizo
    Participant

    Hi Ernest,

    Thanks again. Now I can click on the dropdown list, and it takes me to the shop page.
    However, we still have one more last hurdle to cross, please. So when I click on a product such as “Acetone” in the dropdown list, it takes me to the Shop page but shows all the products instead of showing “Acetone” products alone.
    How do I resolve this?
    Thanks a lot.

    Best,

    Kola.

    #18166
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Kola,

    It is hard to tell, but make sure that the Product Variations are not selected to be returned under the General Options -> Sources panel, under the post types box.

    If not, then something else is changing the final results list or the query to add the variations to the results. My guess is the theme, if you have a custom WooCommerce theme, or possibly another WooCommerce search plugin, if you have any enabled.

    Best,
    Ernest Marcinko

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


    #18186
    Kolizo
    Kolizo
    Participant

    Hi Ernest,

    Trust you had a great weekend!
    I have checked the General option settings, and I only have the Product option selected, also checked my WooCommerce theme settings. However, the problem still persists.
    Please, help check the code one more time. I guess maybe I didn’t explain clearly the issue I was having which is the search returning ALL PRODUCTS and not just variations for the Product been searched for.
    I have attached a flow diagram for better clarity.

    Thanks!

    Kola.

    Attachments:
    You must be logged in to view attached files.
    #18193
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Kola,

    You are right, I was testing it incorrectly – there was still an error in the code, I have corrected it, now it should be okay. Please clear the cache, and let me know.

    For future reference, this is the corrected code:

    Best,
    Ernest Marcinko

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


    #18207
    Kolizo
    Kolizo
    Participant

    Hi Ernest,

    It’s working perfectly now.
    Thanks a lot for your quick response and support.

    Best,

    Kola

    #18208
    Kolizo
    Kolizo
    Participant
    You cannot access this content.
    #18209
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #18210
    Kolizo
    Kolizo
    Participant
    You cannot access this content.
Viewing 14 posts - 1 through 14 (of 14 total)

The topic ‘Connect ASP to Woocommerce Shop Page’ is closed to new replies.