Author Topic: Save a value in the Database? (from within the template)  (Read 784 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 491
Save a value in the Database? (from within the template)
« on: December 30, 2021, 08:24:02 am »
Hello,

Is it possible to save a value in the database, from a template?
Reason: I want to store some custom analytics data in a custom table, on every page load.

Thanks

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4664
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Save a value in the Database? (from within the template)
« Reply #1 on: December 30, 2021, 14:48:57 pm »
You can use a Joomla system plugin for this case
Check if you are in admin or not, if you only want Virtuemart pages ... and save in a table you create what you need(iP, URL, GET or POST parameters....)

EvanGR

  • Jr. Member
  • **
  • Posts: 491
Re: Save a value in the Database? (from within the template)
« Reply #2 on: December 31, 2021, 13:10:48 pm »
Based on your response, I managed to do it via the standard Joomla API. Thank you!