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,865

Results 2,241 to 2,247 of 2,247
16 Jun 2025, 7:09 AM
#2241
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

MultiSite Module Support Thread

ideasgirl:

Hello, I've been using this module since version 1.0 and I'm doing an update from 1.5.5 to 2.1

The logs will show an error unless I change the line 29 of admin/multisite.php

from this:

while($multisite_cat_desc[0]=="\n") {

> 
> to this:
> ```php
while (!empty($multisite_cat_desc) && $multisite_cat_desc[0] == "\n") {

Also, when assigning categories on the MultiSite Tool, I have a ">->-" before the name of the site assigned. In the previous version, those symbols didn't appear there. Is there a way to get rid of them?

I figured out the >->- issue I think.

In YOUR_ADMIN/multsite.php, around line 224

change -

$multisite_cat_sites[]=substr($multisite_comment,4,strlen($multisite_comment)-4); //remove html comment

to this -

$multisite_cat_sites[]=substr($multisite_comment,4,strlen($multisite_comment)-5); //remove html comment

this wont clean up the mess, but should prevent it happening further.

16 Jun 2025, 3:10 PM
#2242
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
415
Plugin Contributions:
6

Re: MultiSite Module Support Thread

royaldave:

I figured out the >->- issue I think.

In YOUR_ADMIN/multsite.php, around line 224

change -

$multisite_cat_sites[]=substr($multisite_comment,4,strlen($multisite_comment)-4); //remove html comment

to this -

$multisite_cat_sites[]=substr($multisite_comment,4,strlen($multisite_comment)-5); //remove html comment

this wont clean up the mess, but should prevent it happening further.

This code is weird...
substr($variable,4); does exactly the same as substr($variable,4,strlen($variable)-4);
And same with this:
substr($variable,4,-1); does exactly the same as substr($variable,4,strlen($variable)-5);

Perhaps you can do what you want (which I am not sure what is it) with this: substr($multisite_comment,4,-4);

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

25 Jun 2025, 2:44 AM
#2243
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Version 1.5 of this plugin now available.

https://www.zen-cart.com/downloads.php?do=file&id=378

Changes required for this plugin, ie zencart 2.0 v 2.1, are minimal compared to previous updates, but nonetheless here it is for your convenience - plus I've rolled in some other tweaks mentioned in the preceding thread.

-Merged files to work with Zen Cart 2.1.0. If you are intending to install to an earlier version of Zen Cart don't use this - it won't work.
-Updated language files to new format.
-Made changes to check that when a product url is visited that the product actually belongs to that particular shop - previously it was possible to fudge the product id in the url and visit items you shouldn't be able to.
-Fixed a bug in the Admin tool.

27 Jun 2025, 2:05 PM
#2244
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I love the idea of managing multi sites from one website, but am not sure if it will accomplish specifically what I need. I have one distributor website with a cost price. I also have about 4-5 other websites with the same exact products, but they function independently with their own price mark-up, contact information, logo, etc.... I am wondering if this plugin will allow me to update products on the distributor site where it will automatically update the products on the other sites with their own mark-up, contact, etc. as mentioned above. Will this plugin work for this purpose? Anyone using it this way? I have been going through this support forum but cannot determine the correct answer to my question. Thanks.

29 Jun 2025, 11:07 AM
#2245
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: MultiSite Module Support Thread

chuckrey:

I love the idea of managing multi sites from one website, but am not sure if it will accomplish specifically what I need. I have one distributor website with a cost price. I also have about 4-5 other websites with the same exact products, but they function independently with their own price mark-up, contact information, logo, etc.... I am wondering if this plugin will allow me to update products on the distributor site where it will automatically update the products on the other sites with their own mark-up, contact, etc. as mentioned above. Will this plugin work for this purpose? Anyone using it this way? I have been going through this support forum but cannot determine the correct answer to my question. Thanks.

Basically, no.

It could get you some of the way there though. For example you could set up your distributor site first, then copy these products to the categories in your other sites and then apply the markup. But if a product needs an update then you'll need to update the distributor one again, replace the version on your other sites, reapply the markup etc.

In terms of logo/contact information etc then no problem as you can have a different template/language files for each site.

Anyway you know best if this is better than your current arrangement.

30 Jun 2025, 4:42 PM
#2246
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: MultiSite Module Support Thread

royaldave:

Basically, no.

It could get you some of the way there though. For example you could set up your distributor site first, then copy these products to the categories in your other sites and then apply the markup. But if a product needs an update then you'll need to update the distributor one again, replace the version on your other sites, reapply the markup etc.

In terms of logo/contact information etc then no problem as you can have a different template/language files for each site.

Anyway you know best if this is better than your current arrangement.

Thanks very much for your response. It sounds like it will get me closer to what I am currently doing. My primary concern is having products update on the "secondary sites automatically" after the primary (distributor) site is updated. If it does that alone, that is the bulk of my work. I will give it a shot and see how it works out. Thanks again.:smile:

29 Dec 2025, 9:13 AM
#2247
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: MultiSite Module Support Thread

I found a bug in the index filters - it probably doesn't affect most of you so you only really need to apply if you think its relevant. And this is only relevant if your version of zen cart is from when the index_filters directory came into existence.

One example would be if you're using the whats_new sidebox - the sidebox itself will work initially but if you click [more] it will then not filter out products from your other sites.

To each of these files in includes/index_filters/

default_filter.php
music_genre_filter.php
record_company_filter.php

find the section that looks like -

$listing_sql .= ' ' . $where_str . ' ' . $order_by;



// optional Product List Filter

and change it to -

$listing_sql .= ' ' . $where_str . ' ' . $order_by;
//bof: multisite
$listing_sql = cat_filter($listing_sql);
//eof: multisite

// optional Product List Filter