Jump to content

submit the values to the database from smarty file?


Recommended Posts

Hi,

I am doing a small module in Prestashop. In that module I have a form in the store frontend. So when a user submits all the details from the frontend and clicks on submit I want to store all the values to the database. So can someone kindly tell me how to store the values into the database from the smarty template?

Any help and suggestions will be really appreciable. Thanks

Link to comment
Share on other sites

your form and datas that you send with it are accessible from controller like they are accessible in simple php script

 

i mean you can use $_POST['variable'] - better format: tools::getValue('variable') 

 

where variable is a name of field from your form

for example

 

<input type="text" name="variable" />

Link to comment
Share on other sites

×
×
  • Create New...