how to remove "buy it now" on brooklyn theme product page for sold out items

Solved
Tourist
11 0 0

Hello everyone, 

I am using brooklyn theme and im trying to figure out how to get "Dynamic Checkout Button" on Product Page to show "Buy it now" on products that have stocks and removing the button on products without stocks. 

 

basically, if item is sold out it should only show "sold out." right now it's showing both "sold out" and "buy it now" for me, unless i un-check "show dynamic checkout button".

Does anyone have had this problem before? please let me know how i could remove the "buy it now" even with the dynamic checkout button checked as i would like both "add to cart" and "buy it now". 

thanks!

0 Likes

Success.

Astronaut
1083 147 272

Easy fix. Go into your product-template.liquid in your sections folder and locate this piece of code:

 

buy_button.jpg

 

Just add the condition "and product.available":

{% if section.settings.enable_payment_button and product.available %}
   {{ form | payment_button }}
{% endif %}
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Tourist
11 0 0

It works! Thanks a lot, appreciate it. 

0 Likes