Change checkout button text for customer with specific tag.

I’ve been looking but can’t find my answer.

Here is my code. Using this code I can get the checkout button on the /cart page to show “Checkout test” for VIP customers and the standard “Checkout” for everyone else. (even though it looks reversed to me, it works !!??).

{% if customer.tags != 'VIP'  %}
						
                    	
                    	        
                    
                    {% else %}
           				
                    	
                    	        
                    
					{%- endif -%}

What I want to do is to have a translation specifically for the VIP customers, so it says “Quote Request” as these customers do not have a payment gateway (that bits all working fine). How do I add a custom translation or apply inline “Quote Request” text to:

{{ 'cart.general.checkout' | t }}

All help appreciated.

Hi @JustinW1

Hope you’re having a great day!

You should use contains operator. contains checks for the presence of a substring in a string.

So:

{% if customer.tags contains "VIP"  %}
	
	
	
{% else %}
  
  
          
{%- endif -%}

If you found this comment useful, hit the ‘Like’ and ‘Accepted solution’ buttons.

Thanks @Morek super helpful for the identification.

Do you know how I can tackle the second part, and change the button text for these customers?