Page 6 of 6
Re: [How To] Multi-Store on Localhost
Posted: Wed Jul 31, 2013 4:48 pm
by novatheme
By defaul its dis-enable?
For securities?
Code: Select all
// A dirty hack to try to set a cookie for the multi-store feature
$this->load->model('setting/store');
$this->data['stores'] = array();
if ($this->config->get('config_shared') && $status) {
$this->data['stores'][] = $server . 'catalog/view/javascript/crossdomain.php?session_id=' . $this->session->getId();
$stores = $this->model_setting_store->getStores();
foreach ($stores as $store) {
$this->data['stores'][] = $store['url'] . 'catalog/view/javascript/crossdomain.php?session_id=' . $this->session->getId();
}
}
Re: [How To] Multi-Store on Localhost
Posted: Wed Jul 31, 2013 7:07 pm
by novatheme
Demo
babycentral.com.hk
They can used one account login to multi store

Re: [How To] Multi-Store on Localhost
Posted: Fri Aug 09, 2013 1:22 am
by uncommonhound
Well, I did everything from scratch following these instructions on MAMP and it works now! Thanks so much!
Re: [How To] Multi-Store on Localhost
Posted: Sat Aug 17, 2013 1:03 am
by hack140603
fido-x wrote:SteveSherry wrote:nzoli wrote:How do I specify a different addresses in my shop (not url)?
You can't.
Multistore is possibly going to be looked at in future versions, but nothing in the most recent versions, or the upcoming 1.4.8 will handle this.
I've been doing a bit of work on some kind of "Store Manager" for a client that will do this. I've been trying to keep it as independent as I can but, obviously, modifying some of the core files is unavoidable, especially when it comes to validation of product ownership (individual "store managers" should only be able to see their own products, not those of other users). There's also the issue of what they should be allowed to access in the administration. And then, there's some kind of "payment manager" that needs to be associated with each user, so that payment received for products sold goes to the right store owner. Lot of work!
I've now moved to another host and have set up multi-store.
it works like a dream.
there area few little "problems", but these are related to modules etc not being restricted to one store, but in general it is a great idea.
Re: [How To] Multi-Store on Localhost
Posted: Tue Aug 20, 2013 4:27 pm
by musmate
Hi,
I'm trying to set up my multistore on opencart 1.5.6
I've followed this how to but cannot get it to work.
In httpd.conf, I added:
Alias /store_1 "C:/xampp/htdocs/opencart"
Alias /store_2 "C:/xampp/htdocs/opencart"
ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"
On the control panel, I gave the address:
http://localhost/opencart/store_1/ for Store 1
But I get the error, Object Not Found! The requested URL was not found on this server.
My main store at
http://localhost/opencart/ works fine.
I did try with and without a / at the end but no joy.
Any suggestions as to where I am going wrong?
Thanks
Andrew
Re: [How To] Multi-Store on Localhost
Posted: Mon Oct 14, 2013 7:32 pm
by peterrobinson
Hi there.. My question:
How to set up multi stores with different domain

thanks.

