Zen Cart Logo
Forums / All Other Contributions/Addons / Multi-Site Module...

Multi-Site Module...

Locked

Views: 16,860

Results 21 to 40 of 67
This thread is locked. New replies are disabled.
13 Apr 2007, 1:05 AM
#21
david_buckley avatar

david_buckley

New Zenner

Join Date:
Mar 2007
Posts:
48
Plugin Contributions:
0

Multi-Site Module...

Reza,

I have just been through the exercise of setting up multiple shops from the one database using Gerome's module and so far I am loving it. To help answer a few of your questions.

  1. The SQL query needs to be run in the admin section for MySQL from your hosting companies MySQL admin tool.
  • What errors did you get? This query worked first off for me.
  • You will see the constant names in the Admin section of your ZenCart, under the Configuration menu there are loads of submenus each with different things to change. Say you pick the Layout Settings and then the first thing to modify is the "Column Width - Left Boxes". Over on the right hand side of the page is the bit with the edit button, The bit in the CAPS text is the Constant Name. Like so:

Width of the Left Column Boxes
px may be included
Default = 150px
BOX_WIDTH_LEFT

It is the same for all the modifyable bits.

  1. A redirect Model would not allow you to have different templates, or looks for each site.

The way that I set up my multisite shops was to install ZenC on the "Primary" site, (http://dcinet.com.au/catalog/), then apply the Multisite changes. Then copy the catalog directory to subdomains, (I have http://shop1.dcinet.com.au/catalog/ and http://shop2.dcinet.com.au/catalog/). When I copied the catalog directories I removed the admin directory from shop1 and shop2, I also had to edit /includes/configure.php to modify urls and directory paths. You will probably need to do this. Using Gerome's multisite module I was able to apply different templates to each site, you can see the results at the urls above.

  1. see 2. :)

  2. all of mine were on the same host, I think that this will make it easier. I'm not sure how you would go trying to connect to the main site database from other hosts, (this might not work, then again it might, haven't tried it can't give you a definitive answer.)

  3. I do not quite understand this question.

  4. This is the same as 1. what was the error?

  5. As I said before I don't think redirection is the model that will work for you, but it really depends on what you are trying to achieve. The model that I have set up will work for me, because I want to have one database / list of products, One Shopping Cart, but multiple shops all with a different look. My plan is to sell shops to companies where their employees can by products from my offerings, but each shop will be branded to the company that buys it. So what is it that you want to achieve?

  6. The reason that you have no products or categories displayed is that you missed a step in the instructions. You need to add <!--sitename--> to the description for the categories that you want to display in your shop. You need to add a separate comment for each site that you want to display the category in. So if you have site1, site2, and site3, and you have a category called hardware, and you want to display this category in site1 and site3 but not site2, you need to add <!--site1--><!--site3--> to the description of the category hardware. You add this in the ZenC admin site. Log in to the admin site::Select the Catalog Menu::Select the Categories and Products menu item::Click the little green "e" on the right hand side of the page that lines up with the "Hardware" category::Add <!--site1--><!--site3--> to the categories description field:: Click the Save Button::Go back to your Shop and refresh the page::Viola:: Happy happy Joy Joy, well at least that is what I said when I got things going.

:smile: :smile: :smile:

I hope that this helps at least a little bit, and just post again if this wad of info leads you to more questions.

Kind regards,

David Buckley.

13 Apr 2007, 8:33 AM
#22
gerome avatar

gerome

Zen Follower

Join Date:
Sep 2006
Posts:
100
Plugin Contributions:
0

Re: Multi-Site Module...

Thank you so much David for you help on this.

So yes, the instruction are lacking; David said he will give me a hand on it :)

Reza, what's the version of your database ?
I only tested it on Apache 3 and 5 so it can be probable that the function CONCAT doesn't work with every database.
Anyways, these 2 queries are only there to help you with the configuration of your sites and are not obligatory....

define('DIR_WS_HTTPS_CATALOG', '/a**/**');

if you want, you can have only one comment the categories' description like that

<!--site1-site2-site3-->

