Shopify 2.0 - Dawn Theme - Range Input Increment / Step Error

Solved
Roman-eComplete
Visitor
2 0 1

Edit: Oh dear, it appears I've posted this in the wrong section of the forum, I was sent here by Shopify Support. I am sorry.

Hi everyone, 
I seem to have come across an error when working with the range input increments / steps on the Dawn theme.

I've verified that the code works in increments of 2, 5 and other numeric values but it does not seem to work in increments of 1. I get an error that says,"Error: Invalid schema: setting with id="free_shipping_threshold" step invalid. Range settings must have at most 101 steps".
I have added a screenshot of it as well incase that helps.

In the documentation there is an example of some code that demonstrates steps / increments of 1 so it seems that it's very possible to do. I'm unsure of where I'm going wrong here or if it's a bug that is out of my control. Has anyone else encountered anything similar to this and if so, were you able to overcome it?

Below I've added some images and code related to this issue incase it helps illustrate the problem.

 

Reference documentation (https://shopify.dev/themes/architecture/settings/input-settings#range).

Screenshot 2022-06-06 at 17.25.28.png

 

Error that pops up when the increment is changed to the value of 1:

Screenshot 2022-06-06 at 17.58.32.png

 

Code snippet with the increment / step set to 1.

 

 

 

    {
      "type":"range",
      "id":"free_shipping_threshold",
      "label": "threshold for free shipping",
      "min":0,
      "max":200,
      "step":1,
      "unit":"$",
      "default":50
    }

 

 

 

 
Any help would be greatly appreciated.

Accepted Solution (1)
made4Uo
Shopify Partner
3785 710 1096

This is an accepted solution.

Hi @Roman-eComplete,

 

There is a minimum step you only do. I believe it is only around 100 as far as I remember, but try this code below. I change the max to 100. 

 

    {
      "type":"range",
      "id":"free_shipping_threshold",
      "label": "threshold for free shipping",
      "min":0,
      "max":100,
      "step":1,
      "unit":"$",
      "default":50
    }

 

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!

View solution in original post

Replies 3 (3)
made4Uo
Shopify Partner
3785 710 1096

This is an accepted solution.

Hi @Roman-eComplete,

 

There is a minimum step you only do. I believe it is only around 100 as far as I remember, but try this code below. I change the max to 100. 

 

    {
      "type":"range",
      "id":"free_shipping_threshold",
      "label": "threshold for free shipping",
      "min":0,
      "max":100,
      "step":1,
      "unit":"$",
      "default":50
    }

 

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!
Roman-eComplete
Visitor
2 0 1

This did not work when I made the change on my working branch but it seemed to work when I made a new branch and tried it so thank you for the help! I will accept this as the solution, thank you again! 🙂

made4Uo
Shopify Partner
3785 710 1096

If you need to update the block, especially with range, you have to remove the block first from the theme editor. This will unlink the block from the code and once you add it again, the updates should show.

 

And you can also add a new link block, and delete the previous one

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!