bestmate wrote: ↑Sun Jul 02, 2023 5:24 pm
how to remove the add to cart button from product listings pages(s)
except on the product_info.php page?
As in previous answer, this is a good case for using a template so make a copy as described in that answer.
Edit the copied file.
It is good to 'comment out' code instead of deleting it so comment out the code that displays the Buy Button.
The code for that is Lines 17-24 inclusive. (All references to line numbers are in an unchanged file).
It is PHP code so to comment out, add /* before Line 17 and add */ after Line 24.
Save the changes and the Buy Button disappears.
bestmate wrote: ↑Sun Jul 02, 2023 5:24 pmhow do I extend the view button to fill space after removing the add to cart part?
With the Buy Button gone, there is now a div element that is not required, that is the btn-group on Line 13 (remember referring to line numbers in an unchanged file).
To make the View Button full width, that needs to go, so comment that out.
It is HTML code so to comment out the opening of the div, add <!-- before Line 13 and add --> after Line 13.
The closing of the div on Line 26 must also be commented out so add <!-- before Line 26 and add --> after Line 26.
With that div now gone, the View Button can be made full width.
The code for the that button is on Line 15.
Add w-100 to the button class, so after btn-view, add a space and then w-100.
Save the changes and you will now see this:
Screenshot 2023-07-03 062357.png
If this has helped develop your store, buy me a beverage.
If you are unable to DIY, we can do it for you.