If you don't write any comments, the categories wont be displayed.

13 Apr 2007, 7:27 PM
#23
reza avatar

reza

Zen Follower

Join Date:
Aug 2006
Posts:
166
Plugin Contributions:
0

Re: Multi-Site Module...

hi David & Gerom
thanks for reply and explanation. now it's okay and works, but there are some questions:
I did a copy of the whole zen C of https://www.domain.com to the subdirectory gold.domain.com and then deleted only the admin directory from this last one!

1- did I do the correct procedure, because in readme file there was nothing about copying zenC to the new site or subdomain? even nothing about which directories?
2- should I delete all directories except of include in gold.domain.com?

3-when for a product (exp. A Bug's Life "Multi Pak" Special 2003 Collect...) I had to upload files to server, I don't get any upload neither in shopping cart nor afterwhile in image directories of domain.com and gold.domain.com, respectively. how can I manage in order to uploads for "*gold *"goes to image directory of gold.domain.com and not to images directotory of domain.com ?

Gerom: your querries are OKAY. now it works. MySQL version 4.1.21-standard

GEROM, VERY VERY thank you for this contribution, It solved my problems in using templates related language files in establishing multishop,
I go to do on my real zen mixed with extra contributions and let you know with which modules may be compatible or not compatible

14 Apr 2007, 3:49 AM
#24
david_buckley avatar

david_buckley

New Zenner

Join Date:
Mar 2007
Posts:
48
Plugin Contributions:
0

Re: Multi-Site Module...

My Understanding of things is that you should do the upload on the "Primary" site and then "copy" image files to the sub sites as they are in different file structures. Doing the upload on the "Primary" site will put the appropriate information into the database and put the images in the /images directory. Then when you "copy" the images to the "subdomains" the pics will appear on the "sub-shops"

If you have the ability on your webserver, (I don't), I'd put in a symlink from the subdomain to the "primary" for the images directory. This should work, then you wont need to "copy" the image files around.

:)

Hope that this helps provide some more insight.

DAVE

:)

PS. You will need to add the products to a category that you have added the <!--sitename--> comment to for it to appear on the shop.

15 Apr 2007, 5:59 AM
#25
stargre avatar

stargre

New Zenner

Join Date:
Jul 2006
Posts:
89
Plugin Contributions:
0

Re: Multi-Site Module...

Gerome, Could you please clarify for me whether I do have to copy catalogs for each stores I have on my site or not? Since I need to have large number of subshops, if what I've just said is true, this module might not be ideal for me. Otherwise, it'll be just what I want! Thanks!

15 Apr 2007, 11:08 AM
#26
reza avatar

reza

Zen Follower

Join Date:
Aug 2006
Posts:
166
Plugin Contributions:
0

Re: Multi-Site Module...

HI
MAY BE A STUPID QUESTION ? BUT IN ORDER TO CLARIFY; please let me know what do you all mean about " catalog" directory , do catalog=include , or catalog=all directories - admin dir

thanks

15 Apr 2007, 11:25 AM
#27
reza avatar

reza

Zen Follower

Join Date:
Aug 2006
Posts:
166
Plugin Contributions:
0

Re: Multi-Site Module...

stargre:

Gerome, Could you please clarify for me whether I do have to copy catalogs for each stores I have on my site or not? Since I need to have large number of subshops, if what I've just said is true, this module might not be ideal for me. Otherwise, it'll be just what I want! Thanks!

hi stargre
I was going to do exactly a shop to provide sunshops to the clients, but the problem of a multisie as geroms'one is the admin of the client's shop will be on my side, and it takes very time to add and manage the products for the clients'shop, how does work in your shop? are your customer able to activate and use instantly on his shop in admin area for his shop after payment? (like hosting services that when your payment is Okay, you are redirected to your space),
let me know
thanks

15 Apr 2007, 3:27 PM
#28
stargre avatar

stargre

New Zenner

Join Date:
Jul 2006
Posts:
89
Plugin Contributions:
0

Re: Multi-Site Module...

Hi reza,

