Forums / All Other Contributions/Addons / MultiSite Module Support Thread

MultiSite Module Support Thread

Started by gerome on 23 Apr 2007, 10:24 AM · Views: 581,866

Results 301 to 320 of 2,247
20 Nov 2007, 5:54 AM
#301
jwidjaja avatar

jwidjaja

New Zenner

Join Date:
Nov 2007
Posts:
14
Plugin Contributions:
0

MultiSite Module Support Thread

It's retail store. Australian site is using AUD and American site is using USD, at later stage may be Chinese site, using Renimbi

22 Nov 2007, 5:13 AM
#302
kthompson avatar

kthompson

New Zenner

Join Date:
Jul 2007
Location:
Minneapolis, MN, United States
Posts:
71
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Does anyone know how or why or how to stop google from indexing products from my other sites. I have 2 sites one selling shoes and one selling electronics. Huge difference. Google is finding electronics on my shoe site even though there are no links. WHY?!?!?

Please Help. Open to any input whatsoever.

Also could use help on that search problem than many others are having. I can't have a search for "black" on the shoe site bring up black electronics.

Thanks

I dont care what it says next to my name. I've been Zenned!

24 Nov 2007, 9:00 PM
#303
alma avatar

alma

New Zenner

Join Date:
Jun 2006
Posts:
45
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Is anyone offering an install service for this module?

Thanks

25 Nov 2007, 12:01 AM
#304
kthompson avatar

kthompson

New Zenner

Join Date:
Jul 2007
Location:
Minneapolis, MN, United States
Posts:
71
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I can install it for you PM just me

I dont care what it says next to my name. I've been Zenned!

25 Nov 2007, 12:03 AM
#305
kthompson avatar

kthompson

New Zenner

Join Date:
Jul 2007
Location:
Minneapolis, MN, United States
Posts:
71
Plugin Contributions:
0

Re: MultiSite Module Support Thread

sorry for the bump I meant to say just PM me

I dont care what it says next to my name. I've been Zenned!

25 Nov 2007, 8:48 AM
#306
utomo avatar

utomo

New Zenner

Join Date:
Feb 2005
Posts:
19
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Lets Donate some money for the developments of this multisite module
the developer can be found
http://www.medea.co.uk/dev/

I will donate some money, if the developer Finish the beta and release the final version. including fixing the bugs on the latest betas.

I believe others will follow donating some money.

1 Dec 2007, 5:19 PM
#307
loop4ever avatar

loop4ever

New Zenner

Join Date:
Apr 2006
Posts:
18
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Hi everyone,

First of all, I would like to thank Gerome to come up this wonderful ideal which solved one of my major problem. I took his ideal and modified it to meet my own need. I have a primary site which can list all products. I also have bunch of sub sites (sub-domains). Here is a list of what my site can do:

  1. one db shared by all sites
  2. one copy of zen cart code
  3. each site can define not only its own payment modules but also shipping modules - this is one thing I am really happy about and hoping this ideal can be used in the future release of zen cart (if they want to support multi-sites)
  4. each site only display and sell its own products; the primary site only display all products and does not sell them - this is due to my site's business logic and can be changed.
  5. each site has its own template
  6. only one copy of image per product need to be stored

Thing I would like to have is to allow sub-site owners to access the admin for adding and modifying their own products, payment methods, and shipping methods.

The primary site is http://YOUDOMAINNAME.com which is redirected to http://YOUDOMAINNAME.com/primarystorename
The sub-site can be http://subsitename.YOUDOMAINNAME.com, http://www.subsitename.YOUDOMAINNAME.com, http://YOUDOMAINNAME.com/substename, or http://www.YOUDOMAINNAME.com/subsitename

If any one would like to know how I did this, I be glad to share my experience. I made the changes about three months ago and moved on my other tasks. I have just put my site on air today for alpha test. After taking so many from others, I feel I should put my two dimes on the table.

I am not including any codes here yet only because I don't know to post them. :O Should I just cut and paste them in this post. It looks messy.

PS. I am re-testing my payment and shipping flow now (I did it 3 months ago) and working on my wordings. Please let me know if you find anything wrong.

loop4ever

http://360square.com

**loop4ever

360square.com**
Display & Sell Your Artwork for Free
Buy Directly from Artists

1 Dec 2007, 6:38 PM
#308
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,455
Plugin Contributions:
4

