stanleyek18 Posted October 2, 2016 Share Posted October 2, 2016 (edited) Hello! I am trying to move custom field from old prestashop 1.6.0.9 to newest one but I am having some problems. While I'm editing product I need to have an opportunity to insert four custom values to databese. And everything works almost fine but one column throws an ugly failure: Unknown column 'calculator_type' in 'field list' Other columns are updated correctly. INSERT INTO `ps_product_shop` (`id_product`, `id_category_default`, `id_tax_rules_group`, `on_sale`, `online_only`, `ecotax`, `minimal_quantity`, `price`, `wholesale_price`, `unity`, `unit_price_ratio`, `additional_shipping_cost`, `customizable`, `text_fields`, `uploadable_files`, `active`, `redirect_type`, `id_product_redirected`, `available_for_order`, `available_date`, `condition`, `show_price`, `indexed`, `visibility`, `cache_default_attribute`, `advanced_stock_management`, `date_add`, `date_upd`, `pack_stock_type`, `calculator_on`, `calculator_type`, `quantity_box`, `quantity_metr`, `id_shop`) VALUES ('32', '2', '1', '0', '0', '0', '1', '344', '0', 'm2', '1.0117647058824', '0', '0', '0', '0', '1', '404', '0', '1', '0000-00-00', 'new', '1', '0', 'both', '0', '0', '2016-10-02 16:59:19', '2016-10-02 16:59:19', '3', '0', '0', '0', '0', '1') What am I doing wrong? I have edited product.php with this lines: Line 201 /** @var boolean calculator_on */ public $calculator_on = true; /** @var boolean quantity_box */ public $quantity_box = 0; /** @var boolean calculator_on */ public $quantity_metr = 0; public $calculator_type = 0; Line 328: 'calculator_on' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), 'calculator_type' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), 'quantity_box' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), 'quantity_metr' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), Where this problem is? Thanks for your time! Edited October 2, 2016 by stanleyek18 (see edit history) Link to comment Share on other sites More sharing options...
stanleyek18 Posted October 2, 2016 Author Share Posted October 2, 2016 (edited) Thanks for your help! I have made a mistake - it was about 'calculator_on' columm. The thing is that I need to update this database query. I don't know why other columns are doing good but there is a problem only with this one. Edited October 2, 2016 by stanleyek18 (see edit history) Link to comment Share on other sites More sharing options...
stanleyek18 Posted October 2, 2016 Author Share Posted October 2, 2016 I have added that fields by myself... Problem is that other fields works ok but not this one. I don't know why Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now