Loading

additional sites - how to?

4 posts / 0 new
Last post
Offline
Joined: 08/17/2011
additional sites - how to?

dear, thank you for this great software, i'm coming back after many months... but always great.
I have to set many site as:

- MAIN_STORE
|
- site 1
| user only for site 1
| product only for site 1
| media only for site 1
|
- site 2
| user only for site 2
| product only for site 2
| media only for site 2

+ i have created a new folder colled "site1" in localhost/axis/
+ copied a skin folder from axis in localhost/axis/site1/
+ opened a new site in admin/administrate/site

but then.... ?
how can i manage ll the other things like different user, different media, and fiddefernt categories...
thank you in advance.
irwin

Offline
Joined: 10/12/2010

Multisite functionality needs to be imrpoved, especially the handling of the media images.

Also you need to copy the next files:
app/etc/config.php and change the system/path option
index.php and change the AXIS_ROOT to include parent folder instead of current site2.

1. Users are not share the account between sites out from the box.

2. Navigate to the admin/catalog/product, there you'll see the two sites with different root categories and products.

3. For now it's not possible to upload the images to the separate sites during adding the products.
All images are uploaded to the main store.
You can copy the media folder (with already uploaded images) from axis1 to the axis2, and it should work fine.

Offline
Joined: 08/17/2011

thank you for your reply, but i'm not so lucky... what i means? i try to explain you so:

for config.php -> changed path in:

'path'          => 'C:\xampp\htdocs\axis\guest',
...

for Index.php -> changed in:

# define('AXIS_ROOT', realpath(dirname(__FILE__).'/') .'guest/');
...

where guest is my second site and added the simbol '../' in library and app code:

set_include_path(
    realpath('../library')  . PATH_SEPARATOR
    . realpath('../app/code') . PATH_SEPARATOR
    . get_include_path()
);


@include_once '../Axis/Application.php';
if (!class_exists('Zend_Application')) {
    echo 'Please, copy Zend Framework to the "library" folder: '
        . realpath('../library');
    exit();
}

1. User... (i can't go inside login or register page.)
2. Navigate to the admin... it's ok admin side work perfect with categories, product and all other things.
3. Upload images.. it's ok

but my problem is this:
when i go to my second site localhost/axis/guest a 404 error page appear. Seem there aren't any pages inside my site and i have one product... there is the default theme but not the content :(

What i forgot?
thenk you..

Offline
Joined: 10/12/2010

I have done the working second site as follows:

  1. Files and folders, that should be copied to the guest folder:
    index.php
    min.php
    etc/config.php
    .htaccess
    skin/front
    js/axis/account
    js/axis/catalog
    js/axis/checkout
    js/axis/community
    js/axis/core
    js/jquery
  2. Changes for the index.php. Replace the lines 27-43 with following:
    define('AXIS_ROOT', realpath(dirname(dirname(__FILE__))));

    if (!file_exists('../app/etc/config.php')) {
        if (!headers_sent()) {
            $host  = $_SERVER['HTTP_HOST'];
            $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
            $extra = 'install';
            header("Location: http://$host$uri/$extra/");
        }
        exit();
    }

    set_include_path(
        realpath('../library')  . PATH_SEPARATOR
        . realpath('../app/code') . PATH_SEPARATOR
        . get_include_path()
    );
  3. min.php. Replace the line 10 with:
    define('AXIS_ROOT', realpath(dirname(dirname(__FILE__))));
  4. .htaccess file. Uncomment the RewriteBase directive (~line7):
        RewriteBase /guest/
  5. etc/config.php. Change the system->path config to new correct path (C:\xampp\htdocs\axis\guest)

Now the site should works fine. But the images is a problem. When you'll navigate to the guest site the images will be takes from the first site, resized and saved to the cache of first site. But the links will seek the files on the second site.

You can use the symlink for the media folder of the second site to fix this issue.

If you can't use the symlink you'll need to copy the media folder to the second site with the resized images.