How do i remove the cents / round?
These modifications make the Free Shipping Goal simpler and easier to read.
Option 1:
This option removes the decimals if the amount is a round number.
For example: $100.00 would become $100
<script> if(document.getElementById('fsb_amount')) document.getElementById('fsb_amount').innerHTML = document.getElementById('fsb_amount').innerHTML.replace('.00', ''); </script>
Option 2:
This option removes the decimals even if the number is not a round number
For example: $100.14 would become $100
<script> if(document.getElementById('fsb_amount')) document.getElementById('fsb_amount').innerHTML = Math.round(document.getElementById('fsb_amount').innerHTML); </script>
Option 3:
This option removes the decimals by rounding up to the highest round number
For example: $100.35 would become $101
<script> if(document.getElementById('fsb_amount')) document.getElementById('fsb_amount').innerHTML = Math.ceil(document.getElementById('fsb_amount').innerHTML); </script>
This script can be placed into the Custom Code Configuration box, as seen below: