我已经为制造商覆盖了代码,以便在控制器和类中拥有额外的字段,还创建了数据库列,并且所有信息都被毫无问题地存储,当我试图将信息拉回来时,问题就出现了。我添加了 4 个变量,但我只能从中提取 2 个 /** @var string Region */ public $laregion;
/** @var string address */
public $ladireccion;
/** @var string website */
public $website;
/** @var string Is from quebec? */
public $quebec;
我在那里定义变量并将数组设置如下:
public static $definition = array(
'table' => 'manufacturer',
'primary' => 'id_manufacturer',
'multilang' => true,
'fields' => array(
'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64),
'website' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl', 'required' => true, 'size' => 64),
'quebec' => array('type' => self::TYPE_BOOL),
'active' => array('type' => self::TYPE_BOOL),
'date_add' => array('type' => self::TYPE_DATE),
'date_upd' => array('type' => self::TYPE_DATE),
// Lang fields
'laregion' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255),
'ladireccion' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255),
'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'),
'short_description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'),
'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128),
'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName'),
),
);
但是当我想从 laregion 或 ladireccion 获取信息时,我什至没有在调试中得到任何信息,但其他 2 是..
>value = Array (1)
0 => Array (12)
id_manufacturer => "5"
name => "test test"
date_add => "2014-04-16 15:20:04"
date_upd => "2014-04-16 16:19:36"
active => "1"
website => "website.com"
quebec => "0"
description => "<p>test french</p>"
short_description => "<p>test french</p>"
nb_products => "0"
link_rewrite => 0
image => "fr-default"
->nocache = false
您可以看到网站和魁北克存在,但没有多语言元素,有人知道为什么会发生这种情况?
谢谢