Site logo

Archived topic

woocommerce: add to cart in search results

6 replies · Started by Webmaster on June 23, 2017

Viewing posts 1–7 of 7

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?

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

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

Not sure what you mean?

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

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.

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.

This archived topic is closed to new replies.