Zen Cart Logo
Forums / Choosing Designers, Hosts, and Programmers / How do I set up a Training & Development Environment?

How do I set up a Training & Development Environment?

Views: 101

Results 1 to 10 of 10
24 Jul 2013, 11:51
#1
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

How do I set up a Training & Development Environment?

What do you do in order to have a development / training environment and not risking business data ?
Is there a batch script or something for cleaning the database and leave only few data ? ( customers , orders , products )

I ask because I need a clone production environment for a collaboration but I don't give access to entire context of business data .

24 Jul 2013, 21:38
#2
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: How do I set up a Training & Development Environment?

solo_400:

What do you do in order to have a development / training environment and not risking business data ?
Is there a batch script or something for cleaning the database and leave only few data ? ( customers , orders , products )

I ask because I need a clone production environment for a collaboration but I don't give access to entire context of business data .
Install vanilla Zen Cart with the sample DB, then just apply your mods/template to this dev store..

OR

Clone your store, wipe out the products and categories and manually add your own small sample of products and categories..

25 Jul 2013, 10:18
#3
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: How do I set up a Training & Development Environment?

I'would go with the second option , but how can I do with all customers and detail orders ? Let's say making an update is possible to hide customers details ( name , phone , email , address ) .

25 Jul 2013, 13:13
#4
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: How do I set up a Training & Development Environment?

solo_400:

I'would go with the second option , but how can I do with all customers and detail orders ? Let's say making an update is possible to hide customers details ( name , phone , email , address ) .

You're better off setting up vanilla Zen Install and then apply your mods to it (add-ons, templates, etc), then create your test products, categories, manufacturers, customers, and then create some test sales..

25 Jul 2013, 14:20
#5
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: How do I set up a Training & Development Environment?

Or you could just use phpmyadmin and delete whatever data you want. It would only take a minute to do it.

25 Jul 2013, 14:45
#6
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: How do I set up a Training & Development Environment?

lankeeyankee:

Or you could just use phpmyadmin and delete whatever data you want. It would only take a minute to do it.

Sure if he knows precisely what data to delete and from what tables.. It's a relational database.. So it's not JUST a matter of removing customers data rows from the customer table unless you consider any order data already tied to that customer.. This is why the admins don't recommend upgrading the database by carving out specific data..

Depending on the collaboration/testing he is doing, he only needs to create a little bit of test data.. It really doesn't take that much time to set up two or three categories, two or three manufacturers, and two or three products.. In fact he can create ONE test product and simply copy it multiple times.. Then it's simply a matter of editing the copied products to change the title, price or whatever else needs to be changed for his collaboration/testing.

then create a couple of test sales to add customers and sales data, and done and done..

This will give him an opportunity to setup the, test store, setup the test data AND test that the cloned store works in one pass..

25 Jul 2013, 16:12
#7
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: How do I set up a Training & Development Environment?

Collaboration is for training and development not for upgrades .

Re-installing ( and testing ) all modules + re-setting database with all configs. ( banners , layout , boxes .. etc.. ) is a pain , so I exclude it .
I would like to have a way to delete all orders and customers . Is there any batch - sql doing that , even for orders ?

Do we have a UML Diagram in order to see database tables relations?

25 Jul 2013, 16:29
#8
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: How do I set up a Training & Development Environment?

solo_400:

Collaboration is for training and development not for upgrades .

Re-installing ( and testing ) all modules + re-setting database with all configs. ( banners , layout , boxes .. etc.. ) is a pain , so I exclude it .
I would like to have a way to delete all orders and customers . Is there any batch - sql doing that , even for orders ?

Do we have a UML Diagram in order to see database tables relations?You can search the Wiki or FAQs to see if a DB diagram exists.. or search the web to see if a tool exists to help you with this task:

https://www.google.com/search?q=db+diagram+generator+mysql&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

You can TRY (if you are comfortable working with the DB), cloning your site, then truncating some of the tables (orders, products, categories, customers and related tables to name a few) to get your site down to barebones (no orders, customers, products, categories, manufacturers, etc) Then create a small cache of test data for your collaborative efforts..

27 Jul 2013, 11:19
#9
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: How do I set up a Training & Development Environment?

DivaVocals:

You can TRY (if you are comfortable working with the DB), cloning your site, then truncating some of the tables (orders, products, categories, customers and related tables to name a few) to get your site down to barebones (no orders, customers, products, categories, manufacturers, etc) Then create a small cache of test data for your collaborative efforts..

I'll go on this way . Working at ERD Diagram regarding orders and hope to pepare a procedure for deleting orders safely .
Do you know if zencart database tables have foreign keys ? Till' know I found only PK , but I need a confirmation .

27 Jul 2013, 18:49
#10
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: How do I set up a Training & Development Environment?

Regarding deleting old orders , I'll show up the steps I made for deleting all orders of 2009 .

  1. BACKUP ZENCART DATABASE

  2. Execute steps below using phpmyadmin after selecting zencart database .

CREATE TABLE DELETE_ORDERS_TMP
AS
SELECT *
FROM orders
WHERE date_purchased
BETWEEN '2009-01-01 00:00:00' AND '2009-12-31 23:59:59'

---- delete orders_total table

delete ot from orders_total ot
where
ot.orders_id in ( select dot.orders_id from DELETE_ORDERS_TMP dot
where dot.orders_id = ot.orders_id )

----- delete orders_status_history table

delete osh from orders_status_history osh
where
osh.orders_id in ( select dot.orders_id from DELETE_ORDERS_TMP dot
where dot.orders_id = osh.orders_id )

---- delete orders_products table

delete op from orders_products op
where
op.orders_id in ( select dot.orders_id from DELETE_ORDERS_TMP dot
where dot.orders_id = op.orders_id )

---- delete orders_products_attributes table

delete opa from orders_products_attributes opa
where
opa.orders_id in ( select dot.orders_id from DELETE_ORDERS_TMP dot
where dot.orders_id = opa.orders_id )

----- delete orders table

delete o FROM orders o
WHERE date_purchased
BETWEEN '2009-01-01 00:00:00' AND '2009-12-31 23:59:59'

----- Check if all OK .

DROP TABLE DELETE_ORDERS_TMP