Author Topic: Store #2 on localhost  (Read 7175 times)

surknight

  • Guest
Store #2 on localhost
« on: May 14, 2013, 01:33:34 AM »
I've installed abantecart 1.1.4 over xampp 1.8.1 on localhost, and everything is working well. I then created a second store by copying all the settings of the default store, which seems to have worked (I'm planning to edit the second store into what will eventually be the actual store and keep the default unchanged). I can see the second store in the settings and switching between the two seems to work. However, trying to view the second store isn't working - I just get the default store. I know it's the default because I change the store name, welcome message, and title and the changes do show in the settings, but revert to the default store texts when I click the Store Front link.

How do I view the second store? I need to see what my edits look like. Thanks.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Store #2 on localhost
« Reply #1 on: May 14, 2013, 06:21:05 AM »
Check store url setting for both stores.
Abantecart store recognition based on it.
You can use file host to add some your private domain and use it for second store.
http://en.wikipedia.org/wiki/Hosts_%28file%29
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

surknight

  • Guest
Re: Store #2 on localhost
« Reply #2 on: May 15, 2013, 02:39:14 AM »
Hmm... I think I'm probably missing something obvious. Could you give an example of what the url in settings should look like? I've added "store1" as an entry to 127.0.0.1 in hosts and I've tried "http:--localhost-abantecart-public_html-store1-" in settings but it doesn't work. I'm also getting this error in the log:

"2013-05-14 12:45:02 - App Warning:  AbanteCart core v.1.1.4 Warning: Accessing store with unconfigured or unknown domain. Check setting of your store domain URL in System Settings . Loading default store configuration for now. in xampp-htdocs-abantecart-public_html-core-lib-config.php on line 142"

Sorry for the "-" instead of "/" in the urls, but I'm apparently not allowed to post 'external links' even with the insert code button.

surknight

  • Guest
Re: Store #2 on localhost
« Reply #3 on: May 18, 2013, 03:20:09 AM »
I've come to the conclusion that either my understanding of the various instructions for making a 'sub' store viewable on a localhost installation is too limited (I'm not a developer and don't quite understand the various syntaxes) or the multistore option isn't working quite right for 1.1.4 when installed on localhost. In any case I decided to put the second store on an entirely separate installation of abantecart with its own database, which is probably a better idea anyhow since the two stores are ultimately going to be hosted on different domains.

For anyone else who can't get multistore working on localhost - two separate installations of abantecart over the same installation of xampp work quite well. You can even edit them simultaneously (as opposed to having to switch between them).  :)

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Store #2 on localhost
« Reply #4 on: May 18, 2013, 11:38:02 AM »
I am not quite clear how you intend to set up multiple domains on localhost? You need to have to have separate domain/host per each store you create.

You could set up local domains I guess, but you need to make sure that your store is reachable with that domain.
As long as AbanteCart detects store based on the domain set in store_url, it should work
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline zemadfrenchman

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Store #2 on localhost
« Reply #5 on: May 20, 2013, 08:07:24 AM »
If you set up the following entry in your hosts file

store1 127.0.0.1

then your url would just be

http://store1/

You are in essence creating a second "localhost" type alias that the web server can use to differentiate between the two intended stores

Note this will only work from the machine where the hosts file is changed. Host file acts as a DNS override

Hope this helps

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Store #2 on localhost
« Reply #6 on: May 20, 2013, 01:47:38 PM »
make sure you have store_url set correctly in admin/settings and PHP is able to detect your local domain as it is.
if above is true, I do not see why it would not work.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod