简体   繁体   中英

Opencart How To] Multi-Store on Xampp Localhost

Is there someone that has set up the Opencart multistore in their computer locally threw Xampp that would know how to add the code properly. I have gone threw as many tutorial as Google and this forum has and can't seem to figure out how to properly place the code. A sample of how it should look when placed in the http.conf file will really help .

The tutorials is asking me to edit the Apache Configuration file add “alias” for each sub store.

Alias /opcStore_1 "C:/xampp/htdocs/store"

Alias /opcStore_2 "C:/xampp/htdocs/store"

  1. go to this path: C:\\xampp\\apache\\conf\\
  2. Find httppd.conf file and open it
  3. Search ”” section and add below code inside this section . ???

Alias /opcStore_1 "C:/xampp/htdocs/store"

Alias /opcStore_2 "C:/xampp/htdocs/store"

HOW DOES IT LOOKS WHEN THE CODE IS ADDED? Where inside do I add it and how it should look? Because I tried placing it but only get error local URL. Thanks

Now, you have to restart Apache server from your XAMPP control panel. After restarting, you have to add sub stores in Opencart configuration.

OpenCart configuration for Multi stores.

  1. Logon to your main store : C:/xampp/htdocs/store/admin
  2. Goto: System > Settings and here you can add new stores.
  3. When adding give stores urls: for First store give url: "http://localhost/opcStore_1/"

for 2nd Store give url: "http://localhost/opcStore_2/"

Will look like this, at the end i have added 5 sub store.

# # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http:// localhost/bar

 # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "cgi-bin/" Alias /allbridaljewelry "C:/wamp/www/newStore" Alias /caketopshop "C:/wamp/www/newStore" 

Alias /myspecialparty "C:/wamp/www/newStore" Alias /superweddingday "C:/wamp/www/newStore" Alias /weddingfavorsmart "C:/wamp/www/newStore"

You could check this How to setup our own domain when in a developing stage (not localhost) /

It is in Indonesian, but you could try translate.google.com to translate this.

Hope it will be a help.

Let say your main store is http://localhost/opencart-1.5.6.1

  1. Create your multistore ( store name Malaysia ) and the URL is http://localhost/opencart-1.5.6.1/malaysia/
  2. Open file C:\\xampp\\apache\\conf\\httpd.conf and add this code Alias /opencart-1.5.6.1/malaysia "C:/xampp/htdocs/opencart-1.5.6.1/" code after ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"
  3. Restart Apache process and try to access this URL http://localhost/opencart-1.5.6.1/malaysia/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM