I am migrating an old code from 4.2 to 5.4. My index.php is triggering the error: undefined constant CURRENCY_BEFORE assumed 'CURRENCY_BEFORE
from this line:
<select name="curreny_position">
<option value="BEFORE"
<?php if ($curr_pos['value'] == CURRENCY_BEFORE) echo "selected"; ?>>
Before
</option>
<option value="AFTER" <?php if ($curr_pos['value'] == CURRENCY_AFTER) echo "selected"; ?>>After
</option>
I am not sure if this would help, but this is the callout in my settings.php file:
{
$currency_position = self::param('site', 'curr_position')['value'];
$currency = self::param('site', 'currency')['value'];
switch ($currency_position) {
case CURRENCY_BEFORE:
return implode(' ', [$currency, number_format($amount, 2)]);
break;
case CURRENCY_AFTER:
return implode(' ', [number_format($amount, 2), $currency]);
break;
}
what would be the proper way to define CURRENCY_BEFORE above?