相对较新的PHP编码和使用Prestashop v1.6.0.14 我编辑了一些文件,为单个功能添加了多个值。
访问产品视图中的功能选项卡时,出现以下错误
解析错误:语法错误,意外T_CONSTANT_ENCAPSED_STRING, 期待T_FUNCTION 第6行的public_html / testshop / override / classes / FeatureValue.php
代码如下
<?php
class FeatureValue extends FeatureValueCore
{
'table' => 'feature_value',
'primary' => 'id_feature_value',
'multilang' => true,
'fields' => array(
'id_feature' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'custom' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'value' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 255),
),
);
}
提前致谢,对此有一场噩梦