Re: MultiSite Module Support Thread

Apparently I posted my question where I wasn't supposed. I'm not trying to break the rules of double posting, just post where my questions will be attended. Here is my other post: Subdomain Redirection

IDEASLady
IDEAS Creative Studio

Your image... our business!

1 Dec 2007, 9:57 PM
#309
loop4ever avatar

loop4ever

New Zenner

Join Date:
Apr 2006
Posts:
18
Plugin Contributions:
0

Re: MultiSite Module Support Thread

This is what I did:

Add a line in public_html/.htaccess

RedirectMatch temp ^/$ http://www.yourdomain.com/yoursubdomain/

There are other ways to redirect. This works for me.

loop4ever

**loop4ever

360square.com**
Display & Sell Your Artwork for Free
Buy Directly from Artists

2 Dec 2007, 1:51 AM
#310
zark avatar

zark

New Zenner

Join Date:
Sep 2007
Location:
Gold Coast, Oz
Posts:
14
Plugin Contributions:
0

Re: MultiSite Module Support Thread

loop4ever:

If any one would like to know how I did this, I be glad to share my experience.

Hi,
If you do a product search on one site, do products from the other sites show up in the search?

If not, can you advise what we need to change/where we need to apply the filter so that the search only returns the 'current' sites products.
Thanks

2 Dec 2007, 5:42 AM
#311
utomo avatar

utomo

New Zenner

Join Date:
Feb 2005
Posts:
19
Plugin Contributions:
0

Re: MultiSite Module Support Thread

if you made improvements on the script. can you please zip it and upload to your site, and then inform all of us the download url.

and also better if you can send it to [email protected].
so, next version will include this too.

otherwise if something changed it maybe need another modifications

Thanks

2 Dec 2007, 10:08 AM
#312
loop4ever avatar

loop4ever

New Zenner

Join Date:
Apr 2006
Posts:
18
Plugin Contributions:
0

Re: MultiSite Module Support Thread

zark:

Hi,
If you do a product search on one site, do products from the other sites show up in the search?

If not, can you advise what we need to change/where we need to apply the filter so that the search only returns the 'current' sites products.
Thanks
Sorry, I don't allow my sub-site to do search. It doesn't seem to be needed in my case. My sub-sites are very small (It is for each member artists). But I think you can apply cat_filter to the search sql to eliminate the products. Try to change line 439 to
$listing_sql = cat_filter($select_str . $from_str . $where_str . $order_str); in modules/pages/advanced_search_reault/header.php.

I re-wrote my cat_filter.php so I can filter the products based on the sitename. My filter will not be useful for any of you since I use my own product type, product_art, to do the job. I just don't want to go to each product's description to specify the critiria. Besides, it is not necessary in my case.

Good luck!

**loop4ever

360square.com**
Display & Sell Your Artwork for Free
Buy Directly from Artists

2 Dec 2007, 4:46 PM
#313
kthompson avatar

kthompson

New Zenner

Join Date:
Jul 2007
Location:
Minneapolis, MN, United States
Posts:
71
Plugin Contributions:
0

Re: MultiSite Module Support Thread

loop4ever,

thanks so much. I think I looked everywhere to put the cat filter except there

worked perfectly

I dont care what it says next to my name. I've been Zenned!

2 Dec 2007, 5:28 PM
#314
loop4ever avatar

loop4ever

New Zenner

Join Date:
Apr 2006
Posts:
18
Plugin Contributions:
0

Re: MultiSite Module Support Thread

utomo,

Here is the codes of my configuration. I don't know if my configuration will be suitable for others. If most people find that it is useful and workable to them, I can contact Gerome later to let him know my changes.

Re: Please refer to my previous post in case you don't know why I am including my codes here.

The primary site is http://YOUDOMAINNAME.com which is redirected to http://YOUDOMAINNAME.com/primarystorename
The sub-site can be http://subsitename.YOUDOMAINNAME.com, http://www.subsitename.YOUDOMAINNAME.com, http://YOUDOMAINNAME.com/substename, or http://www.YOUDOMAINNAME.com/subsitename.

One copy of zen-cart is installed under public_html/primarystorename.

The file structure is like:

