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
Re: MultiSite Module Support Thread
Quote:
Originally Posted by
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!
Re: MultiSite Module Support Thread
loop4ever,
thanks so much. I think I looked everywhere to put the cat filter except there
worked perfectly
1 Attachment(s)
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:
Code:
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:
Code:
/* 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.
Code:
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
Code:
$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);
(3.2) Change the definition of DIR_FS_ADMIN & DIR_FS_CATALOG
Code:
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
Code:
include_once('includes/config_sites/sites_switch.php');
(4.1) Change the definition of DIR_FS_CATALOG
Code:
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/"
Code:
RewriteRule /subsitename$ /subsitename/ [R]
(5.1) # redirect http://YOURDOMAINNAME.com or http://www.YOURDOMAINNAME.com to http://YOURDOMAINNAME.com/primarystorename/; There might be better way to do this. If so, please let me know.
------------------------------
(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!
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} subsitename.YOURDOMAINNAME.com$ [OR]
RewriteCond %{HTTP_HOST} www.subsitename.YOURDOMAINNAME.com$
RewriteCond %{HTTP_HOST} !www.YOURDOMAINNAME.com$
RewriteRule /(.*)$ http://www.YOURDOMAINNAME.com/subsitename/ [L,R=301]
RewriteRule ^(.*)$ /primarystorename/$1 [L]
-------------------------------
A text file is attached.
:cool:
Re: MultiSite Module Support Thread
Quote:
Originally Posted by
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.
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.
Re: MultiSite Module Support Thread
[FONT=Calibri]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.[/FONT]
[FONT=Calibri]What did I forget to do I don’t think I forgot to do anything, that’s what all newbie say lol.[/FONT]
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
Re: MultiSite Module Support Thread
In response to my last question would this be a problem with my subdomains or with my mod setup has anyone had this problem of the baskets not being cross store supported.
http://www.loyalteefit.com
http://mens.loyalteefit.com
http://womens.loyalteefit.com
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