我的问题:我需要在
admin\themes\default\template\controllers\products\informations.tpl:
http://darkplace.pl/wp-content/uploads/2013/02/1111111111.png
所以我将代码粘贴到:
\覆盖\类\Product.php
<?php
class Product extends ProductCore
{
public static function getEmployees()
{
return Db::getInstance()->executeS('
SELECT `id_employee`, `firstname`, `lastname`
FROM `'._DB_PREFIX_.'employee`
WHERE `active` = 1
ORDER BY `lastname` ASC
');
}
}
?>
&&
admin\themes\default\template\controllers\products\informations.tpl:
<select name="id_employee_forward" style="vertical-align: middle;">
<option value="-1">{l s='-- Choose --'}</option>
{foreach $employees as $employee}
<option value="{$employee.id_employee}"> {Tools::substr($employee.firstname, 0, 1)}. {$employee.lastname}</option>
{/foreach}
<option value="0">{l s='Someone else'}</option>
</select>
它不起作用我认为我需要在某处引入此代码。
$employees = Product::getEmployees();
但在我自己弄清楚之前,地狱会冻结。就这样。任务4最好。 请帮我 !