Page 18 of 224 FirstFirst ... 816171819202868118 ... LastLast
Results 171 to 180 of 2237
  1. #171
    Join Date
    Oct 2004
    Posts
    50
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    One sindax error.
    File:
    includes/functions/extrafunctions/cat_filter.php

    Line: 76
    from
    INNER JOIN categories_description c
    to
    INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd

    Line: 80
    from
    INNER JOIN categories as c
    to
    INNER JOIN ".TABLE_CATEGORIES." as c


    For me, in this new version all filtering with multilangual installation working fine exept the main_page=products_new

    Congratulation Gerome :)

  2. #172
    Join Date
    Oct 2004
    Location
    Surrey, BC, Canada
    Posts
    1,881
    Plugin Contributions
    2

    Default Re: MultiSite Module Support Thread

    Hello Gerome,

    I have added all my products through Easy Populate. I don't know of another module that would do that. The thing is that when I add all my products with this module the master_categories_id is not populated so I run into problems with listing my products.

    I found a quick fix though. in the cat_filter.php function I changed line 90 with the following code:
    PHP Code:
    $sql substr($sql,0,$add_pos).
            
    " INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
            ON (p.master_categories_id = cd.categories_id
            AND cd.language_id="
    .$_SESSION['languages_id']."
            AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%') ".
            
    substr($sql,$add_pos); 
    to this:

    PHP Code:
    if(preg_match("/from zc_products_description pd, zc_products p left join zc_manufacturers m on p.manufacturers_id = m.manufacturers_id, zc_products_to_categories p2c left join zc_specials s on p2c.products_id = s.products_id/",$sql))
    {
        
    $sql substr($sql,0,$add_pos).
                
    " INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
                  ON (cd.categories_id = p2c.categories_id
                  AND cd.language_id="
    .$_SESSION['languages_id']."
                  AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%') ".
                
    substr($sql,$add_pos);
    } else {
        
    $sql substr($sql,0,$add_pos).
                
    " INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
                  ON (p.master_categories_id = cd.categories_id
                  AND cd.language_id="
    .$_SESSION['languages_id']."
                  AND cd.categories_description LIKE '%-"
    .SITE_NAME."-%') ".
                
    substr($sql,$add_pos);

    I just made it to check after the products_to_categories table instead of the products.master_categories_id field. It has solved the problem for me for now. The problem that I should really solve is the one with EP but that is in the future.
    I hope that this helps someone.

    God bless. Amazing Discoveries.

  3. #173
    Join Date
    Oct 2004
    Location
    Surrey, BC, Canada
    Posts
    1,881
    Plugin Contributions
    2

    Default Re: MultiSite Module Support Thread

    Actually forget about the earlier post. The Lord answered my prayers even better and led me to this post: Here

    Where DrByte tells how to reset the master_categories_id. so it is all solved without changing your code!

    Praise the Lord

  4. #174
    Join Date
    Oct 2004
    Location
    Surrey, BC, Canada
    Posts
    1,881
    Plugin Contributions
    2

    Default Re: MultiSite Module Support Thread

    I think I found a bug in the cat_filter.php function on line 76. I didn't have time to check the forum but I downloaded the latest version.

    This is the warning:
    HTML Code:
    1146 Table '[#database#].categories_description' doesn't exist
    in:
    [select p2c.categories_id from zc_products p, zc_products_to_categories p2c 
    INNER JOIN [COLOR="Red"]categories_description[/COLOR] cd ON 
    (p2c.categories_id=cd.categories_id AND cd.language_id=1 AND cd.categories_description LIKE '%-[#Site_name#]-%') 
    INNER JOIN categories as c ON 
    (cd.categories_id=c.categories_id 
    AND c.categories_status=1)
    where p.products_id = '75' and p.products_status = '1' 
    and p.products_id = p2c.products_id limit 1]
    the table in red is the problem. The code in the function file is at line 76 and
    PHP Code:
    INNER JOIN categories_description cd 
    should be changed to
    PHP Code:
    INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd 
    Same it is with line 80

    Thank you for the contribution.
    God bless. Amazing Discoveries.

  5. #175
    Join Date
    Sep 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Hi HiPCTech,

    Actually, stav signaled this problem last week before you and I fixed it in the version beta 0.4.1 that I released as soon as I heard from it.

    You can just swap your cat_filter.php by the one from this new version and it will be solved.

    Regards,

    Gerome.

    Quote Originally Posted by HiPCTech View Post
    I think I found a bug in the cat_filter.php function on line 76. I didn't have time to check the forum but I downloaded the latest version.

    This is the warning:
    HTML Code:
    1146 Table '[#database#].categories_description' doesn't exist
    in:
    [select p2c.categories_id from zc_products p, zc_products_to_categories p2c 
    INNER JOIN [color="Red"]categories_description[/color] cd ON 
    (p2c.categories_id=cd.categories_id AND cd.language_id=1 AND cd.categories_description LIKE '%-[#Site_name#]-%') 
    INNER JOIN categories as c ON 
    (cd.categories_id=c.categories_id 
    AND c.categories_status=1)
    where p.products_id = '75' and p.products_status = '1' 
    and p.products_id = p2c.products_id limit 1]
    the table in red is the problem. The code in the function file is at line 76 and
    PHP Code:
    INNER JOIN categories_description cd 
    should be changed to
    PHP Code:
    INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd 
    Same it is with line 80

    Thank you for the contribution.
    God bless. Amazing Discoveries.

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

    Default Re: MultiSite Module Support Thread

    Gerome

    The filtering for the main_page=products_new don't work for me.
    But if i add in includes/templates/template_default/templates/tpl_modules_products_new_listing.php

    from
    PHP Code:
    $products_new $db->Execute($products_new_split->sql_query); 
    to
    PHP Code:
    $products_new $db->Execute(cat_filter($products_new_split->sql_query)); 
    The filtering is working OK. but the counting for the split page is not working ok
    p.x. (1 to 9 from 21) the counter is showing all the products.

    Thesame problem with the counter I have in the feautured products too.
    All other filtering working ok.


    BTW below is one more filter that is missing for the categories dropdown in product list by manufacturers.

    File:
    includes/index_filters/default_filter.php

    Line:167
    from
    PHP Code:
    $filterlist $db->Execute($filterlist_sql); 
    to
    PHP Code:
    $filterlist $db->Execute(cat_filter($filterlist_sql)); 
    Thanks!!.

  7. #177
    Join Date
    Sep 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by stav View Post
    Gerome

    The filtering for the main_page=products_new don't work for me.
    But if i add in includes/templates/template_default/templates/tpl_modules_products_new_listing.php

    from
    PHP Code:
    $products_new $db->Execute($products_new_split->sql_query); 
    to
    PHP Code:
    $products_new $db->Execute(cat_filter($products_new_split->sql_query)); 
    The filtering is working OK. but the counting for the split page is not working ok
    p.x. (1 to 9 from 21) the counter is showing all the products.

    Thesame problem with the counter I have in the feautured products too.
    All other filtering working ok.


    BTW below is one more filter that is missing for the categories dropdown in product list by manufacturers.

    File:
    includes/index_filters/default_filter.php

    Line:167
    from
    PHP Code:
    $filterlist $db->Execute($filterlist_sql); 
    to
    PHP Code:
    $filterlist $db->Execute(cat_filter($filterlist_sql)); 
    Thanks!!.
    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); 

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

    Default Emulating MultiSite using a common file structure

    Many of the people developing or implementing the MultiSite module have already come to grips with the basic characteristics of the module. Others, like myself, are just starting to learn. Perhaps there is a need for a "pre-sales" thread to complement this rather technical "support" thread?

    Anyway, I'd like to contribute a few important basics of the MultiSite module. Some of this is already documented elsewhere on this thread, more or less between the lines. If you miss some of this, or its true consequences, you may be in for a bit of a surprise later.

    These are the issues that I as a newbie have been facing, and if someone ever creates a tutorial for the MultiSite Module I suggest that this information is included there.

    The MultiSite module can save you a lot of time

    If you manage multiple web shops, the MultiSite module can save you a lot of time:
    • You only need to maintain a single Zen Cart installation to host many shops.
    • You can use the same product in more than one shop.
    • A user that is defined in one of your shops can login to any of them.
    • You can provide different company information for each shop.
    • You can use different payment module for each shop.
    • You can use different shipping modules for each shop.
    There are certain limitations
    • All the shops must use the same currency.
    • To use SSL encryption smoothly you need one IP address per shop.
    The same host account is used for all sites

    To reap all the benefits of the MultiSite module you use only one host account, with one common Zen Cart installation, to support all your sites.

    All domain names point to the shared host account

    If you run site1.com, site2.com and site3.com using the MultiSite module, you will only create a host account for site1.com. The DNS entries for site2.com and site3.com both point to (are parked on top of) site1.com.

    All sites use the same folder structure

    Since all the domain names point to the same folder (the root folder for site1.com in the example above), any request for site1.com/zencart/ will access exactly the same file as site2.com/zencart/.

    All sites are managed using the same Zen Cart Admin tool

    It should be obvious to you by now that site1.com/zencart/admin/ and site2.com/zencart/admin/ access exactly the same file. You manage all your sites using the admin tool for the whole Zen Cart installation.

    The MultiSite module knows what site to show

    When the web server receives a page request, the environment variable $_SERVER['HTTP_HOST'] contains the domain name that was used (e.g. "site2.com"). The MultiSite module uses this information to use the right settings, fetch the right template, show the right categories etc. If the domain name is not correctly defined in the /includes/config_sites/ folder, there is no default - the screen will be blank except for a brief "undefined site" message.

    Everything in the sites is shared - every folder, every file

    Since site2.com and site3.com point to the folder structure for site1.com, there is no way to create a site1.com/help/ folder without also making the same folder available in the other sites.

    If you need a partially separate folder structure for each site you may consider creating site1.com/s1/, site1.com/s2/ and site1.com/s3/. As you place items in the s1, s2, and s3 folders, they of course become available in all three sites at the same time. If you link to them correctly, i.e. site1.com/s1/ but site2.com/s2/ and site3.com/s3/, you maintain the impression of three separate sites. It is fairly unlikely that users will ever notice that they visit an account that hosts all three sites simultaneously.

    Even the index page is shared

    I use PHP, and so my index page (the page that is shown if someone just enters the domain name like "site1.com") is typically called index.php. In a multisite setup, this file is also shared - the same PHP script will be executed, regardless of what domain name the visitor used.

    If you place the Zen Cart in your root folder, the MultiSite Manager will handle this automatically, and always provide the right site. If your site contains other things, it is quite likely that you have created a folder for your Zen Cart installation (e.g. site3.com/zencart/).

    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.

  9. #179
    Join Date
    Jul 2006
    Location
    Toronto, ON
    Posts
    87
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    I've uploaded and configured the new version: 0.4.1 and I replaced all files as suggested, after making sure none were edited, and configured the site switches appropriately. However, when I go to the site store1.salvationarmy.ca this is what appears on the screen:

    1054 Unknown column 'CATEGORIES_ROOT' in 'where clause'
    in:
    [select cd.categories_name from categories c, categories_description cd where cd.categories_description LIKE '%-SITE_NAME-%' AND cd.language_id=1 AND c.parent_id = CATEGORIES_ROOT and c.categories_id = cd.categories_id and cd.language_id='1' and c.categories_status=1]

    Any ideas of how to fix this?

  10. #180
    Join Date
    Sep 2006
    Posts
    100
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by jvoce View Post
    I've uploaded and configured the new version: 0.4.1 and I replaced all files as suggested, after making sure none were edited, and configured the site switches appropriately. However, when I go to the site store1.salvationarmy.ca this is what appears on the screen:

    1054 Unknown column 'CATEGORIES_ROOT' in 'where clause'
    in:
    [select cd.categories_name from categories c, categories_description cd where cd.categories_description LIKE '&#37;-SITE_NAME-%' AND cd.language_id=1 AND c.parent_id = CATEGORIES_ROOT and c.categories_id = cd.categories_id and cd.language_id='1' and c.categories_status=1]

    Any ideas of how to fix this?
    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'); 
    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 ?

    I will do these changes as soon as I have few minutes for it !

    Thanks again !

 

 

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