I am trying to add a second StoreView that uses its own theme and is accessible by a custom URL. For some reason however, I can not get changes to the template files to display in the frontend.

This is what I have done:

I added this to my nginx directives:

if ($http_host ~ "(www\.)?domain1\.com") {
        set $MAGE_RUN_CODE "StoreView1";
        set $MAGE_RUN_TYPE "store";
if ($http_host ~ "(www\.)?domain2\.com") {
        set $MAGE_RUN_CODE "StoreView2";
        set $MAGE_RUN_TYPE "store";

I then created a new root category in category management. Within store management I added a new store and storeview to the base website. I assigned my newly created root category to my new Store. Within the web tab, I added a custom URL for the new storeview.

Within the design configuration I set everything back to default for the standard configuration, then selected my old storeview to assign my old theme and then the newly created storeview to add my new theme.

I set my old theme as fallback for the new one in theme.xml.

At first everything seemed to be working great but I soon realized that none of the changes to any of the template files in my new theme are shown in the frontend while changes to my old theme will update after flushing my fpc. I tried disabling all caches and my fpc, flushed redis, restarted php fpm - to no avail.

I checked via template path hints and the correct files from my new theme are being loaded. If I delete one of these template files used by my new theme, that part of the theme will correctly fall back to my first theme. So while a missing file is being recognized, an update to that same file has no effect - how can this be?

I also tried creating a new website instead of just a store but ended up with the same results.

EDIT: I just assigned my old theme to my new storeview, edited a template file of that theme, flushed my cache and opened up both the old store and the new one only to find out that the old store is using the updated template file while no change is present in my new store.

  • To whoever voted this up, maybe it would make sense if we'd share server specs and configuration, magento version, used extensions, etc as obviously this is not the standard behavior... – loeffel Nov 22 '16 at 15:07
  • The only one thing I can imagine in such situation is that somewhere in your code there is an observer which uses controller_action_layout_generate_blocks_before or _after with hard-coded code snippet pointing to your old layout/theme. Also worth to check would be to try to find any event related to the magento layout among your custom modules. – jimmy Dec 1 '16 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.