Page 19 of 224 FirstFirst ... 917181920212969119 ... LastLast
Results 181 to 190 of 2237
  1. #181
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by Gerome View Post
    Hi Jvoce,

    You still need to add that at the begining of your 'configure.php':
    PHP Code:
    include_once('includes/config_sites/sites_switch.php'); 
    I can't believe I missed something that obvious. Many thanks!

  2. #182
    Join Date
    Oct 2004
    Posts
    50
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by Gerome View Post
    This is strange, this page work well for me.

    Could you check your file:
    includes/modules/pages/products_new/header_php.php

    Line 34 should be:
    PHP Code:
    $products_new_split = new splitPageResults(cat_filter($products_new_query_raw), MAX_DISPLAY_PRODUCTS_NEW); 
    Gerome you are right on clean zencart installation all working fine.
    I have a heavy modified version of zencart . I have merged all my addons again and find the bug that caused the problem with the new product listing.

    Thanks!!

  3. #183
    Join Date
    Oct 2004
    Posts
    50
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    Tip:

    If you want a different index welcome page in each site you can do something like this.

    File:includes/config_sites/sites_switch.php

    after

    $default_server_name = $_SERVER['HTTP_HOST'];

    add
    PHP Code:
        $default_server_name1 'www.site1.yoursite.com';
        
    $default_server_name2 'www.site2.yoursite.com';
        
    $default_server_name3 'www.site3.yoursite.com'
    File:includes/modules/pages/index/header_php.php

    Line 42

    from
    PHP Code:
     $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_MAIN_PAGE'false'); 
    to

    PHP Code:
    if($_SERVER['HTTP_HOST'] == $default_server_name1 ){
     
    $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_PAGE_1'false');
     }elseif(
    $_SERVER['HTTP_HOST'] == $default_server_name2 ){
     
    $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_PAGE_2'false');
     }elseif(
    $_SERVER['HTTP_HOST'] == $default_server_name3 ){
     
    $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_PAGE_3'false');
     }else{
     
    $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_MAIN_PAGE'false');
     } 
    You can edit then the page_1,page_2,page_3 from admin define pages editor.

    Or you can specific other pages there from ez pages tool.

  4. #184
    Join Date
    Jul 2007
    Location
    Stockholm, Sweden and Palermo, Italy
    Posts
    6
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by Gerome View Post
    Magnus,
    Thank you so much for you for your post !! This is of a great help.
    I guess I should add that to the documentation of the module right ?
    Hi Gerome,
    I'm happy you liked my "MultiSite Module for Dummies" contribution. Here is another section for your documentation:

    Consider how you will handle http 404 Not Found errors

    As a good webmaster, you are never the source of a "page-not-found" error. You regularly use a link checker to verify that the linking structure of your web site is intact. You verify your web server log for 404 errors coming from external links pointing to non-existent pages on your site.

    When the URL for a page needs to be corrected, you redirect requests for the old or incorrect location to the new location of the page. On the rare occasion when you just remove a page, you insert a "Page removed" page for human visitors that also gives a 410 "Gone" status to search engine spiders.

    For good webmasters, "page-not-found" errors can only occur because someone typed in an incorrect URL into the address bar of their browser. Many sites intercept such errors using a 404 script. If your .htaccess file contains
    Code:
    ErrorDocument 404 /http404.php
    the http404.php script will be executed for each request for a non-existent page.

    Since you're now using the MultiSite module, you once again need to know what domain you're in so that you show the right "not-found" page. Here is an example of a http404.php script that handles the situation differently depending on the site:
    Code:
    // http 404 not found error handler for multisite installations.
    // The http 404 status is already set here.
    // Just call the right page for the current site.
    
    switch($_SERVER['HTTP_HOST']) {
      case 'site1.com':
        require('http://site1.com/zencart/index.php?main_page=page_not_found');
        break;
      case 'site2.com':
        require('http://site2.com/en/pages/not-found/');
        break;
      case 'site3.com':
        require('http://site3.com/page-not-found.php');
        break;
    }
    
    // Make sure that code below does not get executed when we redirect.
    exit;
    There is some basic 404 error handling also in the Zen Cart. The basic format of a Zen Cart URL is
    Code:
    http://<domain>/<path>/index.php?main_page=<page>
    If you use an incorrect <page> identifier, visitors will be redirected to a page-not-found page. In the sample http404.php script, any 404 error for site1.com is reflected back to the default page-not-found script in Zen Cart.

    However, Zen Cart does not automatically intercept any errors in the <domain> or <path> segments of the URL. That's why you need a separate 404 error script like the one described above.

  5. #185
    Join Date
    Jul 2007
    Location
    Stockholm, Sweden and Palermo, Italy
    Posts
    6
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by stav View Post
    Tip:
    If you want a different index welcome page in each site you can do something like this.
    Hi Stav,

    I'm new here and I may be mistaken, but there is already a unique starting page pe
    r site at
    Code:
    includes/languages/ENGLISH/SITENAME/index.php

    (change the language and template name as required).

    As long as your Zen Cart is in the root folder of your site, this will be the site-unique starting page for each site, thanks to the way the Zen Cart and the MultiSite Module works. If I'm incorrect, please let me know what situation your solution handles that isn't already supported by the default setup - as I said I'm really new here.

    A special case is of course when the Zen Cart is NOT in the root folder of the site.
    Obviously, you cannot do anything in the Zen Cart to handle this situation, since it doesn't know about anything that happens outside it's own folders. Instead, you will have to use something similar to my PHP script above to show the right index page for each site.

  6. #186
    Join Date
    Oct 2004
    Posts
    50
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by Magnus Wester View Post
    Hi Stav,

    I'm new here and I may be mistaken, but there is already a unique starting page pe
    r site at
    Code:
    includes/languages/ENGLISH/SITENAME/index.php
    [COLOR=Black]
    (change the language and template name as required).
    That is the languages definitions for the index page,the most of the index texts content is stored in that page.

    But if you go in admin/tools/define pages editor and there select from the dropdown menu the define_main_page.php.

    Here you can specific anything on the top of the index page body content, you can use and WYSIWYG edotor in this page content.

    In admin/tools/define pages editor are 4 empty pages too, page_1, page_2 , page_3 and page_4.

    So i used that pages for each of my sites for main page contents welcome messages intro images etc.
    Last edited by stav; 17 Aug 2007 at 12:48 PM.

  7. #187
    Join Date
    Oct 2004
    Posts
    50
    Plugin Contributions
    1

    Default Re: Emulating MultiSite using a common file structure

    Quote Originally Posted by Magnus Wester View Post
    In this case you probably need a separate index page for each site. To achieve this, you need to create a script. I use PHP, and this is my new index.php file:
    Code:
    <?php
    switch($_SERVER['HTTP_HOST']) {
      case 'site1.com':
        require('site1-index.php');
        break;
      case 'site2.com':
        require('site2-index.php');
        break;
      case 'site3.com':
        require('site3-index.php');
        break;
    }
    ?>
    This uses the same technique as the MultiSite Module to show different content for different sites by using a separate index.php file for each site. From this site-unique file you create each site with its own content, templates, CSS files etc.

    I dont't know why you need different zencart_root/index.php pages for each site.

    I think that you need just different text definitions for each site on the index page.
    So you can do that if you put into languages/yourlanguage/name_of_the_site1_template/index.php
    languages/yourlanguage/name_of_the_site2_template/index.php
    languages/yourlanguage/name_of_the_site3_template/index.php

    and then using my previous post for the define_main_page.php

    You can have a totall diferents index or other pages for each site using diferrent template and languages definitions for each site.

  8. #188
    Join Date
    Oct 2004
    Posts
    50
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    The tip that I posted about define_main_page.php , is usefull that you can edit the define_main_page.php from the admin tool for all the sites, and you can changing that content anytime you like.

    You can do the same thing using different laguage definitions files in
    includes/languages/yourlanguage/html_includes/name_of_the_site1_template/define_main_page.php

    includes/languages/yourlanguage/html_includes/name_of_the_site2_template/define_main_page.php
    etc. but you must edit manualy that pages except the default define_main_page.php which you can edit from the admin defines pages editor.

  9. #189
    Join Date
    Sep 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by stav View Post
    The tip that I posted about define_main_page.php , is usefull that you can edit the define_main_page.php from the admin tool for all the sites, and you can changing that content anytime you like.

    You can do the same thing using different laguage definitions files in
    includes/languages/yourlanguage/html_includes/name_of_the_site1_template/define_main_page.php

    includes/languages/yourlanguage/html_includes/name_of_the_site2_template/define_main_page.php
    etc. but you must edit manualy that pages except the default define_main_page.php which you can edit from the admin defines pages editor.
    You can Edit the file for each template from the admin section by changing the template from the admin section (this won't change the template front end) using Tools -> Templates Selection.

    Using the Define pages is the best way of creating extra pages for the website and let the possibility to the admin to change the content...

  10. #190
    Join Date
    Oct 2004
    Posts
    50
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    You can Edit the file for each template from the admin section by changing the template from the admin section (this won't change the template front end) using Tools -> Templates Selection.
    Yeas right my mistake :).

 

 

Similar Threads

  1. v154 WorldPay Module version 3.0 - Support thread
    By countrycharm in forum Addon Payment Modules
    Replies: 115
    Last Post: 20 Jul 2021, 04:00 PM
  2. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 127
    Last Post: 26 Mar 2021, 04:13 PM
  3. WorldPay Module version 2.0 - Support thread
    By philip_clarke in forum Addon Payment Modules
    Replies: 729
    Last Post: 4 Nov 2017, 08:23 AM
  4. PC Configurator Module [Support Thread]
    By lebrand2006 in forum All Other Contributions/Addons
    Replies: 254
    Last Post: 22 Aug 2012, 03:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR