Page 133 of 224 FirstFirst ... 3383123131132133134135143183 ... LastLast
Results 1,321 to 1,330 of 2237
  1. #1321
    Join Date
    Jul 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    i m new to multisite module. the link
    /dev/multisite_instructions_4.0.html"]Instruction[/URL] is not working .plz help me. i have searched for the instruction manual but did not find
    I have tried to install but not getting the result.
    Thanks in advance.

  2. #1322
    Join Date
    Jul 2006
    Location
    Johannesburg
    Posts
    447
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    Step 1. Backup your database and files.

    VERY IMPORTYANT: Make a full backup of your files and your database in order to rollback any changes if necessary.

    Step 2. Execute SQL


    In order to know which site orders originate from, it is necessary to add the column ‘order_site’ to the ‘Orders’ Table.

    To achieve this run the following SQL command:

    ALTER TABLE orders ADD order_site varchar(30) NOT NULL DEFAULT 'no';

    This is the only change that has to be made to the database structure.

    Step 3. Add the ‘NEW’ files

    You need first to add the extra files that you will find in the folder: 'NEW_FILES'. The files are listed below.

    admin/includes/languages/english/extra_definitions/order_site.php
    includes/config_sites/help.txt
    includes/config_sites/sites_switch.php
    includes/config_sites/www.example.com_config.php (This is only an example config file)
    includes/functions/extra_functions/cat_filter.php
    includes/init_includes/overrides/init_sessions.php
    includes/init_includes/overrides/init_templates.php
    includes/modules/sideboxes/site_links.php

    Step 4. Add the ‘MODIFIED’ files

    Now we need to add all the files contained in the folder: 'MODIFY_FILES'.

    If this is a fresh Zen-Cart Install and no other modifications have been made then you can just copy these files over the top of the existing Zen-Cart files.



    In the event that your's is an existing Zen-Cart that has been heavily modified, you will need to wait for the more detailed instructions coming in the not too distant future. These more detailed instructions will tell you which code to add to which file and where to add it.

    Before we proceed there are a couple of things to note. The files in the 'MODIFIED_FILES' folder are of two types. The first type of file CANNOT be over-ridden by the use of templates, the second type is of course the opposite and CAN be overridden by the use of Zen-Cart templates. You can read more about Zen-Cart templates on the Zen-Cart website here. The files in the box below titled 'GROUP 1' are the files which CANNOT be overridden. The files listed in the box titled 'GROUP 2' are the files which CAN be overridden by the use of templates.

    GROUP 1.

    admin/orders.php (Allow the admin's to know where the order come from)
    includes/classes/category_tree.php
    includes/classes/order.php (add the SITE_NAME to the order table)
    includes/classes/site_map.php

    The next files have to replace the existing zencart by the use of the templates but it would mean creating these files for each site and you will see that it is more really convenient... so I advice you to just modify the files.

    GROUP 2.

    includes/modules/sideboxes/best_sellers.php
    includes/modules/sideboxes/categories.php
    includes/modules/sideboxes/featured.php
    includes/modules/sideboxes/manufacturers.php
    includes/modules/sideboxes/reviews.php
    includes/modules/sideboxes/whats_new.php
    includes/modules/categories_tabs.php
    includes/modules/featured_products.php
    includes/modules/new_products.php
    includes/modules/product_listing.php
    includes/modules/specials_index.php
    includes/modules/pages/featured_products/header_php.php
    includes/modules/pages/index/main_template_vars.php
    includes/modules/pages/products_all/header_php.php
    includes/modules/pages/products_new/header_php.php
    includes/modules/pages/reviews/header_php.php
    includes/templates/template_default/sideboxes/tpl_categories.php

    WARNING: You can replace your existing files ONLY if you haven't modified them before your install of Zen-cart !
    (I'll try to make a Modify process help file later for those who can't replace their modified files...)

    Step 5: Make a Template for each site

    We assume that you already have a Zen-cart shop installed with some categories and products.
    You need to have a 2nd template that will be use for your 2nd shop. You can simply copy and past the one from your folder "includes/template/[YOUR_TEMPLATE]" Or you can download some from www.zen-cart.com.

    TIP: In order to make the things easy, I highly advice you to rename the template to the name of each of your site. In this way, you will find easily the folder of the shop you want to modify...
    When you rename your template's name, think of renaming every overriding folder too !
    These folders should be:

    includes/templates/[YOUR_TEMPLATE]
    includes/languages/english/[YOUR_TEMPLATE]
    includes/languages/english/extra_definitions/[YOUR_TEMPLATE]
    includes/languages/english/html_includes/[YOUR_TEMPLATE]
    includes/languages/english/modules/order_total/[YOUR_TEMPLATE]
    includes/languages/english/modules/payment/[YOUR_TEMPLATE]
    includes/languages/english/modules/shipping/[YOUR_TEMPLATE]
    includes/languages/english/modules/[YOUR_TEMPLATE]
    includes/languages/english/modules/sideboxes/[YOUR_TEMPLATE]

    Do not use a template for two sites, otherwise, you will be obliged to have the same language files too (same shops' name and same sideboxes position)

    in the includes/templates/[YOUR_TEMPLATE]/template_info.php, change the template_name to the name of your site that uses the template:

    $template_name = 'mysite';

    So, if your sites are called www.site1.com and www.site2.net Then your should rename your template to site1 and site2
    the file includes/templates/site1/template_info.php should have the line

    $template_name = 'site1';

    the file includes/templates/site2/template_info.php should have the line

    $template_name = 'site2';

    This will help you later in the admin section; the template selector is now only use for choose the site for which you want to change the sidebox setting.


    Step 6. Create the configuration files of your sites


    Add this line at the beginning of your "includes/configure.php":

    include_once('includes/config_sites/sites_switch.php');

    How to change the configuration for a specific shop ?



    The Zen-cart configuration is contained in the database and declared in constants at runtime.
    The configuration in the admin section stands for the "default configuration". You can override this configuration by defining the constants of the setting that you want to change directly in the config file related to one of your site (folder "includes/config_sites")

    You now have to create a config file for each one of your sites !
    The name of the file has to be:
    "www.site1.com_config.php" (for the site targeted by the domain name www.site1.com)
    This file "www.site1.com_config.php" has to contain:

    <?php
    $template_dir = "site1";
    define('SITE_NAME','site1');
    ?>

    $template_dir is the template that you want to use for this site
    SITE_NAME is the name of your site (use for the category filter and for the order page in admin; column site).

    You can add constants for overriding of the default configuration from the database or from the configure.php, the following lines are only exemples:

    //Do not display the categories at the main page for this site:

    define('SHOW_CATEGORIES_ALWAYS','0');

    //Display the categories of ID 5 as the main category of the website: define('CATEGORIES_START_MAIN','5');

    //Change the Contact us email address:

    define('STORE_OWNER_EMAIL_ADDRESS','[email protected]')

    //Enable the SSL only for this site:

    define('ENABLE_SSL', 'true'); //assuming as 'false' in configure.php

    Remember that the code above is only here as exemple and do not always need to be use.

    If you don't know what is the name of the constants of a configuration setting, you can execute this query:

    UPDATE configuration
    SET configuration_description = CONCAT(configuration_description,"<br /> ",configuration_key)
    WHERE configuration_description NOT LIKE CONCAT("%<br /> ",configuration_key);

    This does not really change anything in the functionning but allow you to see the name of the constants in the description of the configuration setting in the admin section.

    Step 7. Category Filter

    The MultiSite module works by filtering the categories with the function cat_filter. It only displays the categories that have the name of the site (constant SITE_NAME) in html comment in the categories descriptions. Therefore, you need to add this description to EVERY categories description that have to be display in a shop. Sub categories Included!

    Example of html comment:

    <!--site1-site2-site3--> Description of a category that will be displayed in site1, site2 and site3.

    This comment will allow this category for the shops site1 site2 and site3. the site names HAVE to be separated by "-".
    If you have Lots of categories, you can use a query that will do that for all of them, like the following:

    REMEMBER OF ENTERING YOUR SITE_NAME INSTEAD OF your_site_name1 AND your_site_name2 !

    This SQL query anable you to add sites to all your categories but you can also do that by writing the <!--site1-site2-site3--> to the categories descriptions one by one. Do not for get the subcategories !

    UPDATE categories_description
    SET categories_description = CONCAT("<!--your_site_name1-your_site_name2-->",categories_description)
    WHERE categories_description NOT LIKE "%-your_site_name1-your_site_name2-%"

    once you have put your html comments in your categories, they should appear on the front end of your shop. If a category has no html comment, it won't be displayed in any sites.

    Step 8. Site Links

    If you want to allow the shoppers to have a cross-sites cart (orders products from different websites in the same cart),
    You have to display the sidebox called "site_links.php" and you have to add the sites that you want to be link by editing the file
    "includes\modules\sideboxes\site_links.php".

    In this file, you have to add as many add_site_link(...); as you want of site links.

    Example:

    add_site_link('Shop Site1','http://www.site1.com');
    add_site_link('Shop Site2','http://www.site2.com');

    This works too:

    add_site_link('www.site1.com');
    add_site_link('www.site2.com');

    PS: these shops Should be Your multi-sites. You can also add some other sites there but the cross-site cart won't work (and so might confused the shoppers ...)

    add_site_link('Zen Cart','http://www.zen-cart.com',false);

    By adding false as third parameter (false), it won't add the zenid to the link. It can be use either for a shop in the same domain (cookie will work for it) or an external link (cross-site cart won't work anyway....)

    That's it, if you manage to understand these explanations, you should have installed this module correctly.

  3. #1323
    Join Date
    Aug 2008
    Posts
    23
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    I put the instructions above on my website so we can reference it in the future without looking in such a large forum. There are also basic instructions about the SSL.

    http://www.thisdomain.net/dev/

    I plan to update these pages when new and relevant information comes out. This module is very useful to myself and many others.

    Sean

  4. #1324
    Join Date
    Jul 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Thanks Louis for ur great response and thanks Staft for preserving the script. I have one query regarding the instructions. I have downloaded the module mfrom this link. the files i found in the folder are more as compared to the files discussed in the instruction manual.
    For example: The file admin/multisite.php in (NEW_FILES but here it named ADD_FILES) any many more in other folder. Should i skip these files or include.
    Thanks zen-cart forum and thanks all the contributors of this forum for the great response.

  5. #1325
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,616
    Plugin Contributions
    19

    Default Re: MultiSite Module Support Thread

    You can see the ADD_FILES and MODIFY_FILES there. The ADD_FILES are simply to be added, nothing will overwrite. And the MODIFY_FILES can be a little tricky. If you have a standard zencart installation without any modifications, you can simply add these files overwriting the existing ones. But, if you had installed addons, altered some files or in any way modified files that are in the MODIFY_FILES, you should change these files manually. You could use BeyondCompare or winmerge or any other compare tool or do it the hard way - manually, file by file as explained in the install.txt inside the package.
    If you don't include all files from ADD_FILES and modify all from MODIFY_FILES, your multisite module will not work.

  6. #1326
    Join Date
    Jul 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Thanks for the response. I have one query.
    Suppose i have two domain www.example1.com and www.example2.com then i have to install zen cart on both sites?
    or
    i have just to install zen-cart in www.example1.com only. if this is the case then what are the files do i have to put in www.example2.com.
    Please clarify this. Thanks again for the support.

  7. #1327
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,616
    Plugin Contributions
    19

    Default Re: MultiSite Module Support Thread

    The whole point of this module is to have ONE zc installation only.

    So, install zen cart in your root or subdomain. Configure everything you need to get it working. Go to your cpanel and create an ADDON domain. When creating it, it will ask you for the document root - just point it to the folder where you've installed zencart.

    Look at the screenshot attached. Let's say you've installed zencart in your site1 folder and it opens with site1.com and now you need to configure site2.com
    Of course, nameservers should be set before doing this...

    Now you need to setup your config_sites folder with the appropriate _config.php files. Keep in mind that you'll need both www.site1.com_config.php and site1.com_config.php if you want your site to open with both addresses. Or, do a 301 redirect for site1.com to www.site1.com. The same goes for site2.

    Have fun!
    Attached Images Attached Images  

  8. #1328
    Join Date
    Jul 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Please can anyone help me, I would like to set up multistore on localhost, prior to uploading to live domains. I want to test it out, and add a few more mods etc.

    I have searched for this info in this forum, and several people have asked before, but always seem to say something like "Oh I found out how to do it"... before guidance was posted.

    I have installed v1.3.9d, and have added Multistore to that.., all on localhost/site1. Admin is fine, but if I navigate to localhost/site1/ I get this error message "the domain localhost does not exist".. I assume that is because I need to sort out config files...

    Does anyone have a set of instructions I could borrow on how to set things up on localhost (I want main store plus 2)... then how to transfer to live environment later.

    Apologies if this has been answered before, but I just couldn't find it.

    Thanks in advance for all/any help you are able to provide.

  9. #1329
    Join Date
    Aug 2008
    Posts
    23
    Plugin Contributions
    1

    Default Re: MultiSite Module Support Thread

    You need to have the domains pointing at the proper location for the files to be called upon. The script is using the fact that domain1.com has all the files and domain2.com is parked. So if you do not have the domains pointing to the sites, the site knows nothing is happening.

    I am not a programmer, but this makes sense why it doesn't work. I may be incorrect on this. Hopefully someone will let us know that has more knowledge than I.

    Sean

    http://www.thisdomain.net/dev/

    Quote Originally Posted by lipton View Post
    Please can anyone help me, I would like to set up multistore on localhost, prior to uploading to live domains. I want to test it out, and add a few more mods etc.

    I have searched for this info in this forum, and several people have asked before, but always seem to say something like "Oh I found out how to do it"... before guidance was posted.

    I have installed v1.3.9d, and have added Multistore to that.., all on localhost/site1. Admin is fine, but if I navigate to localhost/site1/ I get this error message "the domain localhost does not exist".. I assume that is because I need to sort out config files...

    Does anyone have a set of instructions I could borrow on how to set things up on localhost (I want main store plus 2)... then how to transfer to live environment later.

    Apologies if this has been answered before, but I just couldn't find it.

    Thanks in advance for all/any help you are able to provide.
    Last edited by staft; 20 Jul 2010 at 12:32 AM. Reason: I forgot something.

  10. #1330
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: MultiSite Module Support Thread

    this is hou i did it

    one file is callled : localhost_config.php

    with the following in it:
    Code:
    <?php
    $template_dir = "nifty_zen";
    define('SITE_NAME','Design 75 webshop');
    define('HTTP_SERVER', 'http://localhost');
    define('HTTPS_SERVER', 'https://localhost');
    define('CATEGORIES_ROOT','1'); //root categories is 1 for this site  
    ?>
    the second is called : nifty_zen_config.php

    with the following in it:
    Code:
    <?php
        define('DIR_WS_CATALOG', '/zen139d');
    	define('DIR_WS_HTTPS_CATALOG', '/zen139d');
    	$template_dir = "nifty_zen";
    	define('SITE_NAME','example');
    ?>

 

 

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