public_html
   |__primarystorename
         |__admin
         |__includes
            |__configure.php (3)
      |__includes
         |__config_sites
            |__sites_switch.php (1)
            |__yoursubsitename.YOURDOMAINNAME.com_config.php (2)
         |__templates
            |__tpl_subsitename1  (template for subsitename1) 
            |__tpl_subsitename2  (template for subsitename2)
            |__tpl_subsitename3  (template for subsitename3)
         |__configure.php (4)
   |__subsitename1
      |__.htaccess (6)
   |__subsitename2
      |__.htaccess
   |__subsitename3
      |__.htaccess
   |__.htaccess (5)
```NOTE: I don't know too much about .htaccess. I may have done something wrong. They worked fine on my website.

The code for supporting different shippings and payments are not included yet.

-----------------------------
(1) code in my includes/config_sites/sites_switch.php:

/* Since I have set rules in .htaccess (included at the bottom of this page), my uri is guaranteed to have something like YOURDOMAINNAME.com/primarystorename or YOURDOMAINNAME.com/subsitename /
$site_name = explode('/', $SERVER['REQUEST_URI']);
if ($site_name[1] == '' || $site_name[1] == 'primarystorename') {
$template_dir = 'tpl_primarystorename';
if(file_exists("includes/config_sites/www.YOURDOMAINNAME.com_config.php")) {
include("includes/config_sites/www.YOURDOMAINNAME.com_config.php");
}
define('DIR_WS_CATALOG', '/primarystorename/');
define('DIR_WS_HTTPS_CATALOG', '/primarystorename/');
define('SITE_NAME', 'primarystorename');
} else {
$template_dir = 'tpl
' . $site_name[1]; /
set before 'include'; if you don't want to use the default template, you can overwrite it in yoursubsitename.YOURDOMAINNAME.com_config.php /
if(file_exists("includes/config_sites/$site_name[1].YOURDOMAINNAME.com_config.php")) {
include("includes/config_sites/$site_name[1].YOURDOMAINNAME.com_config.php");
}
/
define DIR_WS_CATALOG, DIR_WS_HTTPS_CATALOG and SITE_NAME after 'include'; If you don't want to use the default settings, you can overwrite tehm in yoursubsitename.YOURDOMAINNAME.com_config.php; If the file was not found, the default settings are used. /
define('DIR_WS_CATALOG', '/'. $site_name[1] . '/');
define('DIR_WS_HTTPS_CATALOG', '/' . $site_name[1] . '/');
define('SITE_NAME', $site_name[1]);
define('STORE_OWNER_EMAIL_ADDRESS', $site_name[1] . '@YOURDOMAINNAME.com'); /
optional /
define('CONTACT_US_LIST', STORE_OWNER . '<' . STORE_OWNER_EMAIL_ADDRESS .'>'); /
optional */
}

//The order for this site will be seen for ORDER_SITE from the admin section
define('ORDER_SITE', SITE_NAME);
(2) possible codes for each subsite - includes/config_sites/yoursubsitename.YOURDOMAINNAME.com_config.php; This file is optional. If you don't need to have different definitions, you don't have to have this file. The major definitions are done in the site_switch.php. If you want to have different db for each site, put your db settings here.

define('STORE_NAME','John Doe');                // used in tagline
define('STORE_OWNER','John Doe');
define('COLUMN_RIGHT_STATUS','1');
define('COLUMN_LEFT_STATUS','0');
define('COLUMN_WIDTH_LEFT', '200px');
define('BOX_WIDTH_LEFT','200px');
define('STORE_NAME_ADDRESS','<strong>'. STORE_OWNER . '</strong><br/>123 xyz Ave.<br/>New York, NY 12345<br/>');
(3.1) In admin/includes/configure.php, insert the following code at the beginning of the file

$site_name = explode('/', $_SERVER['REQUEST_URI']);
if ($site_name[1] == '' || $site_name[1] == 'primarystorename') {
define('DIR_WS_ADMIN', '/primarystorename/admin/');
define('DIR_WS_CATALOG', '/primarystorename/');
define('DIR_WS_HTTPS_ADMIN', '/primarystorename/admin/');
define('DIR_WS_HTTPS_CATALOG', '/primarystorename/');
define('SITE_NAME', 'primarystorename');
} else {
define('DIR_WS_ADMIN', '/'. $site_name[1] . '/admin/');
define('DIR_WS_CATALOG', '/'. $site_name[1] . '/');
define('DIR_WS_HTTPS_ADMIN', '/' . $site_name[1] . '/admin/');
define('DIR_WS_HTTPS_CATALOG', '/' . $site_name[1] . '/');
define('SITE_NAME', $site_name[1]);
}
unset($site_name);


define('DIR_FS_ADMIN', '/whatever/whatever/public_html/primarystorename/admin/');
define('DIR_FS_CATALOG', '/whatever/whatever/public_html/primarystorename/');

(4.1) In includes/configure.php, add the following code at the beginning of the file

include_once('includes/config_sites/sites_switch.php');


define('DIR_FS_CATALOG', '/whatever/whatever/public_html/primarystorename/');

(5) In publc_html/.htaccess, add the following code.

(5.1) # point "http://YOURDOMAINNAME.com/subsitename" to "http://YOURDOMAINNAME.com/subsitename/"

RewriteRule /subsitename$ /subsitename/ [R]

 

RedirectMatch temp ^/$ [URL]http://YOURDOMAINNAME.com/primarystorename/[/URL]
RedirectMatch temp ^www.YOURDOMAINNAME.com$ [URL]http://YOURDOMAINNAME.com/primarystorename/[/URL]

(6) In publc_html/subsitename/.htaccess, add the following code. These point sub-site (sub-domain) to the primary site. Only one copy of code is needed!

RewriteEngine on

RewriteCond %{HTTP_HOST} subsitename.YOURDOMAINNAME.com$ [OR]
RewriteCond %{HTTP_HOST} www.subsitename.YOURDOMAINNAME.com$
RewriteCond %{HTTP_HOST} !www.YOURDOMAINNAME.com$
RewriteRule /(.*)$ [URL]http://www.YOURDOMAINNAME.com/subsitename/[/URL] [L,R=301]

RewriteRule ^(.*)$ /primarystorename/$1 [L]


A text file is attached.

:cool:

**loop4ever

360square.com**
Display & Sell Your Artwork for Free
Buy Directly from Artists

2 Dec 2007, 11:16 PM
#315
zark avatar

zark

New Zenner

Join Date:
Sep 2007
Location:
Gold Coast, Oz
Posts:
14
Plugin Contributions:
0

Re: MultiSite Module Support Thread

loop4ever:

$listing_sql = cat_filter($select_str . $from_str . $where_str . $order_str); in modules/pages/advanced_search_reault/header.php.!

loop4ever: Thank you for that... not sure how I would have tracked that down.. site based search filter works correctly now. Cheers.

4 Dec 2007, 1:17 AM
#316
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,455
Plugin Contributions:
4

Re: MultiSite Module Support Thread

WOW! This module has eaten me alive. :blink:

Now at least I'm closer to the success but not quite since my categories aren't displaying at all. I did the category thing.

I get a bit lost because the shop is going to be on a subdirectory and not on main root, so things starts to get complicated when redirecting the subdomains.

Can someone take my hand and walk me through this? :unsure:

Also would love to know if someone have tried this module in the new 1.3.8 (or if someone knows about incompatibility). Since this is going to be a new install/new store for the customer I will like to use the version with all those bug fixes.

IDEASLady
IDEAS Creative Studio

Your image... our business!

4 Dec 2007, 1:56 AM
#317
illusionguy avatar

illusionguy

Zen Follower

Join Date:
May 2007
Posts:
136
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Hello guys I just installed a fresh install of zen and the multisite mod, it looks like just about everything is working other then when I add an item to my cart then go from one site to the other it’s not showing that I have any products in my cart.
What did I forget to do I don’t think I forgot to do anything, that’s what all newbie say lol.

4 Dec 2007, 5:36 AM
#318
utomo avatar

utomo

New Zenner

Join Date:
Feb 2005
Posts:
19
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I think we need to make 2 different situations. which we can choose:

  1. Multi shop, with individual managements. so each shop manage their won transactions.
  2. centralized shop. but each sub shop can submit the products, and price.
    and for number 2, the serach and also listing is centralized.
    maybe something like amazon.

and it is better we we can charge some comision to the transactions

5 Dec 2007, 2:20 AM
#320
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I'm adding multisite to an existing site but both sites are showing all products/categories in the sidebox. I read something about a problem when products are added using easy populate but I'm thought that stopped the products showing.

Any ideas?
M