Cookie restriction notice in header instead of footer

3.6k views Asked by At

I'm looking for a solution for our web shop. We're using the Magento RWD default theme on our site/webshop (www.jessicaglassart.nl). As in the users guide of Magento version 1.9, the cookie restriction mode notice is shown on the bottom of the page (I unfortunately cannot place a picture due to my lack of reputation).

However, I want this restriction notice in the header. Can someone please tell me how to fix that? And, if changing the picture in the message is easy, can someone also tell me how I change the picture?

2

There are 2 answers

0
Krys Kros On

my dirty way in 1.9 :

go to /public_html/app/design/frontend/rwd/default/layout/page.xml comment line 158 (in my case) then copy and move this block :

<block type="page/html_cookieNotice" name="global_cookie_notice" as ="global_cookie_notice" template="page/html/cookienotice.phtml" before="-" />

underneath line 91 (in my case) where is :

<label>Page Top</label>

Works for me and this could solve problem with no tracking hits in Google analytics's - people see message on the top than click to agree, who scroll to the bottom of page those days? Have done test on heat map of our wheel shop less than 2% of visitors go to footer.

0
Krt_Malta On

The proper way of moving the notice to the header is by placing the following in a layout xml file (e.g. local.xml in a custom theme)

<default>
    <reference name="before_body_end">
        <action method="unsetChild">
            <alias>global_cookie_notice</alias>
        </action>
    </reference>
    <reference name="after_body_start">
        <action method="insert">
            <block>global_cookie_notice</block>
        </action>
    </reference>
</default>

To change the picture, you would need to do that using custom CSS since the demo image is place through CSS.