[Resolved] woocommerce: add to cart in search results

Home Forums Support [Resolved] woocommerce: add to cart in search results

Home Forums Support woocommerce: add to cart in search results

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #338017
    Webmaster

    How do I insert the “Add to cart” button inside the search results page?

    I copied file into /wp-content/themes/generatepress_child/search.php but it looks like it’s not the right one. May you please point me into the right direction on how to edit the loop or where I can find it?

    #338177
    Tom
    Lead Developer
    Lead Developer

    That would be the right template. What did you change in it?

    #481649
    pz

    I’m wondering is there a way to add “Add to cart” button to products on search results page but without using child theme e. g. using a snippet?

    For example here, the first item (“Jazda rowerem górskim (wydanie I)”) is shop product: https://bukrower.pl/?s=rower

    #481846
    Leo
    Staff
    Customer Support

    Not sure what you mean?

    If the Add to cart button is activated then it should show up in the navigation on every page.

    #481853
    pz

    Where do I activate “Add to cart” button? WooCommerce is active and button is visible on WC pages but as you can see in the link posted above it doesn’t show in the search results page. That’s why I asked how to show it there but without using child theme.

    #481905
    Webmaster

    My bad for big leaugin’ you @tom – I never replied with update.

    I ended up digging into the woocommerce addon and found something that I could borrow and made it work with the child theme file that was copied into subfolder.

    Thanks for the rapid response and GLHF.

    Hey @pz – it might be an educational idea to explore the woocommerce plugin and docs. I remember taking like 60 minutes outta my day and devoured alot of stuff that helped me get results. Maybe the included wc shortcodes will help you too.

    #481939
    Leo
    Staff
    Customer Support

    @pz: Here is GP’s Cart option: https://docs.generatepress.com/article/woocommerce-overview/#general

    If you need additional help. Please open a new topic.

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.