I was talking about the whole zencart folder when I refer to 'catalog'. I actually haven't figured out how to work on it yet. I couldn't get the template part to work. So, my shop has no product, no template once I added the contribution.

I wasn't intending to make a resale shop. What I wanted to is a bit of different. I want to sell different products to different locations (cities). So, before customer choose catagories, they need choose their locations first. I was thinking of adapting Gerome's idea of "subshop" to my "location". So, I'll have huge number of locations. But adminstration is not too much a problem for my situation. Any idea? Any one?

Stargre

reza:

hi stargre
I was going to do exactly a shop to provide sunshops to the clients, but the problem of a multisie as geroms'one is the admin of the client's shop will be on my side, and it takes very time to add and manage the products for the clients'shop, how does work in your shop? are your customer able to activate and use instantly on his shop in admin area for his shop after payment? (like hosting services that when your payment is Okay, you are redirected to your space),
let me know
thanks

16 Apr 2007, 3:30 AM
#29
xtremeimpulse avatar

xtremeimpulse

New Zenner

Join Date:
Apr 2006
Posts:
12
Plugin Contributions:
0

Re: Multi-Site Module...

Ok this deal is working great for me EXCEPT lol, I have different drop shippers for each store, so this means different shipping prices and shippers for each site. Is this possible to do?

Thanks

16 Apr 2007, 11:38 AM
#30
gerome avatar

gerome

Zen Follower

Join Date:
Sep 2006
Posts:
100
Plugin Contributions:
0

Re: Multi-Site Module...

xtremeimpulse:

Ok this deal is working great for me EXCEPT lol, I have different drop shippers for each store, so this means different shipping prices and shippers for each site. Is this possible to do?

Thanks

Yes, it is possible; with different way ...

I think it is possible to use different shipping for different template by puttin a shipping in a template folder ( however, I never tried it)

If it dsoesn't work, you can still do

if(SITE_NAME="yoursite1") {
... code for a one shipping
} else if(SITE_NAME="yoursite2") {
code for another shipping
}

Or, if the shipping module uses constant that come from the admin section, you can override then by declaring the constants in the site's configuration file (folder includes/config_sites ...)

I remind that this module has been made in order to use on zencart install and to manage multiple shops. It means that you only need on folder with your zencart files. However, David was obliged to use different folder has his host doesn't allow him to point different DNS to the same folder...

Basically, if you have different folder, you will need to copy the images folder when you upload a images. I think it is much easier to have only one folder but it is not always possible according to the host you have...

I will provide more explaination for this module shortly (and also an official release in the download section of www.zen-cart.com).

Thanks,

Gerome.

16 Apr 2007, 2:52 PM
#31
lina0962 avatar

lina0962

Zen Follower

Join Date:
Jun 2006
Posts:
403
Plugin Contributions:
0

Re: Multi-Site Module...

Hello Gerome:

I read every message in your forum, since I am very interested in your module. I noticed that multi-sites are working for sumdomains. Can this module work for completely different domain names? Like https://www.site1.com. https://www.site2.com...

LINA

16 Apr 2007, 2:55 PM
#32
gerome avatar

gerome

Zen Follower

Join Date:
Sep 2006
Posts:
100
Plugin Contributions:
0

Re: Multi-Site Module...

Yes, it does; the test shop only use subdomain bicause it is simpler to settup, but it has been made in order to work with different domain.

16 Apr 2007, 3:07 PM
#33
lina0962 avatar

lina0962

Zen Follower

Join Date:
Jun 2006
Posts:
403
Plugin Contributions:
0

Re: Multi-Site Module...

Hello, Gerome:

I will keep an eye on your forum and wait for your complete instrunctions are ready. The current install text is a little bit dizzy for me. :D

The concept sounds very good. I am just not sure whether it adapts with other add-on modules. (I added a lot add-on modules). But I will definitely pay attention to your progress.

Thank you for your great work!

Lina

16 Apr 2007, 3:22 PM
#34
gerome avatar

gerome

Zen Follower

Join Date:
Sep 2006
Posts:
100
Plugin Contributions:
0

