Is there a quick way to reset a demo store to defaults?

General ShopSite user discussion

Is there a quick way to reset a demo store to defaults?

Postby jessi » Tue Apr 20, 2010 11:26 am

Hi, I teach ShopSite classes at the ISP I work for, which also sells ShopSite. We have a pool of demo stores on our servers that we use for our students. I am having a heck of a time trying to clean each demo out between students. In fact, I recently missed a student's email address lurking in the settings, and she got some unwanted email and had to complain to us so I could go track down and remove her address.

Is there any kind of shortcut or tool or anything to make my life easier, to clean out customizations/reset to defaults? I have root access to the servers the demos are on, if that helps.

Thanks a kazillion,

Jessi Hance
Cruzio Internet
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA

Postby loren_d_c » Tue Apr 20, 2010 12:26 pm

The per-store settings are all in the store's data directory, and in the [login_name].aa file in the 'ss' cgi directory. If you install the clean (remove the data directory and .aa file and re-install it) then immediately make backups of these items, then in the future when you want to 'reset' the store just delete the data directory and the [login_name].aa file and restore them from your backup. This will work as long as the ShopSite application is the same version. If you want to upgrade the stores to a newer version you will need a new set of 'empty' store data.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Postby jessi » Tue Apr 20, 2010 12:45 pm

Thank you so much, Loren! I will see about getting that set up. You are saving me a lot of grief.
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA

Postby jessi » Thu Apr 22, 2010 2:29 pm

Hi Loren, I got it to work!

After copying the .aa file, I had to edit it and do a search and replace on the values of these parameters:

datadir
mystore
outputurl
outputdir

After copying the data directory, I had to log in to the back office and regenerate the store.

After that, the demo was in my preferred state for assigning to a new student. I'm anticipating no jarring surprises next time I teach ShopSite!

Thanks so much for your help!
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA

Having problems

Postby jessi » Wed Jun 09, 2010 12:55 pm

I was so excited to get these demo resets working. Unfortunately, the demo stores I "reset" using this technique are now not working properly.

If I try to go to the Edit Product Info or Edit Page Info screens, then those screens will show the ShopSite menu, the page heading, and nothing else.

Undoubtedly there are other problems that I haven't found yet, too.

Any idea what I might have done wrong, or omitted doing?

Thanks,

Jessi
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA

It was just too easy

Postby jessi » Wed Jun 09, 2010 1:21 pm

I peeked and grepped inside a data directory and found numerous items referencing the particular demo store, including the auth key.

So it seems one can't just copy the data directory from one store to another, am I right?
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA

Postby jessi » Wed Jun 09, 2010 1:32 pm

Maybe the problem is that I did not start from a fresh install, but from a store I had been using. I am going to ask a helper to re-install at least one of our demos for me.
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA

Postby uae-designer » Sun Jun 13, 2010 12:06 am

Hi, I would just like to confirm how you did the 'reset'. Did you just delete the shopsite-data directory and the login.aa file and copied a fresh copy from the backup? When you do this, will shopsite still show you all the pages and products residing in the store directory? Thank you in advance...
uae-designer
 
Posts: 4
Joined: Tue Jun 08, 2010 11:39 pm
Location: UAE

Anybody, please help!!!

Postby uae-designer » Sun Jun 13, 2010 10:26 pm

Anybody, please help.. Is there a way to reset a store back to the way it was before an incident?!?
uae-designer
 
Posts: 4
Joined: Tue Jun 08, 2010 11:39 pm
Location: UAE

Postby Jim » Mon Jun 14, 2010 5:56 am

What was the incident? We need to know that to know what needs to be restored.

Do you, or your host, have a backup that was made shortly before the incident?

If so you might be able restore the needed files from the backup. If there were orders placed after the backup and before the incident you might be able to recover those orders by following the steps in this Kbase article. http://support.shopsite.com/KBase/questions/2251
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby jessi » Mon Jun 14, 2010 8:57 am

Hi uae-designer,

First, I was only working with demo stores that I use for teaching ShopSite, or I wouldn't have experimented this way...

First, on the demo that I use myself, I manually went through the back end and cleaned up as many customizations as I could. I then, on the server, made a special directory and copied the "data" folder from my own demo into it, as well as the [login_name].aa file from the 'ss' cgi directory - pretty much as Loren indicated. I removed the link to the [login_name].auth file from this special data folder, as each store already has their own.

I then would do the following for each of the demo stores for use of my students:

Copy the data folder from my special directory over the data directory for the demo store;
Copy the [login_name].aa file, and then edit the filename and the contents of the file to replace all occurrences of [login_name] with the one for that particular store;
Log in to each store that I am trying to reset, and go to Utilities > Publish > Regenerate.

I ran into a problem: There is store-specific info in the data directory, at least, there is if it's not a pristine, unused store that you get the data directory from. Usually, it's in the form of a URL related to the store URL.

So I am trying doing a mass search & replace of the URLs, using Perl; and also removing the wizard.aa file from within the data directory, as that only seems to be generated after one runs the wizard.

I think there are still problems; I can't seem to replace all the URLs or incidences of [login_name], maybe that's why. The PayPal config screen can't load, and I can't save changes to some other pages. If/when I figure the whole thing out, I will append to this post.

The problems might have been solved by doing a fresh ShopSite install to work from, but I can't ask our company engineer to spend his time on that (it's very time-consuming to do a fresh install), so I'm struggling along the best I can and will probably settle for partially-working demos to teach with.

I wish ShopSite had a big RESET button somewhere, but then of course, people would probably use it by accident!

Best of luck!

Jessi
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA

Working great now

Postby jessi » Mon Jul 19, 2010 4:16 pm

I just want to report that I started from a newly-installed store, and the results are stellar.

First, in each store that I'm resetting, I delete everything from the data directory EXCEPT the symlink to the auth file, the serial number file in the form ss####.ss, and storelink.dat.

Then I copy over everything from the pristine data directory.

Then I log in to the store I'm resetting, run through the wizard, and republish the store.

Voila, a nice fresh demo store!

:D :D :D
jessi
 
Posts: 16
Joined: Tue Oct 23, 2007 2:22 pm
Location: Santa Cruz, CA


Return to User Forum

Who is online

Users browsing this forum: No registered users and 30 guests