Smarty 2 テンプレートに変数を割り当てました。
{assign var="real_count" value="{$store_summary|@count}"}
{$real_count = settype ($real_count, 'integer')}
私の目標は、 の値に 65% を追加することです$real_count
。私が扱っているデータ$real_count
では 3 があるので、計算値は 4.95 (3 + 1.95) になるはずです。
math
タグ を使用しようとしていますが、明らかに何かが欠けています。
{math equation="x * y" x=$real_count y=0.65 format="%.2f"}