Post by Fabienlolo » Sat Sep 14, 2019 2:37 pm

OC 3.0.2
Journal 2 Theme
Hi everybody,
To back up my question i read some post: http://docs.opencart.com/en-gb/administ ... lti-store/, https://www.antropy.co.uk/blog/how-do-o ... ores-work/, viewtopic.php?t=171124 and definitely got help from https://www.upwork.com/hiring/developme ... der-model/
So i want to setup a multistore on my domain. My OC is already in a subolder "www.mydomain.com/subfolder1/"
I understand that i need to create a subfolder in the OC subfolder where my second store will be "www.mydomain.com/subfolder1/subfolder2/".
Then instead of using CPanel feature to make a subdomain, i can make a htaccess file to use my new subfolder2 and add an index.php file as indicated in the last linked post, before adding the new store in admin panel.
Now my question is htaccess related: how can i have my store2 URL be "www.mydomain.com/subfolder2/" instead of "www.mydomain.com/subfolder1/subfolder2/" ? Google couldn't get me any article i could understand enough so far to make the changes.
Thanks for your help

New member

Posts

Joined
Fri Jun 29, 2018 7:24 am
Location - Q.Roo, Mexico

Post by Fabienlolo » Mon Sep 16, 2019 7:28 am

Hi everyone,
i hoped i could get some answers before doing anything, but as i have time today, i decided to give it a go. Did not get too far though. Following the steps of the posts mentioned previously, i created my folder2 inside my OC folder, added the .htaccess file and the index.php file in folder2, and tested my new URL, https://www.mydomain.com/folder1/folder2.
Instead of seeing my default store like mentioned in the regular multi-store subdomain install, i get redirected to .../folder1/folder2/install/index.php and with the page displaying "File not found."
When i first installed OC in https://www.mydomain.com/folder1/, it was recommended to delete the "install" folder after install. So i believe, having this file ready, it would install another OC but in my https://www.mydomain.com/folder1/folder2/. And i believe this is not the multi-store purpose.
Now, I guess that i could try the subdomain install, but then my store 2 URL would be https://folder2.mydomain.com/folder1/. Not the greatest URL. And actually, not exactly the situation described in OC docs about store2 install as it seems to consider that domain contains OC and not a domain subfolder, which is my situation.
I really hope to find a way to make a multi-store with my main store still in https://www.mydomain.com/folder1 and my second store in https://www.mydomain.com/folder2
Hope to get some tips from you guys.
Last edited by Fabienlolo on Mon Sep 16, 2019 11:22 pm, edited 1 time in total.

New member

Posts

Joined
Fri Jun 29, 2018 7:24 am
Location - Q.Roo, Mexico

Post by paulfeakins » Mon Sep 16, 2019 6:07 pm

It would be much easier to put them on different sub-domains rather than sub-folders.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Fabienlolo » Mon Sep 16, 2019 11:21 pm

Hi Paul,
i believe so and agree with you as official document mention it and when you add a store in the admin panel, the comments point that it is much more recommended to use subdomains. One thing though, store URL is not clearly indicated then as in admin panel you got the comment "include the full URL to your store. Make sure to add '/' at the end. Example: http://www.yourdomain.com/path/. Don't use directories to create a new store. You should always point another domain or sub domain to your hosting", but when i check the document https://www.antropy.co.uk/blog/how-do-o ... ores-work/, you have to use the subdomain URL.
Now, what would the pros and cons of using subfolders? It seems possible and i believe this can be a pro to sum up trafic on domain...
And then i have another doubt, if i make a subdomain for my second store, my main store being in a domain subfolder, the document root to point is my OC subfolder, right?

New member

Posts

Joined
Fri Jun 29, 2018 7:24 am
Location - Q.Roo, Mexico
Who is online

Users browsing this forum: No registered users and 12 guests