Personalized checkout and custom promotions with Shopify Scripts
I feel embarrassed by asking this question but I can't seem to find a string filter that will convert to a float/decimal number. I know the to_i does a nice conversion to int--but I tried to_f, float, decimal, etc. with no luck. I've googled my brains out thinking it is such a basic function but have only found folks talking about converting a float to a string, not the other way around.
My Google-Fu has failed me. All help is appreciated!
Solved! Go to the solution
This is an accepted solution.
float_number = string_number | times: 1.0
My apologies. I meant using liquid--I know I could do it using javascript. Just looking for a cleaner approach. I have updated the title.
This is an accepted solution.
float_number = string_number | times: 1.0
Thanks! That works.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024