What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

Solved

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

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
3856 717 1199

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
    }

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free

View solution in original post

Replies 3 (3)

made4Uo
Shopify Partner
3856 717 1199

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
    }

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
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
3856 717 1199

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

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free