1

I am trying to figure out these multi store in sub directories deal. I am using version 1.8.1.

Here is what one of my sub-stores looks like: http://hypeforce.com/lab/shirts/ I feel like I am getting close but for some reason its not picking up on the formatting.

The edits I made to the subdir index.php were:

$mageFilename = MAGENTO_ROOT . '/../app/Mage.php';

and

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'shirts1';

^^ That was for my sub store code

I am not sure what else to post. I did all the steps outlined here: http://www.templatemonster.com/help/magento-how-to-set-up-and-manage-multiple-stores.html

Please help! I am even willing to send some paypal bucks to understand why this is happening so I don't do this moving forward.

2 Answers 2

1

Once you've set your different store views in System > Manage stores, go to System > Configuration > Design. There switch between each store views using the scope select on the left.

You will have to enter your interface name (eg : mycompany), and then in the "Themes" tab, untick "Use default value" for the field "By default", and enter the name of your folder (eg: myviewname). Save and go to your FTP.

app/design/

There you'll have to go to app/design/frontend/, create a folder named after your interface name (here : mycompany), go in that folder and create another folder name after your default design name (here : myviewname). Then go in that folder and create 3 folders (etc, layout and template).

You will be able to override template folders by copying the exact structure if the files into your "myviewname" folder (from app/design/frontend/base/default/template/).

When Magento is unable to find a template in your custom defined folders, it will look into the base folder (app/design/frontend/base/default/template/).

skin/

Do the same thing for the skin/ folder. Create the same base structure (skin/frontend/mycompany/myviewname/ and copy/paste the files from skin/frontend/base/default. This is where you will put your custom CSS's, which you should call in your app/design/frontend/mycompany/myviewname/layout/page.xml 's header section.

3
  • ok so I tried that, but it still did not work for me. I may be doing something wrong though. So my subdir site is called "shirts" with storecode of "shirts1" - so when I go to app/design/frontend am I making it /app/design/frontend/shirts/shirts ? or just one level? After that, am I copying the existing contents of app/design/frontend/base/default/template to my newly created folders?
    – Devilry
    Aug 26, 2014 at 14:08
  • just read it again, I thin I made it pretty clear. I don't think it's clever to name the subdirectory the same way you named its parent though ;) it is explained in my 2nd § Aug 26, 2014 at 14:49
  • Well, this still doesn't work and I have been at it for HOURS. I think lots of folks are basing their directions on an older version of magento - every option I come across is drastically different.
    – Devilry
    Aug 26, 2014 at 20:42
1

You need to setup the symbolic links to your skin, templates, var etc. A symbolic link is a pointer to another file or directory. It can be used just like the original file or directory.

You would accomplish this via SSH as seen below.

ln -s /home/example/example.com/html/app/ /home/example/example.com/html/secondarydir/app ln -s /home/example/example.com/html/includes/ /home/example/example.com/html/secondarydir/includes ln -s /home/example/example.com/html/js/ /home/example/example.com/html/secondarydir/js ln -s /home/example/example.com/html/lib/ /home/example/example.com/html/secondarydir/lib ln -s /home/example/example.com/html/media/ /home/example/example.com/html/secondarydir/media ln -s /home/example/example.com/html/skin/ /home/example/example.com/html/secondarydir/skin ln -s /home/example/example.com/html/var/ /home/example/example.com/html/secondarydir/var

More information on setting up multiple store fronts can be found at http://www.ecommercegorilla.com/how-to-set-up-multiple-store-fronts-with-magento/

Quick edit because I see the code is wrapping, an example of the link would be as below: ln -s /from/direcotry/var/ /to/directory/var

2
  • Would that process via SSH be necessary if I am having subdirectory stores on the same domain?
    – Devilry
    Aug 26, 2014 at 14:15
  • The symbolic links just ensure that you don't have to place additional copies of those folders/files inside the subdirectory. This way, when you make a modification to the main store/theme it will be automatically present in any of your secondary stores using the same template/skin.
    – Eirik
    Aug 26, 2014 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.