Re: Multi-Site Module...

lina0962:

Hello, Gerome:

I will keep an eye on your forum and wait for your complete instrunctions are ready. The current install text is a little bit dizzy for me. :D

The concept sounds very good. I am just not sure whether it adapts with other add-on modules. (I added a lot add-on modules). But I will definitely pay attention to your progress.

Thank you for your great work!

Lina

THere is a way to adapt other modules to this one buy using the function cat_filter which transform any sql query and filter the correct products ... This function has to be added to the different module for which you want to filter the products in function of their categories. I will improve the instructions shortly; also, I take notes of all the points that are raised in this forum and I try to explain it clearly in the instructions.

Hope I will have time to finish all these instructions soon and make a proper release.

17 Apr 2007, 1:53 AM
#35
xtremeimpulse avatar

xtremeimpulse

New Zenner

Join Date:
Apr 2006
Posts:
12
Plugin Contributions:
0

Re: Multi-Site Module...

Well, I got the shpping working.

In your websites https://www.example.com.php file put

define('MODULE_SHIPPING_INSTALLED', 'ups.php'); --Change the php file to whatever shipping you want to use.

Create a tpl_shipping_default.php file in includes/templates/your template/templates

This should only pull the UPS shipping module for this site.

However, I realized something. If I have $5.00 shipping flat rate on one site and UPS on the other then the customer can put and item in their cart on the UPS site and then go to the flat rate site and checkout. This would give them much cheaper shipping lol. Not sure if there is a way to fix this.

17 Apr 2007, 1:10 PM
#36
gerome avatar

gerome

Zen Follower

Join Date:
Sep 2006
Posts:
100
Plugin Contributions:
0

Re: Multi-Site Module...

xtremeimpulse:

Well, I got the shpping working.

In your websites www.example.com.php file put

define('MODULE_SHIPPING_INSTALLED', 'ups.php'); --Change the php file to whatever shipping you want to use.

Create a tpl_shipping_default.php file in includes/templates/your template/templates

This should only pull the UPS shipping module for this site.

However, I realized something. If I have $5.00 shipping flat rate on one site and UPS on the other then the customer can put and item in their cart on the UPS site and then go to the flat rate site and checkout. This would give them much cheaper shipping lol. Not sure if there is a way to fix this.

That's a good point. do you have the same categories or different categories in your shops ?

maybe, you could make the shipping calculated in function of the categories instead of the sites...

29 Apr 2007, 12:06 AM
#37
xtremeimpulse avatar

xtremeimpulse

New Zenner

Join Date:
Apr 2006
Posts:
12
Plugin Contributions:
0

Re: Multi-Site Module...

I was wondering if there was a way to use the cat filter function to in the shopping cart class file to make it only put products shown on that site in the shopping cart? Customers would still stay logged in from store to store, but they could only purchase items from that particular store. This would solve my shipping issue.

Thanks,
Austin

29 Apr 2007, 8:16 PM
#38
skippydog avatar

skippydog

New Zenner

Join Date:
Oct 2005
Posts:
10
Plugin Contributions:
0

Re: Multi-Site Module...

Wow this is great news! I have been waiting for something like this for a long time. Once it is developed a little more I will be turning it live. I tested it out and so far great job!

14 May 2007, 1:06 PM
#39
gerome avatar

gerome

Zen Follower

Join Date:
Sep 2006
Posts:
100
Plugin Contributions:
0

Re: Multi-Site Module...

For these that are not aware already, you can find this module here:

http://www.medea.co.uk/dev/

Cheers

15 May 2007, 3:03 PM
#40
jvoce avatar

jvoce

New Zenner

Join Date:
Jul 2006
Location:
Toronto, ON
Posts:
87
Plugin Contributions:
0

Re: Multi-Site Module...

I'm trying to create two sites. One with a complete listing of products (site 1), and one with a limited listing (site 2).

Would it be possible to have site 1 completely secure; (ie https://site1.sitename.com), and site 2 public (ie http://site2.sitename.com)?

How would this module react to such a setup?