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 2,061 to 2,080 of 2,247
11 Oct 2018, 8:37 PM
#2061
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

MultiSite Module Support Thread

I think I found your problem.
Check includes/configure.php, and see is this line ```php
include_once('includes/config_sites/sites_switch.php');

is in it. It should be just before (approx line 17)```php
define('HTTP_SERVER', 'https://YOUR_DOMAIN');

margecc:

Thank you for your reply! I had tried that already and it hadn't made any changes. I've added it again just to be sure I hadn't missed something and everything has stayed status quo. No categories are visible even though they are there and configured correctly. It can't seem to find my templates.

af-company.com/1.5.5f-trial

15 Oct 2018, 3:18 PM
#2062
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Design75:

I think I found your problem.
Check includes/configure.php, and see is this line ```php
include_once('includes/config_sites/sites_switch.php');

> is in it. It should be just before (approx line 17)```php
define('HTTP_SERVER', 'https://YOUR_DOMAIN');
// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
//EDIT FOR MULTI SITE
include_once('includes/config_sites/sites_switch.php');
//EOF EDIT
define('HTTP_SERVER', 'http://af-company.com');
define('HTTPS_SERVER', 'https://af-company.com');
// Use secure webserver for checkout procedure?  define('ENABLE_SSL', 'false');
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
//* DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

This is what I have already in my config file. www.af-company.com/1.5.5f-trial

I really appreciate you time in helping!

Thanks, Colleen
www.af-company.com
To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

15 Oct 2018, 4:01 PM
#2063
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: MultiSite Module Support Thread

margecc:

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
//EDIT FOR MULTI SITE
include_once('includes/config_sites/sites_switch.php');
//EOF EDIT
define('HTTP_SERVER', 'http://af-company.com');
define('HTTPS_SERVER', 'https://af-company.com');
// Use secure webserver for checkout procedure? define('ENABLE_SSL', 'false');
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
//* DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

> 
> This is what I have already in my config file.  [www.af-company.com/1.5.5f-trial](http://www.af-company.com/1.5.5f-trial)
> 
> I really appreciate you time in helping!

Colleen, I have set up a test store, and am experiencing the same category problem. The them shows fine.
Maybe it has something to do with newer PHP version. Which version of PHP are you running?
15 Oct 2018, 4:25 PM
#2064
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: MultiSite Module Support Thread

PHP Version: 5.6.17

Thanks, Colleen
www.af-company.com
To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

15 Oct 2018, 5:47 PM
#2067
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Design75:

Can you post the contents of a site_config file?

af-company.com_config.php

<?php
define('DIR_WS_CATALOG', '/1.5.5f-trial/');
define('DIR_WS_HTTPS_CATALOG', '/1.5.5f-trial/');
$template_dir = "custom";
define('SITE_NAME','usa');
define('HTTP_SERVER', 'https://af-company.com');
define('HTTPS_SERVER', 'https://af-company.com');
define('CATEGORIES_ROOT','0');
?>

Thanks, Colleen
www.af-company.com
To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

15 Oct 2018, 6:02 PM
#2068
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: MultiSite Module Support Thread

margecc:

af-company.com_config.php

<?php define('DIR_WS_CATALOG', '/1.5.5f-trial/'); define('DIR_WS_HTTPS_CATALOG', '/1.5.5f-trial/'); $template_dir = "custom"; define('SITE_NAME','usa'); define('HTTP_SERVER', 'https://af-company.com'); define('HTTPS_SERVER', 'https://af-company.com'); define('CATEGORIES_ROOT','0'); ?>
Maybe obvious, but are you using "usa" in the products description ? I discovered I was using the wrong name, and that was why nothing was shown
15 Oct 2018, 6:20 PM
#2069
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I have

<!--usa-->

in the categories description (i was going to send a pic but it wouldn't upload).

Thanks, Colleen
www.af-company.com
To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

5 Dec 2018, 4:58 AM
#2070
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Do The module compatible with zencart 1.5.5.f ?? anyone there who using it in 1.5.5.f?

5 Dec 2018, 6:55 AM
#2071
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: MultiSite Module Support Thread

diptimoy:

Do The module compatible with zencart 1.5.5.f ?? anyone there who using it in 1.5.5.f?

Yes. All changes are marked, so merging is not to difficult

5 Dec 2018, 6:58 AM
#2072
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Re: MultiSite Module Support Thread

what is the link of the latest updated one ?

30 Dec 2018, 6:46 PM
#2074
bramf avatar

bramf

New Zenner

Join Date:
Apr 2017
Location:
Netherlands
Posts:
20
Plugin Contributions:
0

Re: MultiSite Module Support Thread

i have a webshop in netherlands so sell on my .nl domain. now i also have a lot of german customers, so i want to start using my .de domain.
in .nl i want to show by default all in Dutch language and on .de i want to show all in German language. I do not want to restrict any categories or products and i also need to be able to use easy populate. I also hope it has positive impact on google.de (now most is only indexed properly in google.nl), so is it ok for SEO?
is this then the right module to use? I am on zen-cart 1.55e. thanks already for replies.

30 Dec 2018, 7:48 PM
#2075
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: MultiSite Module Support Thread

The multi site is prefect for you if that is all the requirements you have. If you need help in dutch, sen me a PM.

bramf:

i have a webshop in netherlands so sell on my .nl domain. now i also have a lot of german customers, so i want to start using my .de domain.
in .nl i want to show by default all in Dutch language and on .de i want to show all in German language. I do not want to restrict any categories or products and i also need to be able to use easy populate. I also hope it has positive impact on google.de (now most is only indexed properly in google.nl), so is it ok for SEO?
is this then the right module to use? I am on zen-cart 1.55e. thanks already for replies.

16 Apr 2019, 10:52 PM
#2076
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: MultiSite Module Support Thread

The MultiSite module looks like just what I need. I've tried to install it on 1.55f twice, once V1.0 downloaded from the Zen Cart site and once the master from the Git repository (downloaded 23 March 2019). I'm currently working with 1.0 since I assume that is the version supported here. As already suggested in this thread, all the changes are marked so it doesn't appear too difficult to install on 1.55f.

I have two templates, one for each site. Currently, each is a simple clone of the Responsive Classic template, unmodified except for the MultiSite module changes.
When I click on the category tree, the category expands and I can see the categories beneath it, which suggests I have configured the categories correctly for that site. However, the product listing page that appears to the right of the category tree shows no subcategories. If I click on a subcategory that contains products, the product listing simply says "There are no products to list in this category."

I would appreciate some pointers as to where to look to start debugging. Thanks.

17 Apr 2019, 6:24 AM
#2077
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: MultiSite Module Support Thread

BillJ:

The MultiSite module looks like just what I need. I've tried to install it on 1.55f twice, once V1.0 downloaded from the Zen Cart site and once the master from the Git repository (downloaded 23 March 2019). I'm currently working with 1.0 since I assume that is the version supported here. As already suggested in this thread, all the changes are marked so it doesn't appear too difficult to install on 1.55f.

I have two templates, one for each site. Currently, each is a simple clone of the Responsive Classic template, unmodified except for the MultiSite module changes.
When I click on the category tree, the category expands and I can see the categories beneath it, which suggests I have configured the categories correctly for that site. However, the product listing page that appears to the right of the category tree shows no subcategories. If I click on a subcategory that contains products, the product listing simply says "There are no products to list in this category."

I would appreciate some pointers as to where to look to start debugging. Thanks.

Can yo give a link to your site? If you don't want the link to be publicly known, send me a PM.

17 Apr 2019, 9:36 AM
#2078
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Thank you, Design75. I have sent the link by PM so you can see what I mean.

17 Apr 2019, 10:02 AM
#2079
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: MultiSite Module Support Thread

Thanks, I viewed the site, and it look like you have a partial white page, which means there is an error somewhere, that prevents the page from further loading.
Look in the logs folder for any mydebug files.
Paste the content of the latest file here on the forum (minus sensitive details), so I can help you further.

BillJ:

Thank you, Design75. I have sent the link by PM so you can see what I mean.

17 Apr 2019, 11:26 AM
#2080
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Thank you very much for that. I didn't think of that. Looking at the logs the problem is in includes/modules/<template>/category_row.php
Line 40 is throwing "Cannot use string offset as an array" and I think this is down to using PHP7.2 (which I forgot to mention at the start, sorry). The unmodified category_row.php runs fine so it is provoked indirectly by the MultiSite mod:

<?php
/**
 * index category_row.php
 *
 * Prepares the content for displaying a category's sub-category listing in grid format.  
 * Once the data is prepared, it calls the standard tpl_list_box_content template for display.
 *
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: category_row.php 4084 2006-08-06 23:59:36Z drbyte $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
$title = '';
$num_categories = $categories->RecordCount();

$row = 0;
$col = 0;
$list_box_contents = '';
if ($num_categories > 0) {
  if ($num_categories < MAX_DISPLAY_CATEGORIES_PER_ROW || MAX_DISPLAY_CATEGORIES_PER_ROW == 0) {
    $col_width = floor(100/$num_categories);
  } else {
    $col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW);
  }

  while (!$categories->EOF) {
    if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif';
    $cPath_new = zen_get_path($categories->fields['categories_id']);

    // strip out 0_ from top level cats
// bof multi site module
    $cPath_new = str_replace('='.CATEGORIES_ROOT.'_', '=', $cPath_new);
// eof multi site module
    //    $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);

    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
                                           'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');

    $col ++;
    if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
      $col = 0;
      $row ++;
    }
    $categories->MoveNext();
  }
}
?>

I got round that problem by replacing:

$list_box_contents = '';

with:

$list_box_contents = array();

Now the categories are showing up and no error is logged, although the formatting of the category rows is not quite as it appears in the nmodified responsive_classic template. However, when I click on a category containing products, the message is displayed "There are no products to list in this category." Also, one category contains only one product and clicking on that category usually goes directly to the product info. In this case, however, no info is shown and no error is logged.
There are still no error logs so I think I need to look through the code and see if I can find other PHP 7.2 "gotchas". Starting with product_listing.php.

I'll report back what I find. Thank you for your help.