0

Relatively new to PHP coding and using Prestashop v1.6.0.14 I have edited some files to add multiple values to a single feature.

When accessing the features tab in the product view, i have the following error

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_FUNCTION in public_html/testshop/override/classes/FeatureValue.php on line 6

The code is as follows

<?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),
    ),
);
}

Thanks in advance, having a nightmare with this

Steve Lillis
  • 3,263
  • 5
  • 22
  • 41
ducksoup
  • 29
  • 1
  • 4
  • PHP v5.2.17 and line 6 is 'table' => 'feature_value', – ducksoup May 29 '15 at 10:14
  • 1
    What is this? You're using array notation without an array. This is basically wrong but I have no clear idea what you are trying to do. –  May 29 '15 at 10:14
  • I am trying to access the features tab for products in prestashop and when i click the tab that is the error i am given. Nothing displays but that error with debugging turned on – ducksoup May 29 '15 at 10:16
  • Please start reading some "getting started guide" for php programming. your codes syntax does not make any sense. A class is not an array, yet you use array notation withing the class declaration. That cannot work. – arkascha May 29 '15 at 10:19
  • Thanks for the advice. This is not my code, I haven't edited this file I just wanted advice on how to get rid of the error – ducksoup May 29 '15 at 10:23

0 Answers0