Disable Pay Now button on certain conditions

Highlighted
New Member
1 0 0

Hi all. I want to disable the "pay now" button for customers tagged "employee" if the total cart value is over $100, and display "cart total exceeds employee purchase allowance" .

 

How would I do this?

 

I know it's something along the lines of:

 

{% if customer.tags contains 'employee' %}

      {% if cart.total_weight > 10000  %}

                 1. add "disabled" to <button>

                 2. <p>cart total exceeds employee purchase allowance</p>

      {% endif %}

{% endif %}

 

I just don't know how to actually pull it off.

 

Any assistance greatly appreciated!

 

 

 

 

 

0 Likes