简体   繁体   English

[如何使用Opencart]在Xampp Localhost上进行多存储

[英]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. 是否有人在本地计算机上建立了Opencart多元存储库,让Xampp知道如何正确添加代码。 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. 我已经投入了与Google一样多的教程,并且该论坛已经并且似乎无法弄清楚如何正确放置代码。 A sample of how it should look when placed in the http.conf file will really help . 放置在http.conf文件中的外观示例将http.conf

The tutorials is asking me to edit the Apache Configuration file add “alias” for each sub store. 这些教程要求我编辑Apache配置文件,为每个子存储添加“别名”。

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

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

  1. go to this path: C:\\xampp\\apache\\conf\\ 转到此路径:C:\\ xampp \\ apache \\ conf \\
  2. Find httppd.conf file and open it 查找httppd.conf文件并打开
  3. Search ”” section and add below code inside this section . 搜索“”部分,并在此部分中添加以下代码 ??? ???

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

Alias /opcStore_2 "C:/xampp/htdocs/store" 别名/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. 因为我尝试放置它,但只收到错误的本地URL。 Thanks 谢谢

Now, you have to restart Apache server from your XAMPP control panel. 现在,您必须从XAMPP控制面板重新启动Apache服务器。 After restarting, you have to add sub stores in Opencart configuration. 重新启动后,您必须在Opencart配置中添加子存储。

OpenCart configuration for Multi stores. 多商店的OpenCart配置。

  1. Logon to your main store : C:/xampp/htdocs/store/admin 登录到您的主要商店: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/" 在添加给商店URL时:对于第一家商店,给URL:“ http:// localhost / opcStore_1 /”

for 2nd Store give url: "http://localhost/opcStore_2/" 对于第二家商店,请提供网址:“ http:// localhost / opcStore_2 /”

Will look like this, at the end i have added 5 sub store. 会看起来像这样,最后我添加了5个子商店。

# # 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 #示例:#重定向永久/ 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" 别名/ myspecialparty“ C:/ wamp / www / newStore”别名/ superweddingday“ C:/ wamp / www / newStore”别名/ 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. 它是印尼语,但您可以尝试translate.google.com进行翻译。

Hope it will be a help. 希望对您有所帮助。

Let say your main store is http://localhost/opencart-1.5.6.1 假设您的主要商店是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/ 创建您的多商店名称为Malaysia ),URL为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/" 打开文件C:\\ xampp \\ apache \\ conf \\ httpd.conf并在ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"之后的代码中添加Alias /opencart-1.5.6.1/malaysia "C:/xampp/htdocs/opencart-1.5.6.1/"代码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/ 重新启动Apache进程并尝试访问该URL http://localhost/opencart-1.5.6.1/malaysia/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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