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.
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024