您好,我想用 smarty 在 prestashop 的模板文件中分配一个变量。我怎样才能做到这一点?
到目前为止,我有以下代码:
{$db = DB::getInstance()}
{$id_lang = Context::getContext()->language->id}
{$sql = 'SELECT value FROM ps_feature_value_lang WHERE id_feature_value = 29 AND id_lang = $id_lang'} <- this is not working