How can I display a cart message based on theme settings in JSON?

I’m trying to display a message in the cart based on theme settings. This is all set up using schema.json. Everything is working except the cart price. Where it says 5000 I would like to use the theme setting “settings.bonus_entries_purchase”. But when saving it gives liquid errors.

{% if settings.bonus_entries_box == true and cart.total_price < 5000 %}
     
  

![1558892373.gif|240x240](upload://eFsGqceShNv8VpdZjZNfmKz9D5T.gif)

  ### GET {{settings.bonus_entries_amount}} BONUS ENTRIES!!
	

When you purchase ${{settings.bonus_entries_purchase | divided_by: 100}} or more. Entries are automatically added to your account.

    

Ends {{settings.bonus_entries_date}}.

 
    

  {%- endif -%}

And those errors are???

This is all set up using schema.json

Are you putting your code in that schema file?, or the cart template where it should be?

Schema is for a schema of deterministic properties in a JSON format exposed as settings it doesn’t not consume liquid logic.

It lets me save the file but in the browser says “Liquid error (sections/cart-template.liquid line 32): comparison of Integer with String failed”

Your going to have to try an isolate the problem.

Remove the suspect code does the error still appear? Then the error is elsewhere

If the error is still check that the related settings are using the number type:

https://shopify.dev/themes/architecture/settings/input-settings#number

If not you may need to coerce the strings to a number, topic discussed elsewhere on the forums.