in PDF manager I was using a regex_replace to remove the currency symbol (which varies) and check for non-zero shipping costs to print/not print some terms.
{if $fields.annual_shipping_cost_c|regex_replace:"/^./":"" gt 0} print this {/if}
After the upgrade to PHP 8.0.30 this no longer works and always returns true even when the value is $0.00 or empty.
What is the correct way to check for a non zero currency value in smarty?
All the suggestions I am finding online explicitly remove a "$" (or other individual currency symbol) but the currency can be one of four or five different ones and I would much rather have a cleaner solution that checking for each of the allowed currencies.
When tested
{$fields.annual_shipping_cost_c|regex_replace:"/^./":""}
or
{$fields.annual_shipping_cost_c|regex_replace:"/^[^\d]/":""}
Prints a
Thanks,
Francesca