Zen Cart Logo
Forums / Installing on a Windows Server / Trouble Moving Cart to Root Folder

Trouble Moving Cart to Root Folder

Views: 3,648

Results 1 to 16 of 16
23 Sep 2012, 5:48 PM
#1
anysigns avatar

anysigns

New Zenner

Join Date:
Sep 2012
Posts:
31
Plugin Contributions:
0

Trouble Moving Cart to Root Folder

Hi all,

I installed ZenCart via GoDaddy to a sub-folder (vinyl-stickers), and now that it is ready, want to move it to the root folder.

I've Googled around and already read and followed this guide.

I've copied the cart to root, but the links from the main page point to the old sub-folder. Removing the sub-folder from the server results in broken links. If I remove the sub-folder from the URL, the page is there, but all the links still point to the sub-folder.

I've removed vinyl-stickers from the Session Directory in the admin panel. I've removed 'vinyl-stickers/' from the following lines n 'includes/configure.php':
DIR_WS_CATALOG
DIR_WS_HTTPS_CATALOG
DIR_FS_CATALOG
DIR_FS_SQL_CACHE

In admin/includes/configure.php' however, I was unable to change the lines, because I don't know what to do to them:

  
define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');

I did, however change the following lines to remove 'vinyl-stickers'

define('DIR_FS_SQL_CACHE', '/home/content/80/5493880/html/vinyl-stickers/cache');
define('DIR_FS_CATALOG', '/home/content/80/5493880/html/vinyl-stickers/');
define('DIR_WS_HTTPS_CATALOG', '/vinyl-stickers/');

it now looks like this:

define('DIR_FS_SQL_CACHE', '/home/content/80/5493880/html/cache');
define('DIR_FS_CATALOG', '/home/content/80/5493880/html/');
define('DIR_WS_HTTPS_CATALOG', '/');

The website is http://www.anysigns.ca if you want to take a look for yourself.

Thanks in advance,
Alex

23 Sep 2012, 5:55 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Trouble Moving Cart to Root Folder

I'm going to guess your changes to includes/configure.php didn't 'take'. Did you set the permissions of that file to writable before you uploaded the edited copy ?

23 Sep 2012, 5:56 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trouble Moving Cart to Root Folder

  1. The renaming is very simple. Just remove/rename all references to the old foldername.

  2. The instructions were originally written for v1.3.9. But since v1.5.0 they are even simpler. No need to touch those lines that you said looked confusing. ie: leave these alone: DIR_WS_ADMIN, DIR_WS_HTTPS_ADMIN,DIR_FS_ADMIN
    The instructions have been updated.

  3. You won't be able to upload your changes to the server successfully if you don't first make the file (on the server) writable. You said it's not working since you made the changes, but your symptoms demonstrate that your changes didn't actually get copied to your server successfully. That's mentioned in the same article.

24 Sep 2012, 12:46 PM
#4
anysigns avatar

anysigns

New Zenner

Join Date:
Sep 2012
Posts:
31
Plugin Contributions:
0

Re: Trouble Moving Cart to Root Folder

That fixed my problem. Thank you for such a quick reply. :)

24 Sep 2012, 12:57 PM
#5
anysigns avatar

anysigns

New Zenner

Join Date:
Sep 2012
Posts:
31
Plugin Contributions:
0

Re: Trouble Moving Cart to Root Folder

Actually, the everything points to the right link except the contact page, which still points to the old sub-folder:S what may be the cause of that?

24 Sep 2012, 2:23 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Trouble Moving Cart to Root Folder

Since the standard Classic template doesn't include that link, yours has been hard-coded in your template to point to the old URL. Use the Admin - Tools - Developers Tool Kit to search for vinyl-stickers.

26 Sep 2012, 5:53 AM
#7
webgear_aus avatar

webgear_aus

New Zenner

Join Date:
Mar 2011
Posts:
13
Plugin Contributions:
0

Re: Trouble Moving Cart to Root Folder

I am using v1.50 and everything was ok while developing the cart.
Now I want to move from a sub-folder (Example: mydomain.com/zencart) to a sub-domain (Example: shop.mydomain.com)

I understand the cache location needs to be updated under admin. and this was done.

I know that at least 4 items (maybe 6?) need to be changed in both includes/configure.php and admin/includes/configure.php files but I can't seem to get the coding right.

This is an example the original.

*define('HTTP_SERVER', 'http://www.mydomain.com');
define('HTTPS_SERVER', 'https://www.mydomain.com');

define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_CATALOG', '/zencart/');
define('DIR_FS_CATALOG', '/path1/path2/path3/mydomain.com/zencart/');
define('DIR_FS_SQL_CACHE', '/path1/path2/path3/mydomain/zencart/cache');*

