Forums / General Questions / Renamed Folder Problem

Renamed Folder Problem

Locked

Views: 1,472

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
16 Jan 2009, 12:55 PM
#1
j_xx avatar

j_xx

New Zenner

Join Date:
Dec 2008
Location:
Uk
Posts:
79
Plugin Contributions:
0

Renamed Folder Problem

Hi

I've been requested by my boss to change the name of the directory from /zen to /shop and simple as i thought i'd just rename it, but here's the problem. Fresh Install Screen. Is there any way I can alter a file so that zencart knows which directory its in.

Cheers
J#xx

16 Jan 2009, 1:00 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Renamed Folder Problem

You will need ONLY to make changes to the two configure.php files

includes/configure.php

and

admin/includes/configure.php

In these two files (same name but each is DIFFERENT from the other), you will see the path references to

/zen/

find all of them and change them to

/shop/

Make sure that the new directory on your server is called:

shop

configure.php files are usually fully write-protected (CHMOD 444) so before you edit them, you may need to change CHMOD to 655 or higher.

Use a PLAIN TEXT EDITOR to edit php files - such as Crimson Editor.

16 Jan 2009, 1:04 PM
#3
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Renamed Folder Problem

After you have edited the configure.php files, saved them and FTP'd them back to their respective folders on the server, you should run the:

fix_cache_key.php file

... available in the Free Software Addons section (link above)

Simply unzip this file and FTP it to your

/shop/

directory

Then run the file by typing this into a browser window:

www . mywebsite . com / shop / fix_cache_key.php

Remember to DELETE the file after you have re-set the cache.

16 Jan 2009, 1:29 PM
#4
j_xx avatar

j_xx

New Zenner

Join Date:
Dec 2008
Location:
Uk
Posts:
79
Plugin Contributions:
0

Re: Renamed Folder Problem

Thanks Fairestcape, saved my life :-) However I've lost my template and I can't get any templates to work. Do you know where they are and how do I get them back ?

Cheers
J#xx

16 Jan 2009, 1:38 PM
#5
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Renamed Folder Problem

What did Oscar Wilde say:

"To lose one parent is unfortunate. To lose BOTH parents is irresponsible!" (From The importance of being Ernest).

How did you LOSE your template?

All you had to do was change the name of the directory from /zen/ to /shop/ and edit the configure files...

What else did you do?

16 Jan 2009, 1:43 PM
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Renamed Folder Problem

In the configure.php files there's a section:

// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

Have you got this section intact? - particularly the last line:

define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

(NB: Yours will probably (ought to) show /shop/ in the top bits.)

16 Jan 2009, 2:37 PM
#7
j_xx avatar

j_xx

New Zenner

Join Date:
Dec 2008
Location:
Uk
Posts:
79
Plugin Contributions:
0

Re: Renamed Folder Problem

Yep, found the little blighter, all fixed, but one little detail has caught my eye, under the logo theres two links ( Home > Login ), is there a way to change the home link so it links to another website ?

Cheers
J#xx

16 Jan 2009, 3:59 PM
#8
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Renamed Folder Problem

Why would you want someone shopping on your site to go to another site? :blink:

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

17 Jan 2009, 8:37 AM
#9
j_xx avatar

j_xx

New Zenner

Join Date:
Dec 2008
Location:
Uk
Posts:
79
Plugin Contributions:
0

Re: Renamed Folder Problem

Hi, my boss wants to have Joomla "Will I get told off for that", to be the front end and zencart to run in the wrapper, i'm not sure how he's going to get the links in joomla to bring up the corresponding pages from zencart, but I guess thats another question altogether, but he does want me to remove the header and footer from zencart completely just leaving the main page section, any ideas !

Cheers
J#xx

17 Jan 2009, 4:51 PM
#10
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Renamed Folder Problem

To create a custom "home page" link in this header navigation bar, you could simply "hard code" the URL to your main site index page... in your case, the joomla index page.

I am assuming that currently, your JOOMLA site resides in the ROOT DIRECTORY, and the zencart shop resides in a SUB DIRECTORY.

Find this file, and FTP a COPY to your hard drive:

includes/templates/template_default/common/tpl_header.php

Find the navigation code section:

<!--bof-navigation display-->

<div id="navMainWrapper">

<div id="navMain">

    <ul class="back">

    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>

<?php if ($_SESSION['customer_id']) { ?>

    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>

    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>

<?php

      } else {

        if (STORE_STATUS == '0') {

?>

    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>

<?php } } ?>



<?php if ($_SESSION['cart']->count_contents() != 0) { ?>

    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>

    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>

<?php }?>

</ul>

</div>

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>

<br class="clearBoth" />

</div>

<!--eof-navigation display-->

Find the following line:

    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>

And COMMENT IT OUT, using HTML COMMENT TAGS (<!-- and -->)

<!--  begin edit999   <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> end edit 999 -->

Notice that I also put in begin edit999 and end edit999 inside the comment tags.

You don't have to do this, but it can be very useful later when you are looking for where you made changes. You can use the admin>>>tools>>>developer tool kit to search files for references to edit999 and that will quickly reveal the file where that edit reference number applied.

So, the 999 is a unique number I apply when I make edits to code. I keep a spreadsheet where I manually record my edit codes (from edit001 onwards) , the file they apply to and why I made the edit. I can then call up this spreadsheet to quickly see what edits I have made, where and why, right across my customised core files.

ANYWAY...

comment out that line as shown, then under it, put in your own hyperlink eg:

    <li><a href="http://www.YOURWEBSITEJOOMLAHOMEPAGE">Home</a></li>

SAVE the file on your hard drive, then FTP it to:

includes/templates/YOUR_CUSTOM_TEMPLATE/common/

NOTE: THIS DOES NOT CHANGE "HOME" LINKS ELSEWHERE (such as in breadcrumbs) - ONLY THE HOME LINK IN THE HEADER NAVIGATION.


To link from Joomla back to ZC, the "reverse" is true.

Links in joomla to the ZC shop will always be something like:

<a href="http://www.YOURWEBSITE.com/shop/index.php?main_page=xxxxxxxxxxx

where xxxxxxxxxxx is the resource you wish to link to - be it a category, a product, a page... whatever.

17 Jan 2009, 5:19 PM
#11
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town &amp; London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Renamed Folder Problem

As this change affects ONLY the header link, you may consider changing the name of the link...

Instead of:

<li><a href="http://www.YOURWEBSITEJOOMLAHOMEPAGE">Home</a></li>

consider:

<li><a href="http://www.YOURWEBSITEJOOMLAHOMEPAGE">Main Site</a></li>