Forums / Setting Up Categories, Products, Attributes / which admin change last price?

which admin change last price?

Views: 1,057

Results 1 to 7 of 7
12 Oct 2013, 4:47 PM
#1
crixus avatar

crixus

New Zenner

Join Date:
Oct 2013
Location:
United States
Posts:
88
Plugin Contributions:
0

which admin change last price?

I want to see who change last price. keep history for price change.. please somebody help me..

here is attachment.. for example..
Attachment 13168

12 Oct 2013, 6:42 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: which admin change last price?

You would need to create a new table, something like:
products_price_changes

and have fields in there, something like:
products_id int(11) NOT NULL auto_increment,
products_admin_id int(11) NOT NULL auto_increment,
products_date_updated datetime NOT NULL default '0001-01-01 00:00:00',
products_price_old decimal(15,4) NOT NULL default '0.0000',
products_price_new decimal(15,4) NOT NULL default '0.0000'

then decide if you also want to know about Attribute Price changes and if so, you would need a table for that as well ...

Then you could build a file for the Admin to run this information and give you something similar to what you have displayed ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Oct 2013, 7:40 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: which admin change last price?

... or you could use the built-in admin activity log (Admin Access Management->Admin Activity Logs). I changed the price of one of the Zen Cart demo products $299.99 to $399.99 and then viewed the activity log. It showed the page_accessed of product.php, with parameters of cPath=1_4&product_type=1&pID=1&action=update_product&page=1& and had this in the postdata field:

stdClass Object
(
[products_date_added] => 2003-11-03 12:32:17
[master_categories_id] => 4
[products_discount_type] => 0
[products_discount_type_from] => 0
[products_price_sorter] => 299.9900
[products_status] => 1
[products_date_available] =>
[manufacturers_id] => 1
[product_is_free] => 0
[product_is_call] => 0
[products_priced_by_attribute] => 0
[products_tax_class_id] => 1
[products_price] => 399.99
[products_price_gross] => 399.99
[products_virtual] => 0
[product_is_always_free_shipping] => 0
[products_qty_box_status] => 1
[products_quantity_order_min] => 1
[products_quantity_order_max] => 0
[products_quantity_order_units] => 1
[products_quantity_mixed] => 0
[products_quantity] => 30
[products_model] => MG200MMS
[products_previous_image] => matrox/mg200mms.gif
[img_dir] => matrox/
[image_delete] => 0
[overwrite] => 1
[products_image_manual] =>
[products_weight] => 23
[products_sort_order] => 0
[products_name] => stdClass Object
(
[1] => Matrox G200 MMS
)
...

You could write a script to interrogate this information directly or write another script to post-process the activity logs that you've maintained in .csv format.

13 Oct 2013, 8:37 AM
#4
crixus avatar

crixus

New Zenner

Join Date:
Oct 2013
Location:
United States
Posts:
88
Plugin Contributions:
0

Re: which admin change last price?

Thanx for your comment! But sir i am new on zen cart! don't know code very well. can you please tell me what whould your first step please sir.

13 Oct 2013, 10:38 AM
#5
crixus avatar

crixus

New Zenner

Join Date:
Oct 2013
Location:
United States
Posts:
88
Plugin Contributions:
0

Re: which admin change last price?

**mean what is my first step...to do that..

15 Oct 2013, 9:37 AM
#6
crixus avatar

crixus

New Zenner

Join Date:
Oct 2013
Location:
United States
Posts:
88
Plugin Contributions:
0

Re: which admin change last price?

where should i need to add this code???