Skip to content

Moving LiteCommerce subdirectory to the Drupal directory

beatnbite edited this page Apr 24, 2012 · 7 revisions

Who is affected

  • merchants installed the E-Commerce CMS package
  • merchants installed LiteCommerce into a the directory with the "lc_connector" module for Drupal

Problem

In the E-Commerce CMS package the LiteCommerce directory resides in a subdirectory inside the directory of "lc_connector" Drupal module. So, when upgrading "lc_connector" module to a newer version Drupal drops the entire folder including all LiteCommerce files.

Solution

Move the LiteCommerce installation directory out of the module subdirectory before upgrading "lc_connector" module in your Drupal.

Instructions

Note: [drupal] in the instructions means the full path to the directory where Drupal is installed.

  1. Copy the "litecommerce" directory from "[drupal]/modules/lc_connector/" to "[drupal]". You can do it by executing the following commands in a Linux terminal on your server:

     cd [drupal]
     cp -R modules/lc_connector/litecommerce .
    
  2. Find the "litecommerce/etc/config.php" file. Edit the "web_dir" setting from the "[host_details]" section in the file as follows:

     [host_details]
     http_host = "[your-host]"         ; keep this unchanged
     https_host = "[your-host]"        ; keep this unchanged
     web_dir = "[drupal]/litecommerce" ; change this from "[drupal]/modules/lc_connector/litecommerce"
    
  3. Clear the LiteCommerce classes cache. The command for the Linux terminal is

     rm -rf [drupal]/litecommerce/var/run
    
  4. Re-build the LiteCommerce classes cache by opening the shop back-end page in your browser (http://[your-drupal-url]/litecommerce/admin.php). Wait until it completes the process.

  5. Get into the Drupal back-end and on the page at http://[your-drupal-URL]/?q=admin/modules/lc_connector , change the setting from "./modules/lc_connector/litecommerce" to just "./litecommerce" and save the changes.

  6. Now you can upgrade "lc_connector" module from the Drupal back-end

Clone this wiki locally