I would appreciate a cut and paste version of the correct code to suit the new sub-domain location of shop.mydomain.com.

Thanks in advance for the kind assistance of anyone (:smartalec:)that can help...

26 Sep 2012, 9:34 AM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Trouble Moving Cart to Root Folder

Simply a matter of removing zencart/ wherever it appears.

26 Sep 2012, 11:44 AM
#9
webgear_aus avatar

webgear_aus

New Zenner

Join Date:
Mar 2011
Posts:
13
Plugin Contributions:
0

Re: Trouble Moving Cart to Root Folder

Thanks for your reply, but unfortunately that didn't work.

26 Sep 2012, 1:00 PM
#10
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Trouble Moving Cart to Root Folder

Has to work, really, but what happens after you make those changes ? A link to the site might let us spot something.

26 Sep 2012, 1:15 PM
#11
webgear_aus avatar

webgear_aus

New Zenner

Join Date:
Mar 2011
Posts:
13
Plugin Contributions:
0

Re: Trouble Moving Cart to Root Folder

Thanks for your prompt responses and help.
I found another resource which gave me a clue on how to solve this.
I made a fresh installation, saved the two new configure files, then deleted the installation.
I copied the relevant parts of the new config files containing the correct paths to the old config files.

For reference here are the updated paths (maybe this will help solve this for someone else in the future);

*define('HTTP_SERVER', 'http://www.shop.mydomain.com');
define('HTTPS_SERVER', 'https://www.shop.mydomain.com');
define('HTTP_CATALOG_SERVER', 'http://www.shop.mydomain.com');
define('HTTPS_CATALOG_SERVER', 'https://www.shop.mydomain.com');

define('DIR_WS_CATALOG', '//');
define('DIR_WS_HTTPS_CATALOG', '//');

define('DIR_FS_CATALOG', '/path1/path2/path3/shop/');
define('DIR_FS_SQL_CACHE', '/path1/path2/path3/shop/cache');
*

This now works :) except for one minor unknown issue...
I had a new admin theme set up but the admin section has somehow reverted back to the original zencart admin theme, even though all the files are the original ones in the new location.

Anyway, I'll figure it our or re-instal the admin theme.

Thanks again for your help.

26 Sep 2012, 2:01 PM
#12
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Trouble Moving Cart to Root Folder

webgear_aus:

define('DIR_WS_CATALOG', '//');
define('DIR_WS_HTTPS_CATALOG', '//');
*

Part of your problem is the double // (in red) remove one so it looks like this

define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
*

26 Sep 2012, 2:29 PM
#13
webgear_aus avatar

webgear_aus

New Zenner

Join Date:
Mar 2011
Posts:
13
Plugin Contributions:
0

Re: Trouble Moving Cart to Root Folder

Thanks for your assistance.
Actually it works with both // (this was the correct coding taken from the config file of the new install)
Case is closed.
The posted code in thread #11 works :)

27 Oct 2012, 10:04 PM
#14
anysigns avatar

anysigns

New Zenner

Join Date:
Sep 2012
Posts:
31
Plugin Contributions:
0

Re: Trouble Moving Cart to Root Folder

stevesh:

Since the standard Classic template doesn't include that link, yours has been hard-coded in your template to point to the old URL. Use the Admin - Tools - Developers Tool Kit to search for vinyl-stickers.

Thanks! That fixed the issue I was having. Looks like I'm all set. Thank you very much.

28 Oct 2012, 6:55 PM
#15
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,809
Plugin Contributions:
15

Re: Trouble Moving Cart to Root Folder

webgear_aus:

Thanks for your assistance.
Actually it works with both // (this was the correct coding taken from the config file of the new install)
Case is closed.
The posted code in thread #11 works :)

The case is NOT closed as // is NOT a standard designation and may ruin SE results. You need to find out why it needs // to work and fix it.

29 Oct 2012, 4:03 AM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Trouble Moving Cart to Root Folder

webgear_aus:

Actually it works with both // (this was the correct coding taken from the config file of the new install)
Case is closed.
The posted code in thread #11 works :)

Sorry, but case not closed.

The double slashes // are incorrect, and although 99.9% of the time this will not cause any problems or issues, it is the other .1% you need to worry about.

Is it worth arguing the point when reverting back to a single slash will mitigate the issue(s) that will otherwise be very difficult to debug?

We are urging you to do this for **our ** sanity, else you'll be back here in the not so distant future asking why some customers are reporting random 'page not found' errors, but by that time, this thread will be long forgotten about and we will probably end up asking you all sorts of unrelated questions before we finally work our way back to this cause.

We won't be impressed.

Cheers
Rod