0

We have a multistore system with several websites and storeviews in different languages.

The storeview name (from Manage Stores) is used for language switcher label and also for manage attributes section.

Since we dont want to use any "fake names" our store names are not unique and manage attributes page looks like:

enter image description here

So our product management does not know which column belongs to which store/website.

Any ideas how to solve it?

1

You could use something like below to get the website name and echo this under the store view to determine which site is which. The section that would need modifying is on line 53 of the options.phtml which could be overridden in a custom admin theme. Original file:

app/design/adminhtml/default/default/template/eav/attribute/options.phtml

Modify the for each loop for store views to include website name like below:

<?php foreach ($this->getStores() as $_store): ?>
    <th><?php echo $_store->getName();  ?>
    <?php $website = Mage::getModel('core/website')->load($_store->getWebsiteId()); ?>
    <?php echo $website->getName(); ?>
    </th>
<?php endforeach; ?>

This is assuming that website names are different however you could use the website id's instead to determine which is which also.

  • Thanks for reply. It is working, but I'm not soo happy using load for 20 storeviews - and this two times (titles and options). – sv3n Jul 26 '17 at 9:21
  • Yeah it's not the most efficient i tried doing it without but from looking at the array that was returned for store the only data that was there was the website ID so couldn't get the website name without modifying the block class. – harri Jul 26 '17 at 9:34
  • I've no problem with changing block class in this case - since it seem to be a "bug" (not really, it's no good designed for multistores), but if I change a core class, I want to do it the "best" way :) At this point I've stopped thinking about it and just asked this question :) – sv3n Jul 26 '17 at 9:42
  • Ha your prob talking to the wrong guy for the "best way" :P i had a look at the class and only way i could think to do it was basically the same just in the block code. Wish i could think of the best way tho! – harri Jul 26 '17 at 10:09

Your Answer

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

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