Need some help?

I'm usually available for small jobs or problem solving with jQuery or css, at reasonable rates. Just get in touch.

Web Hosting

We recommend Clook for web hosting. UK based, great service and great value.

Buy me a drink

If you've found this useful, particularly for commercial projects, you might consider making a small donation.

Opencart – Setting up multiple stores

Here’s how to set up multiple stores on Opencart using subdomains. You could use this to set up a separate store to run a different theme – for example a mobile-optimised theme.

Create your subdomain

Let’s assume you’re running your main store on www.yourshop.com, and that your web hosting locates the files for your store in its root directory public_html. For a mobile store, let’s also assume you’re going to sit this on m.yourshop.com.

You need to create your new domain and point it at the same folder that your main store uses. If your hosting uses cPanel then it should look something like this:

Screenshot of additional domain in cPanel

Create your new store

The next step is to create the new store in Opencart. Go to System > Settings and click the ‘Insert’ button. This should bring up screens to create your new store. For the Store URL and SSL URL, enter your new domain, adding https to the SSL URL if you have a certificate installed. Make sure you close your entries with a ‘/’ or it won’t work. Fill out the rest of the details on the General tab, and your screen should look something like this:

Screenshot of Opencart store configuration screen

Now the Store tab. Here you need to enter the store name, and select the theme you want to use (e.g. a mobile theme). Set the default layout to ‘Default’. Your screen should look something like this:

Screenshot of Opencart store configuration screen

You can then save your new store.

Configure your new store

Opencart will create your new store with all the default settings, so you will need to amend all the store settings as required.

Opencart will not load any categories, products, manufacturers or information pages to your new store (unfortunately?). You’ll need to do all these manually, or by running some SQL queries from the backend. To do this manually:

  • Categories – From the Category edit screen, go to Data > Stores to mark the checkbox against your new store.
  • Products – From the Product edit screen, go to Links > Stores to mark the checkbox against your new store.
  • Manufacturers – From the Manufacturer edit screen, mark the checkbox against your new store.
  • Information – From the Information edit screen, go to Data > Stores to mark the checkbox against your new store.

Modules in your new store – using Layouts

If you’re using Opencart 1.5 or later, then any Modules that you have configured will not be carried over to your new store. This is a good thing, I think, since it effectively gives you control over which modules are used by your different stores. Opencart manages the display of extensions by using the concept of Layouts – which is a little tricky to grasp, I think.

A Layout is the entity which links Modules to pages and stores. When a page is to be displayed on a store, Opencart looks up the layout appropriate to that page on that store, and then finds any modules configured for that layout.

So, if you make no changes to any Layouts after creating your new store, then when a page on your new store is displayed, Opencart will search for the appropriate Layout, and not find one, so no Modules will be displayed. So, to display a Module on your new store, we need to configure a Layout.

I’ll illustrate this with an example. Let’s assume you have some Modules on your default store homepage, and you want to display the same Modules on your new store. First thing is to navigate to System > Design > Layouts and click ‘Edit’ against the ‘Home’ Layout. You should then see something like this:

Screenshot of Opencart store configuration screen

You’ll see that the existing (default) entry tells Opencart that for the default store the Layout ‘Home’ should be used with the route, or page ‘common/home’ – which is the home page. We need to tell Opencart to use the same Layout for the new store. So, click ‘Add Route’, select the new store and enter ‘common/home’ against the route – like this:

Screenshot of Opencart store configuration screen

Click ‘Save’ and you’re done.

You can probably see from this that it’s possible to display different modules on your new store homepage by creating a new Layout and assigning it to your new store only. Here’s some more details on how to do this.

You’re done

Once this is complete, your new store should display via the subdomain, with the products etc and modules that you have enabled in the steps above. Payment, Shipping and Order Totals will all be the same as your existing store.

Tags:

