democolis Posted July 13, 2015 Share Posted July 13, 2015 Hello, I am try to add an input in product page and save this value in my database of prestashop. I want to appear that value in my BO also in front end. I have made this files: product.tpl: <div> <input id="com" type="text" name="com" class="text form-control" placeholder="Custom Message:"/> </div> ProductController.php: public function getMessage() { if (Tools::getValue('com')) { $com = Tools::getValue('com'); $sql = "UPDATE `"._DB_PREFIX_."orders` SET com=".$com.""; Db::getInstance()->Execute($sql); $this->context->smarty->assign('com', $com); } } I make an order but in my db there is no value for 'com'. What i am doing wrong? Thanks Link to comment Share on other sites More sharing options...
musicmaster Posted July 13, 2015 Share Posted July 13, 2015 Do you really know what you are doing? The orders table doesn't have a field with the name "com". So you cannot change it either. 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