Re: [How To] Multi-Store on Localhost
Posted: Sat Dec 07, 2013 12:07 am
by chll
uncommonhound wrote:Well, I did everything from scratch following these instructions on MAMP and it works now! Thanks so much!
I still cannot get it work
did you edit the file "/Applications/MAMP/conf/apache/httpd.conf " ?
I insert this inside the section <IfModule alias_module>:
Alias /opencart1 "/Applications/MAMP/htdocs/opencart"
http://i.imgur.com/f9ydltL.png
And I have set up the new store in the opencart admin:
http://i.imgur.com/zwETC2a.png
What am I missing?
Re: [How To] Multi-Store on Localhost
Posted: Sun Jan 05, 2014 6:49 am
by kevin2809
Hi All,
Thank you for the info in this post! Just a quick question though, I have been searching around for a way to set up departments on my new store. I have decided that using multi-store is the best way to go so that I can have a different theme per department.
However, I am stumped at how to link between departments. In other words, I want my main site (ie.
www.site.com) to have a menu where you select a department and a category therein (like Amazon) and it directs you to the relevant department (ie.
www.department1.site.com).
Is there any way to do this?
Thanks!
Re: [How To] Multi-Store on Localhost
Posted: Fri Mar 07, 2014 9:23 pm
by aussiebatt
Many thanks for the details answer
Re: [How To] Multi-Store on Localhost
Posted: Tue May 13, 2014 11:45 pm
by OC2PS
Topic appears to be dated. Perhaps time to unsticky it and post directions relevant for 1.5.x?
Re: [How To] Multi-Store on Localhost
Posted: Sun Dec 17, 2017 11:24 pm
by za miksica
fido-x wrote: ↑Fri Apr 30, 2010 3:14 pm
Objective
Create 2 "sub" stores of your main store, called "store_1" and "store_2".
Assumptions
XAMPP for Windows
XAMPP installation directory: C:\xampp
OpenCart Store directory: C:\xampp\htdocs\store
Main Store URL:
http://localhost/store
Edit Apache Configuration File
What we are going to do is create an "alias" for each store.
Open the Apache configuration file (C:\xampp\apache\conf\httpd.conf) and find the section that starts with "<IfModule alias_module>", and insert the following inside this section:-
Code: Select all
Alias /store_1 "C:/xampp/htdocs/store"
Alias /store_2 "C:/xampp/htdocs/store"
Then restart your Apache server from the XAMPP control panel.
There are 2 things you should note about the above alias entries:
(1) Forward slashes are used for directory paths in the Apache configuration file, NOT backslashes as would normally be used in Windows.
(2) Both aliases point to the same directory - your main store's directory. This would be the same for any other "sub" store you may wish to create.
OpenCart Configuration
Log in to your administration and from the menu, select "System->Settings" and create 2 new stores. You can call them whatever you want.
Give one a Store URL of "
http://localhost/store_1/" and the other a Store URL of "
http://localhost/store_2/".
You should now be able to access your new stores at "
http://localhost/store_1" and "
http://localhost/store_2", with your main store still at "
http://localhost/store".
Hello
it works perfect but how to do the same using htaccess instead of httpd.conf?
Thank you.
Re: [How To] Multi-Store on Localhost
Posted: Mon Dec 18, 2017 12:40 am
by straightlight
Re: [How To] Multi-Store on Localhost
Posted: Mon Dec 18, 2017 1:41 am
by za miksica
Yes I saw that but it does not work. I try this
RewriteEngine On
RewriteBase /
RewriteRule ^shop1$ /shop [L]
and it just forward shop1 to shop
but if you use "conf" file like in original post, then it take your
http://example.com/shop1 to
http://example.com/shop but not only forward, it actually use everything from original directory.
Re: [How To] Multi-Store on Localhost
Posted: Mon Dec 18, 2017 1:43 am
by straightlight
RewriteRule ^shop1$ /shop [L]
and it just forward shop1 to shop.
Where is the problem?
Re: [How To] Multi-Store on Localhost
Posted: Mon Dec 18, 2017 1:50 am
by za miksica
straightlight wrote: ↑Mon Dec 18, 2017 1:43 am
RewriteRule ^shop1$ /shop [L]
and it just forward shop1 to shop.
Where is the problem?
if using "conf" file to write alias, then
http://example.com/shop1 is displayed in url (and all links use shop1) but everything is read from original shop location,
http://example.com/shop.
There is no shop1 directory on disk, you just need to create new shop (shop1) in OC admin panel and add Alias - that's it - like original Author wrote.
Because adding to Alias require access outside of hosting files (you need root SSH access) and after every change of "conf" file you need to restart Apache, I'm looking for .htaccess solution which I can not bring to work since 2 days..
Re: [How To] Multi-Store on Localhost
Posted: Mon Dec 18, 2017 2:14 am
by straightlight
Although, you are posting in a topic about localhost. Obviously, .htaccess cannot operate on localhost local address.
Re: [How To] Multi-Store on Localhost
Posted: Mon Dec 18, 2017 2:18 am
by za miksica
straightlight wrote: ↑Mon Dec 18, 2017 2:14 am
Although, you are posting in a topic about localhost. Obviously, .htaccess cannot operate on localhost local address.
You have right, sorry about that, but my store is on web using Linux and Apache and .htaccess works, only thing I do not know is how to use Alias on same way as it is used on vhost.conf file..
Re: [How To] Multi-Store on Localhost
Posted: Mon Dec 18, 2017 9:16 pm
by straightlight