Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-30-2015 18:28:40

jj1987
Member
From: Orlando, FL
Registered: 07-14-2008
Posts: 502
Website

Add Created By/Modified By fields to the product table

Is there an easy way using session variables to add a field/column definition to the ecom_prod table to record which user last updated the row within that table as well as which user modified the row within that table last?



-James Garrett

Offline

 

#2 02-02-2015 10:23:30

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Add Created By/Modified By fields to the product table

Sure. Add the column using Raw DB Admin, then modify the updateprod() function in {private}/apps/ecom/ECOM_Prod/ECOM_Prod.php to save the variable $this->globals('core_user.id') to that field.


Nick Hendler

Offline

 

#3 02-03-2015 09:43:01

jj1987
Member
From: Orlando, FL
Registered: 07-14-2008
Posts: 502
Website

Re: Add Created By/Modified By fields to the product table

Gotcha. So there's no way to use session variables as default similar to how you do it with the email namespace stuff?



-James Garrett

Offline

 

#4 02-04-2015 08:19:32

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Add Created By/Modified By fields to the product table

You could mod CORE_DB directly to inject whatever you like in the sql_do() function.  Maybe look for a column named 'lastuseredit' and save the core_user.id variable value there.


Nick Hendler

Offline

 

Board footer