Dustin
Total Posts: 118
Joined: 2008-03-13
Columbus, OH
I have multiple stores and I am trying to create a general footer that can be used across all of them.
What I need to do is get the current store name.
In the footer there will be “About StoreNameHere” and “Copyright 2008 StoreNameHere”
What function would I call to get this to work?
Thanks for any help.
Posted: May 13 2008
| top
Yoke Lee
Total Posts: 71
Joined: 2008-05-08
China
Have you tried CMS Static Block ?
If you installed the data sample, there’s “footer link” block there…
Signature
Hope it helps ! And please share with us if it is ! Thanks.
Posted: May 14 2008
| top
| # 1
Dustin
Total Posts: 118
Joined: 2008-03-13
Columbus, OH
Yoke Lee - 14 May 2008 12:59 AM
Have you tried CMS Static Block ?
If you installed the data sample, there’s “footer link” block there…
I can use that, but that still does not solve the problem of one general footer.
If I have Website A and Website B, I would still need to create a static block for each website. That is what I am trying to avoid.
I just need to find a function call that will return the current store name to dynamically change the footer per website.
Posted: May 14 2008
| top
| # 2
Dustin
Total Posts: 118
Joined: 2008-03-13
Columbus, OH
I have tried putting this in the footer: $this-getName();
This does not return anything though.
Is that not supposed to return the store name?
Posted: May 15 2008
| top
| # 3
[m] zentrale
Total Posts: 401
Joined: 2007-12-06
Stuttgart, Germany
Hi,
block of page head /app/code/core/Mage/Page/Block/Html/Head.php is using this function to load title of store:
public function getDefaultTitle () { return Mage :: getStoreConfig ( 'design/head/default_title' ); }
So you can create on Module with a special Block for printing your footer information.
Cheers
Stefan
Signature
Account-User: S. Bothner & A. Jaus
[m] zentrale | InternetAgentur Stuttgart & München
Agentur für Beratung, Entwicklung & Marketing.
Magento™ Silver Partner & Community Pro Member
----
Ich habe Visionen - muss ich jetzt zum Arzt?
Posted: May 15 2008
| top
| # 4
[m] zentrale
Total Posts: 401
Joined: 2007-12-06
Stuttgart, Germany
Hi,
i also tired it this way: Add following Code to a view/phtml file and it prints the store name:
<?php echo Mage :: getStoreConfig ( 'design/head/default_title' ) ?>
Cheers
Stefan
Signature
Account-User: S. Bothner & A. Jaus
[m] zentrale | InternetAgentur Stuttgart & München
Agentur für Beratung, Entwicklung & Marketing.
Magento™ Silver Partner & Community Pro Member
----
Ich habe Visionen - muss ich jetzt zum Arzt?
Posted: May 15 2008
| top
| # 5
Yoke Lee
Total Posts: 71
Joined: 2008-05-08
China
Hi Stefan,
I tried your code, and it prints “Magento Commerce”, while my Store name is “Main Store”
How could this be?
I’m lost.
Signature
Hope it helps ! And please share with us if it is ! Thanks.
Posted: May 16 2008
| top
| # 6
[m] zentrale
Total Posts: 401
Joined: 2007-12-06
Stuttgart, Germany
Hi,
please try this query in your DB
SELECT * FROM ` core_config_data ` WHERE ` path ` = 'design/head/default_title' LIMIT 0 , 30
Cheers
Signature
Account-User: S. Bothner & A. Jaus
[m] zentrale | InternetAgentur Stuttgart & München
Agentur für Beratung, Entwicklung & Marketing.
Magento™ Silver Partner & Community Pro Member
----
Ich habe Visionen - muss ich jetzt zum Arzt?
Posted: May 16 2008
| top
| # 7
[m] zentrale
Total Posts: 401
Joined: 2007-12-06
Stuttgart, Germany
Hi,
go to configuration->design->html head and change standard title. This string is taken by this method
Not the store name is taken instead page title of website configuration. Sorry, i was wrong in my prior thread
cheers
Stefan
Signature
Account-User: S. Bothner & A. Jaus
[m] zentrale | InternetAgentur Stuttgart & München
Agentur für Beratung, Entwicklung & Marketing.
Magento™ Silver Partner & Community Pro Member
----
Ich habe Visionen - muss ich jetzt zum Arzt?
Posted: May 16 2008
| top
| # 8
Yoke Lee
Total Posts: 71
Joined: 2008-05-08
China
Returns empty result set a.k.a. zero rows
what does this suppose to mean?
About the HTML Head… ==> it’s not the store name isn’t it ? it’s just the title in HTML head…
Thank you very much for helping me.
Signature
Hope it helps ! And please share with us if it is ! Thanks.
Posted: May 16 2008
| top
| # 9
[m] zentrale
Total Posts: 401
Joined: 2007-12-06
Stuttgart, Germany
Hi,
yes right, its the standard html head. you can configure that for multible stores in configuration->design->html
Cheers
Stefan
Signature
Account-User: S. Bothner & A. Jaus
[m] zentrale | InternetAgentur Stuttgart & München
Agentur für Beratung, Entwicklung & Marketing.
Magento™ Silver Partner & Community Pro Member
----
Ich habe Visionen - muss ich jetzt zum Arzt?
Yoke Lee
Total Posts: 71
Joined: 2008-05-08
China
Thanks,
but what i need is the store name.
which is “Main Store”.
Wonder if you can help me.
Signature
Hope it helps ! And please share with us if it is ! Thanks.
[m] zentrale
Total Posts: 401
Joined: 2007-12-06
Stuttgart, Germany
Hi,
you can load store with this code. But you have to set the stroeid in load(). At the moment i dont know how else you can load name of current used store in frontend.
Mage :: getModel ( 'core/store' )-> load ( 1 )-> getName ();
Cheers
Signature
Account-User: S. Bothner & A. Jaus
[m] zentrale | InternetAgentur Stuttgart & München
Agentur für Beratung, Entwicklung & Marketing.
Magento™ Silver Partner & Community Pro Member
----
Ich habe Visionen - muss ich jetzt zum Arzt?
Yoke Lee
Total Posts: 71
Joined: 2008-05-08
China
I see. I’ll give it a try on Monday.
I’m faraway from my working computer now.
I’ll tell you the results soon.
Thank you !
Signature
Hope it helps ! And please share with us if it is ! Thanks.
Lance Monotone
Total Posts: 57
Joined: 2008-04-16
North Adams, MA. 01247
I found that the CMS pages were not displaying the store title as set in System -> Manage Stores -> Store View Name -> Name . Instead they would display only the page title, i.e., ’Home page ‘, instead of ’Home page - Store Name ‘.
I fixed this in ’app\code\core\Mage\Cms\Block\Page.php ‘ by first copying it to ’app\code\local\Mage\Cms\Block\Page.php ‘.
Then I changed line 65 from
$head -> setTitle ( $page -> getTitle ());
to
$head -> setTitle ( $page -> getTitle () . " - " . (string) Mage :: getStoreConfig ( 'system/store/name' ));