Jump to content

Back office form to allow webmaster to create database rows in custom pss_table.


pmaojo

Recommended Posts

don´t have any clue on how to make it with smarty and in prestashop context

 

I have:

 

- Table in DB
- I managed to show the DB table on myaccount.tpl for each user (table is a tracking of services offered)

 

I need a starting point.

Link to comment
Share on other sites

you can't deal with database in smarty .tpl files

you can do it only in php files.

 

you can do it twice. with object model, or manually with sql query.

example of query below:

Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'myTable` (name,value) VALUES ('This is name','This is value'));

you can run this query in your .php file

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...