Dear: Helper I try to insert data from mymodulenameValidationModuleFrontController extends ModuleFrontController class in validation.php. i want get some data to new table that i already created in mysql when my payment get way is complete but i can't insert anyone help me please?
this is my function
public function getOrderInfo($point_id){
$insertData = array(
'point_id' => $point_id,
);
if (!Db::getInstance()->insert(_DB_PREFIX_."order_info", $insertData)) echo "errors insert data";
exit();
}
I errors insert data all time.
A first error I see is that you use _DB_PREFIX_
in front of your table name. You should not put a prefix, Prestashop will add it for you later in insert()
method.
If there is still an error please, add the structure of your table in your question. Also add a var_dump
of your $insertData
array.