Hello,
i have currently an strange problem with TBY 3.1.8 in our project. We want to show an "Currently {specialprice} instead of {normalprice}".
If an {specialprice} is set, it is every time lower than the {normalprice}.
So the 'instead of'-Layer should only show if an {specialprice} exists, is greater than zero, but less than {normalprice}.
The template syntax:
<span class="prod_list_item_aprice">
[onload;block=span;when [blk_gal.sprice] -+ [blk_gal.price]]
[onload;block=span;when [blk_gal.sprice] +- 0.00]
instead of [blk_gal.price;noerr;frm='0.000,00'] €
</span>
|
The Block is correct merged and the value [sprice] is an double of 0.00.
[8] => Array
(
[id] => 32XXX
[art_link] => link.htm
[art_rlink] => /product_details.php?art=S0130XXXXX
[art_nr] => S0130XXXXX
[name] => Product 1
[price] => 9.00
[sprice] => 0.00
)
|
I've casted the variable as an double, as an integer and even as string and used string compare (!=).
But the 'instead of'-Layer shows every time. If I try to compare any math value the result is the same. It dosn't work correctly.
In an other project the same template syntax works like an charm.
So I don't get it. Why I coudn't compare an simple numerical value against zero or an other number.
The only thing I could think of going wrong, is the encoding of values, because we multibyte_encode every Array-Member - if an REGEX don't match an number - into utf-8.