I am using a Woocommerce website with Astra theme. I am displaying Products with the help of shop module in Astra theme. Currently Astra shop module doesn’t display the ‘add to cart button’.
If I leave the price field blank, the add to cart, quantity field and price don’t show up.
I will like the ‘add to cart button’ to show irrespective of the price.
2
Answers
I simply added the price to 0.00001, which will set the price to 0.00 and the 'add to cart button' will be added automatically. This is a good workaround for people who aren't good with code editing.
To achive this you need to customize code inside your child theme. for shop page find the template file
edit this file and add below code to check if the price of the product exists and then displays it with the ‘price’ class.
add below hook to insert add to cart button in theme’s function.php
After this "Add to cart" will be displayed on the shop page regardless of either the price is filled in or not.