120 responses to “Opencart – Setting up multiple stores”

  1. Smit Shah says:

    Thanks for this..
    Opencart is not having anything for modules & banners for multi-store ?

  2. Simon says:

    Smit
    Yes, you can do this with layout. Have a look at this explanation.

  3. Admin says:

    How can i configure the store? I can’t find your configure style in the Admin Panel of Opencart, please give the solutions quickly.

  4. Admin says:

    Where i can install your mobile script? Directly in the root folder of hosting panel or in the folder name with M in Public_Html folder?

  5. Simon says:

    The theme should be unzipped in the root folder of your Opencart installation.
    Once installed properly you should be able to assign the theme to a store.
    You shouldn’t have a separate folder if you’re installing a mobile theme – see the instructions above.

  6. Admin says:

    Check my testing website :- m.area83.tk It shows some errors, how can i solve it? I’m using Opencart1.5.5.1

  7. Simon says:

    I don’t think those errors are coming directly from the mobile theme. Your default store is showing the same and additional errors.
    Do you have vqmod installed properly?

  8. Dave says:

    I got it all woking but only issue i cant get the product image to show on my mobile site m.

    opencart 1.5.1

  9. Simon says:

    Dave

    I can’t access your mobile site at the moment. I’ve not come across that issue. What happens? Does the rest of the site display OK?

  10. Dave says:

    I got it fixed just had to change the image file name from my mobile path to the website inage folder

  11. Don says:

    Hi thanks for this!

    My store is in a subdomain and i installed this mobile theme in the root of subdomain where is my opencart store. But it dont work not show the mobile theme.
    Is there any sollution?
    Thank you Simon!

  12. Simon says:

    Don

    The theme will not automatically detect a mobile browser as it stands. Have a look here for ways the theme can be employed.

  13. Don says:

    Thank you work fine now!

    One more question if i have thousands products than how can i import to the mobile store just one by one?

    Thank you Don

  14. Simon says:

    Don
    You can run some SQL on your database to do this – have a look here for description.

  15. Donovan says:

    Hi Simon

    Thanks for the above worked a charm. But now I’m having issues with SSL. The main site is http://www.assceneon.com and I have multistore set up with http://www.babycakescoffee.com as the second site. I have SSL cert for assceneon.com (shared) but when I go to https://www.babycakescoffee.com it does not go to the secure site only non secure http:// can you help? Does open cart offer this? I have looked into wildcard SSL but my hosts says that they cannot handle it and nor can opencart! Any help is appreciate

    Regards

    Donovan

  16. Simon says:

    I haven’t done this myself, so check before buying, but I think what you need is a multi-domain SSL certificate.

  17. Tim says:

    Hi, thanks for the tutorial, I followed the directions but when I go to my subdomain. mobile.domainmcom which should go to domain.com/store, it goes to domain.com instead. I did include the / in setup, a common mistake I read people made. I am running 1.5.5.1 thanks.

  18. Simon says:

    Hi Tim

    That sounds like you’ve got your cPanel set up correctly but there’s something wrong with the Opencart settings.

  19. Admin says:

    My we hosting provider is serversfree.com where i can create subdomains but can edit it, can’t make document root to public_html, when i try to make subdomain there, a new folder ‘m’ is created in the root folder of database. Now how can i solve this issue?

  20. Simon says:

    That sounds like one to take up with your hosting provider really, it’s not something that I can help with.

  21. Mark says:

    Hi Simon
    I am just setting up my multistore and seem t have most things working properly, but I have noticed that when I now try to add a new product that only the manufacturers from the second store show up iin the links tab – I have a lot of manufacturers in the default store but none of these appear.
    Any pointers on how to resolve this?

  22. Simon says:

    It sounds like you don’t have the manufacturers enabled for your second store – like products, they can be enabled/disabled by store.

  23. zjunyu says:

    Good Job, Thank you.

  24. Tim says:

    Thank you for answering my question earlier, you say the CPANEL is setup properly, which I know, but the Opencart is now. I have followed your instructions several times, to see what I may have missed, and everything is exactly as you show. Any suggestions? It still goes from http://mobile.domain.com to the domain.com site.

  25. Simon says:

    From your earlier question, is your store in a subfolder? If so is this correct on your subdomain on cPanel?

  26. taun khanna says:

    if i want to use two sites are on sub domains but there is no site on main domain .i just put a html page on main domain and put two links on it. then how will i manage both stores

  27. Simon says:

    I’m not quite sure what you’re asking. If you have two subfolders you can still set them up in cPanel to resolve the the same address and run them as one OC installation.

  28. Ian Haney says:

    Help I am stuck and not sure what to do

    I have unzipped the theme and put inside a subfolder called m and followed all the instructions and redirected it using the php code but I just get a blank white page

    The mobile site is http://www.the-giftery.co.uk/m/

    Any ideas where I gone wrong

    Kind regards

    Ian Haney

  29. Tim says:

    Well, I went back to check it and it does now lead to the mobile template like it should. Now my problem is nothing loads. I get Home My Account Shopping Cart at the top, then the footer showing powered by opencart, and the name of the store.

    I did go through the process of adding the store to the categories, products etc. I also went into the modules, and did what your tutorial shows.

  30. Tim says:

    I was able to get it working, way back when I disabled the mobile_theme.xml because of a PHP error which made my site almost useless. I forgot it was still disabled. I did however find that the PHP error was with the VQMOD Refine Search Sub Category Images, which was the only free mod that allowed sub category images. If you purchase another version, it does not edit files, and works great with your mod. Thank you for a great script!

  31. Simon says:

    Ian

    Sorry for the delay in replying, I have been on holiday.
    From what you describe, it sounds like there might have been an issue with your Opencart configuration – which is why you got the blank page.
    If you’re still trying to make this work get back in touch.

  32. Ashraf Tayab says:

    Dear Sir,,,
    Thank you for your Opencart – Setting up multiple stores, I am new with opencart, by reading your Opencart – Setting up multiple stores, I understand to make multiple stores.
    Thank you

  33. Agus Halim says:

    hi
    thanks for this great articles, i would like to know how is it possible to separate individual admin login page separate product, separate anything so when we totally create a new store in multistore it’s just like new setup. and other store only can see their dashboard, sales and item?
    thanks

  34. Simon says:

    If you’re running multiple stores from on installation then the stores share the database, so the products are stored in a single table (for example). Short of writing a fair bit of code for admin so that users can only see products from a specific store, there’s no way of doing what you want.

  35. Agus Halim says:

    hi
    since i’m not a programmer i would like to know the code how to tweak so with this single table the users only can see their products from a specific store. any paid/free service do let me know. many thanks

  36. Simon says:

    Hi Agus

    Within Opencart you can assign a product to a store, and therefore restrict certain products to only appear in specific stores. Is that what you meant? If not could you explain exactly what you’d like to be able to do?

  37. Charles says:

    Hi Simon

    I am trying to create a multistore in opencart following your steps but what happens is when I open the subdomain http://www.shopcharles.centrodelvalle.com, it doesn’t charge the home page and anything.

  38. Simon says:

    I get a not found error on your subdomain. This suggests that the subdomain isn’t set up correctly rather than anything to do with Opencart.

  39. johnny p says:

    Good morning,

    I create all steps specified here:
    1. I create an sub-domain using CPanel
    2. I specified from setting on ¨Adress URL¨ as your description : http://demo1.my-shopping.ro/

    So, I don´t see the theme choose instead of those message which can be see if you will type in browser the adress of my sub-domain.
    What I don´t understand is if the steps is so simple, why don´t work?

    I waiting much early is possible your answer and advice or other sugestion which can help me to resolve the error.

    Thank you in advance for support and collaboration.
    Best regards.

  40. Simon says:

    The problem there is with the subdomain – for some reason this is not working as expected. I think this is probably an issue to take up with your hosting company.

  41. Robin says:

    Hi, can you assist me for multistore? Is it possible to set multistore in different domain? Like my Main store is set into ABC.com and i want to set another store in different domain as XYZ.com. Is it possible?
    I am also getting issue related to layout thing, as its showing some modules in all pages of substore.

    Thanks
    Robin

  42. Simon says:

    You can run multistore on different domains, yes.
    You can control which modules appear by creating a layout which is store specific.

  43. simon says:

    Hi
    Great article – the only place I’ve seen mention of layouts which had flummoxed me for a while!
    I have a multi-store setup but in admin on my second store, on the server tab of settings I only see the Use SSl section and nothing else. Any idea how this has happened or how to correct it?

  44. Simon says:

    That’s not an error. The rest of the settings can only be set per server, rather than per store, and so only appear on that tab on the default store Settings > Server tab.

  45. simon says:

    Really? I’ve spent ages trying to spot what was wrong!
    If that’s the case how do I put the second store into maintenance mode but leave the default store live?

  46. Simon says:

    You can’t do that out of the box – I dare say there’s an extension that’ll do it. However, you could do this via by creating a specific maintenance theme which has nothing on it except a ‘sorry’ message, and then setting your desired store to use the maintenance theme.

  47. simon says:

    That’s a good idea. I’m slowly getting the hang of Opencart but odd little tricks like that evade me for now.
    Really appreciate the help.

  48. Jacky Wu says:

    Hi Simon,
    I have problem with multi-store setup on my Opencart 1.5.6 with default theme. I have recently registered a new domain, not subdomain of my main one. I then followed the instruction on Opencart forum to create multi-store using different domain. However, when I tried to access the new domain, I was expecting to see the default Opencart storefront. It did not show me that, rather a default web site page saying that the domain have been moved or something. Do you have any idea what is wrong? Thanks.

  49. Simon says:

    Are the two domains on the same hosting? If not then you will need to load up Opencart files on the new hosting as well – although you can use one database to server both sites. I have done this and it works fine – the only minor challenge is managing images across two sites.
    If they are on the same hosting then fro what you say there could be something wrong with how you have the domain set up in cPanel.

  50. Moni says:

    Thanks for the useful guide. Some of our customers are having troubles setting up their stores, so we will make sure we send them your way.

  51. Adam says:

    Hi Simon, thanks for the tutorial…
    Are you able to explain the first part of the setup in more detail for me. I ask, as I can’t get this step to work.
    You state to point the document root to the folder where the files for your store are kept.

    I have an opencart store installed in public_html/domain/store/
    When I create a subdomain – I should use public_html/domain/store/ as the root? Or should it be public_html/domain/ ? Does it need to have the trailing ‘/’?
    I’ve stride both and neither redirect to the open cart front. I have added the domain into OC settings but when I go to the newsite.com I get the standard hosting provider 404 page.
    I have tried a variety of combinations without success.

  52. Simon says:

    Hi Adam
    If your OC files are in public_html/domain/store then yes, the subdomain should point at this directory. You don’t need the trailing slash. If you’re just getting a 404 there’s something wrong somewhere, obviously. I’m assuming this problem has persisted for a while (subdomains tend to take an hour or so to become accessible due to caching etc) – if so it might be something to take up with your hosting company.

  53. Adam says:

    Cancel that last comment – I worked out that although our store was in a /store/ folder, the install for OP was actually in the root (!). This was hard to spot as we have 100+ domains in the root. Thank you anyway!

  54. Mr. T says:

    Product categories are not displaying on the mobile theme or subdomain but are displaying on the the primary site. Kindly advise.
    Cheers!

  55. Simon says:

    Have you enabled the categories for your secondary store?

  56. kernelbit says:

    Hi Simon, I need multiple stores, but in two different hosting providers(2 domains in hosting ‘A’, and 2 in ‘B’), I read comment 49(yours..), but I can’t understand it very well…can you explain it a little bit more detailed, please? Thanks in advance

  57. Simon says:

    Not the simplest thing to do. First all the files need to be duplicated across both stores, then you need to set your database (say on A) to be able to receive remote data requests from B. You’ll want to monitor the response time for this as well.
    You should be able to set up the sites as normal from Opencart admin.
    The messiest bit is uploading images because you need the images to be duplicated across both servers. However, Opencart will only upload the images to the server you’ve logged on as admin. You could add some code to FTP to the other server when the image is uploaded or perhaps set both sites to use the images on one server. I’ve done the former but not tried the latter.
    I’m assuming you can’t have all the sites on one server because you want multiple SSL certificates?

  58. kernelbit says:

    “…can’t have all the sites on one server because you want multiple SSL certificates?”
    Nope… My boss have some kind of personal interest on maintaining the 2nd host… but I’ll say him it’s so complex, so I hope he will understand…
    Anyway, I’ll try this…who knows

    Thanks!!!

  59. Mark Welton says:

    Great tutorial. I have set up several different multi-stores under my main site. Question: How can I add customized or multi-store specific “About Us”, “Terms”, “Social links”, etc? This is preferred but If I can’t, then can I hide the footer on those pages?

    Thanks,

    Mark

  60. Simon says:

    OC allows Information pages to be set by store, so you should just be able to define which store(s) a page should appear on. Not sure if ‘Social Links’ is a page as well or actual links in the header etc. If the latter then this can be set by store, perhaps by creating a different theme for each store and amending the header.tpl within the theme to reflect what you need.

  61. Michael says:

    I installed the store on https://m.kamelmobile.com and I made a few adjustments on it but I cannot get the blueish background off the front page as you can see what adjustments I have made. also when I go to the blog, it shows 2 slides, please advise of what can be done to correct these issues.

    Thanks

  62. Simon says:

    The blue background on the menu comes from this:

    .link_list li a {
        background: url("../image/m_arrow.gif") no-repeat scroll 97% center transparent;
        display: block;
        font-size: 1.2em;
        padding: 0.5em 0 0.5em 0.5em;
        text-align: left;
        text-decoration: none;
    }

    Looks like you might have two slideshows modules set up there. I’d start by making sure you have this set correctly on admin.

  63. Michael says:

    Thank you Simon, you are a true gentleman and GOD!! I solved the double slideshow problem and got the menu background the way that works for us.

    1 major change we made was with the addthis social share feature. We updated the script from the old js/250 to the js/300.

    Made sharing our products 100% faster and easier.

    Thank you very much.

  64. Tom says:

    Hi Simon… your tutorial has been of great help, Thank you!

    I have a problem: I have two separate domains running off the same database. Both domains are using the same database username and password. But the store information for both the domain overlaps. If I change the logo for one the other reflects the change too. The same goes for store name, address, etc. How can I have one database and run two stores off it with completely different identity info and images (like logo).

    I would appreciate your help.

    Thanks,
    Tom

  65. Simon says:

    Tom
    Have you created two separate stores within Opencart? Once this is done you should be able to separately edit the logo, and if using OC1.5.x, the store address as well.

  66. qasim says:

    i have created a subdomain test.quickdubai.com and given the folder or diectory as root where my main store exist but i am unable to access that subdomain . how mauch time is required for a sub domain to b active

  67. Simon says:

    I’d expect it to be OK in a couple of hours normally. If it’s still not working looks like something’s wrong with the setup.

  68. Marc says:

    hi,

    wondering how I can get the last module gonna work on my 5 different multi-store?
    I’m trying to fix that go to setting> Design> Layout and select Default adds all my subdomain multi store but the problem is that only 2 multi-store may last module that works,
    three other multi-store so it does not work?

    where is the problem?
    should I create laste module each store?
    or do I have different themes for each store?
    why do not the main domain running laste modules on subdomains?
    module should work all the multi-store
    Can you help me,,

  69. Simon says:

    I’m not sure exactly what you’re saying here. I think you’re saying that you want to use a module (Latest?) on different stores on a multi store setup. I think you’re saying it doesn’t appear on three sites. If so check that the theme supports the module, perhaps by changing the theme on a store where the module fails to a theme where it works. Does the store where the module fails have any valid products? These are things to try first. If I’ve misunderstood have another go at explaining the problem.

  70. imam says:

    hello, i just installed and work perfectly, but i lost some thing. how to get search box? please help this thing thank you

  71. Simon says:

    Um, what’s working perfectly? Multiple stores?

  72. Toni says:

    I have done as said. but the multi store directory is empty. Am i to upload some files to the directory or this is meant to happen automatically once I insert a new store?

  73. Simon says:

    You should only have a single set of files. Both stores will use the same files and database – assuming that both domains are running on the same hosting.

  74. Toni says:

    Can you please send me an email. will like to share with you what I have here. Also is there an extension or module i am to install for this to work properly?

  75. Simon says:

    You can send a private message via the contact page if you want. Multistore does not need any additional extensions.

  76. Simon says:

    Either you have an error with how you have the subdomain set up in cPanel, or your secondary store is not set up correctly in Opencart. I’d guess the former.

  77. Toni says:

    I have followed it to the letter. Create sub domain. copy file path, insert new store… fill in all necessary content then save. it isn’t just working

  78. Simon says:

    OK, well, there’s something not right. I can’t tell anything just from seeing the site. You say subdomain, but the links you sent are subfolders, not subdomains. To offer more help I’d need to see your cPanel and OC settings.

  79. Annemiek says:

    Does anybody know, whether it is possible to apply multiple sizes for one product by using the multistore feature? This is often the case in the clothing industry, where multiple sizes are given for each location/country. THANKS!

  80. Simon says:

    There’s no way of setting an option by store, no. The only way of doing this out of the box would be to create two different products.

  81. Smritimay Debnath says:

    Hello, I got this error when I open my store –

    “Forbidden
    You don’t have permission to access / on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”

    What should I do?

  82. Simon says:

    Impossible to tell really, but that sounds more like a server issue than anything with Opencart.

  83. Smritimay Debnath says:

    Sir, I think you didn’t get my problem. I give you details of that error. I have one main domain, like “abc.co” and I create one subdomain, like “watches.abc.co”. so “abc.co” is working correctly but when I open “watches.abc.co” at that time it gives that error.
    please help me…

  84. Simon says:

    As I said, something wrong at the server end, possibly you haven’t set up the subdomain correctly.

  85. Smritimay Debnath says:

    can I use “http://watches.abc.co/” instead of “http://abc.co/watches/”?

  86. Smritimay Debnath says:

    If I create a subdomain, like watches.abc.co then is the server automatically create the folder called watches or not?

  87. Simon says:

    No, you have to set the folder manually. But for an additional store the folder should be the same as your main store, as described above.

  88. Smritimay Debnath says:

    then how to link with “watches” folder with the opencart?

  89. Simon says:

    You should not have a watches folder. The watches subdomain should be pointed at your main opencart folder, as described here.

  90. Smritimay Debnath says:

    sir, if I change the extension name of “.htaccess.txt” to “.htaccess”, then the website shows “page not found”. what should be there means “.htaccess.txt” or “.htaccess”?

  91. Simon says:

    It should be .htaccess. I can only guess, but it sounds like you have something wrong in your .htaccess file which is redirecting to a page that doesn’t exist.

  92. Smritimay Debnath says:

    what should be the change in the .htaccess file. can u tell me please

  93. Simon says:

    Can’t answer that without knowing how your server is set up. I suggest, if you are having problems, deleting the entire contents, then disabling and re-enabling SEO URLs in OC.

  94. Peter says:

    Thanks for this very helpful work. Like Smritimay I have the same challenge. At the end it does not help, disabling and re-enabling the SEO URL in OC. My setup uses a separate domain, which points to OC. This works great. But as soon as seo is activated the message “INTERNAL SERVER ERROR” appears. I tried to copy the htaccess file to the new URL folder. But this did not work as well. I would be grateful if anyone could help.

  95. Simon says:

    With what version of OC are you experiencing this?

  96. Peter says:

    Hi Simon, thanks for your answer. This is experienced on 1.5.6.4.

  97. Simon says:

    This sounds like it could be a server issue to me. Did you rename .htaccess.txt to .htaccess as per OC instructions? The content of your .htaccess should look something like the code below. If you do not have your store installed in the root directory you’ll need to edit the settings.

    # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 
    
    # 2. In your opencart directory rename htaccess.txt to .htaccess.
    
    # For any support issues please visit: http://www.opencart.com
    
    Options +FollowSymlinks
    
    # Prevent Directoy listing 
    Options -Indexes
    
    # Prevent Direct Access to files
    <FilesMatch "\.(tpl|ini|log)">
     Order deny,allow
     Deny from all
    </FilesMatch>
    
    # SEO URL Settings
    RewriteEngine On
    # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 
    
    RewriteBase /
    RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
    RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
    RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
    RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
    
    ### Additional Settings that may need to be enabled for some servers 
    ### Uncomment the commands by removing the # sign in front of it.
    ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
    
    # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
    # php_flag register_globals off
    
    # 2. If your cart has magic quotes enabled, This may work to disable it:
    # php_flag magic_quotes_gpc Off
    
    # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
    # php_value upload_max_filesize 999M
    
    # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
    # php_value post_max_size 999M
    
    # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
    # php_value max_execution_time 200
    
    # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
    # php_value max_input_time 200
    
    # 7. disable open_basedir limitations
    # php_admin_value open_basedir none
  98. Peter says:

    Hello Simon,
    the htaccess is in use. It’s pointing to the correct shop. The interesting thing is that if I switch off SEO in OC than the both shops work (but not with SEO links). If I switch SEO on again then the default shops works with SEO links and the error message appears on frontend of the other shop.

  99. Peter says:

    Hi Simon,
    searching through the web a found a hint, which propose to solve the issue with a change in the htaccess file by:
    # Activation of the URL Rewriting
    Options +FollowSymlinks
    RewriteEngine On

    # RewriteBase equivalent – Production
    RewriteCond %{HTTP_HOST} !^localhost$
    RewriteRule . – [E=REWRITEBASE:/production/path/]

    # RewriteBase equivalent – Development
    RewriteCond %{HTTP_HOST} ^localhost$
    RewriteRule . – [E=REWRITEBASE:/development/path/]

    # Rewriting
    RewriteRule ^(.*)$ %{ENV:REWRITEBASE}index.php?page=$1 [L]

    Hopefully you can judge this better then me.
    My setup up is:

    default URL goes to httpdocs/shop by redirection in index.html.

    the second URL (not subdomain) goes directly into /shop.

    The reason why I’m not using the same redirection on 2nd URL is because OC would ignore the second template:
    – with server pointing the second URL to /shop the correct template is used
    – with server pointing the second URL to httpdocs/ plus redirection via index.html the template of the default URL is used.

    So an idea could be to work with the proposal, mentioned above.
    But as I’m not really an expert in this, I would appreciate if you could judge this method and of it would work as per your opinion to share how I should set this up in the htaccess file, used under /shop.

    Thank you very much in advance for your kind support.

  100. Simon says:

    Hi Peter
    It’s very hard to comment on this without fully understanding the setup – but the redirection you mention on you default shop puzzles me. Why is the default store not just going to /shop? I wonder if this is the source of the problem. I’ve never had an issue along the lines you describe across multiple OC implementations so am not familiar with the proposed .htaccess changes.

  101. brandon wong says:

    i have created a subdomain mobile.abc.com as mobile website,and it work normal, but i wish to m.abc.com CNAME mobile.abc.com, because of using google pagespeed, but end up m.abc.com route to m.abc.com/cgi-sys/defaultwebpage.cgi is a cpanel welcome page,
    anything or step went wrong here?

  102. Simon says:

    I’ve not come across using CNAME in this way, so not sure why it’s not working. Not sure I understand why you don’t just set the subdomain up as m.abc.com.

  103. brandon wong says:

    hi,simon
    if i use google pagespeed then consider is using google CDN to speed up website loading time,
    architecture is something like this,
    visitor—> m.abc.com—> CDN.google.com—->mobile.abc.com
    so if my server location in China, customer from US may feel slow to visit my site if direct visit from mobile.abc.com,if i using CNAME google CDN may load in a sec.

  104. Simon says:

    I still don’t understand the need for two separate subdomains – don’t think I can help you here.

  105. brandon wong says:

    hi,simon
    currently access to my domain abc.com will route to http://www.abc.com,
    but after adding mobile.abc.com also redirect to http://www.mobile.abc.com,
    i know something wrong with htaccess code,
    can you show us, abc.com—->www.abc.com, mobile.abc.com not make any changes

  106. Simon says:

    Like I said, I’ve never done this with CNAME changes, so cannot offer any suggestion.

  107. Aliza says:

    Hi,
    I need to know how can i assign specific products only to specific store, in order to buy them only in the store the product is assigned. a i already did it through products>links> store, but buying in different stores, with different currencies, it shows all the products bought in all stores and in the $ default currency,
    some of the products can not be found in another store/country , I beleive there is a code to install,
    can you pleaseee help?
    tnx

  108. brandon wong says:

    hi, simon,
    second post is regarding .htAccess
    is not regarding CNAME,
    sorry for confusing you, just dont know how to from a non www to www only.. many thanks

  109. Simon says:

    That should work properly in the way you describe. I’ve never come across that problem. If you have any extensions installed I would disable them first and see if that fixes the issue.

  110. Simon says:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^simonbattersby.com$
    RewriteRule ^(.*)$ http://www.simonbattersby.com/$1 [R=301,L]
  111. Bob says:

    Hi Simon, I have an existing domain http://www.dhustone.com and I’m trying to set up a back office multi domain from this one to http://www.boots2bodyarmour.com on a different host. I have read your earlier comments on uploading the OC installation files on the new domain which I’ve done but, I just get a 500 internal server error when trying to view the new site. Do I actually need to run the OC installation itself and somehow point to the existing dhustone database on the other hosting company’s site?

  112. Simon says:

    Hi Bob – how are you? We spoke last November. What you’re trying to do is a bit messy but possible. You need to duplicate your file system on both hosting servers, and the new server needs to use the database set on the old server in the config.php files. You may also, depending on your server setup, need to grant access for the new domain to access your existing database (e.g. via RemoteMySQL in your control panel).

    All that said, you may run into performance issues with your database running across multiple hosting – approach with caution.

  113. Bob says:

    Thanks Simon. Would you then say it might be better to run say install an alias of the first domain http://boots2bodyarmour.dhustone.com/ which would then show as boots2bodyarmour.dhustone.com/ in a browser and re-direct the http://www.boots2bodyarmourcom domain itself to the above one?

  114. Simon says:

    If you’re going to do that a better solution would be to add the new domain to your existing hosting (assuming it’ll allow it) and then you can have both domains sharing the same server and database.

    With this approach you may run into issues if you want an SSL cert on both domains (but the same applies with your redirect solution as well) – since usually shared hosting will only support a single cert. I’ve got round this before now by having two separate hosting accounts but on the same physical server.

  115. Rainer Appel says:

    Hi Simon,

    Thanks for this interesting article.
    I’m facing a special “multi-store” situation and was wondering if there is a best method:
    I have two stores: one store (store1) on domain1.com and another store (store2) on domain2.com.
    To make things worse store1 uses OC v1.5.5.1 and Shoppica2 theme, and store2 OC v2.x and Journal2.
    From what I learned (please correct me, if I’m wrong) there is no way to run both stores as multi-stores, since they use different OC versions and hence different databases.
    Also, even though both stores have the same products, they display completely different product descriptions.
    Perhaps you know if there is a tool or OC mod that can synchronize the product quantity and invoice number counters among the two databases!?

    Example: If someone orders in either of the two stores it should update a common inventory counter and increase also a common invoice number by 1.

    Thanks for any help or guidance in this regard.

  116. Simon says:

    You are right, too much difference between OC1.5 and OC2 to even contemplate trying to get them to work together.

    I’m not aware of a mod that would sync the two, but I don’t think it’d be that difficult to write a bit of code on one of the installations that would update the other one in the two instances you describe.

  117. brandon says:

    Hi Simon,

    Thanks for this interesting article.
    I’m facing a special “multi-store” session and was wondering if there is a best method:
    I have two stores: one store (store1) on abc.com and another store (store2) on m.abc.com.
    To make things worse when i log in to store1 add something into basket, and go to store2 it look like need to re-login and item in basket no longer there.
    From what I learned (please correct me, if I’m wrong) there can be run both stores as multi-stores with sharing same session, can i know how to get this done

    Thanks for any help or guidance in this regard.

  118. Simon says:

    Don’t know to be honest, I’ve never had the need to do this. Have a search on stackoverflow – there are multiple discussions on this subject there.

  119. Bob says:

    Hi again Simon, so I’ve set up another domain countryclothing.org as the main domain and on the same host bonartcountryclothing.com but, when I look at the second store I just see the hosting companies wall, it does not show the default store or anything else? I have put http://www.bonartcountryclothing.com/ into the store url in settings for the second store. Any ideas why it should not show please? There are no files loaded into the second stores domain at all.

Useful? Interesting? Leave me a comment

I've yet to find a way of allowing code snippets to be pasted into Wordpress comments - so if you're trying to do this you'd be better off using the contact form.