Cookie restriction notice in header instead of footer - magento

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?

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.

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.

Related

Magento - Change Product Page Layout for only one Product in the define Layout Section

This is for sure a quicky, but nothing i found so far is working.
I would like to set a different product view for a choosen Product only. Not for a category. I tried to add this to the custom layout tab without any luck so far.
I tried any variantions of this:
<reference name="product.info">
<action method="setTemplate"><template>catalog/product/newview.phtml</template></action>
</reference>
But Magento will not read it!
Is there any easy solution to this ? Or maybe how i can get the template added to the layout dropdown in the Design Tab of the Product ? I mean the Tab where you can choose between 1-2 or 3 Columns Layout.
Thank you very much for your help. I am using Magento 1.9.1.
In your local.xml file put the following,
<layout>
...
<PRODUCT_86>
<reference name="root">
<action method="setTemplate"><template>catalog/product/newview.phtml</template></action>
</reference>
</PRODUCT_86>
...
</layout>
Here 86 is a product_id. Flush the cache and then check.
The Solution is quite easy: Make the new File readable by the Webserver.
For what its worth, maybe it helps someone.

How to remove right sidebar in magento 1.9

I installed magento 1.9.
After installed widget and slieshow, my page look like this,
Here i want to remove recently viewed products and compare products.
So i removed in app/design/frontend/modern/layout/catalog.xml ,(these lines i removed)
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
But still stays sidebar.
can anyone help me?
go to magento admin click on cms home page , click on design now select layout 1 column now save and refresh page
To remove from Home Page to to Admin panel CMS/PAGES/Home Page then go to Design Tab there the first option is Layout. Change it to 1 column. SO it will change the layout of (only )Home Page to one column without left and right.
<div class="MagicSlideshow" data-options="width: 400px; height:187px;">
use this code
I just had this same problem, and was able to remove the compare block using xml.
In my situation, I did not want change to a 1-column layout because of what I've already done with the right-col layout.
Solution:
Copy "catalog.xml" from /app/design/frontend/base/default/layout or /app/design/frontend/rwd/default/layout if you're using the new rwd theme.
Go to line 55 and remove or comment out the entire <reference name="right"> block:
<reference name="right">
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
<!--<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">-->
<!--<action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>-->
<!--<action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>-->
<!--</block>-->
</reference>
Go to line 178 (for rwd_default) or 165 (for base_default) and remove or comment out the <customer_account_index> block of code:
<customer_account_index>
<reference name="right">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
Save the file into your custom theme layout folder as "catalog.xml".
You can unset the compare side bar in the layout file of your theme. I added a new file in
/app/design/frontend/myTheme/layout/local.xml
where I unset the compare side bar using:
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<default>
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</default>
</layout>
Don't edit the default files as they will get overwritten on update.

Magento category meta title disappears with custom template

I'm using a Magento template called Bootstrapped (http://bootstrapped.magenthon.com), and am editing this template to fit our needs.
Since our website's navigation is based on (sub-)categories, we use a roadmap to help guide the user through the system.
Therefore, we have edited the main category of our products with the following custom XML:
<!-- Remove Breadcrumbs -->
<reference name="head"><remove name="breadcrumbs" /></reference>
<!-- Set Roadmap template -->
<reference name="content"><reference name="category.products">
<block type="catalog/navigation" name="roadmap" template="alphabase/catalog/roadmap.phtml">
<action method="setData"><name>roadmap_type</name><value>onderdelen</value></action>
<action method="setData"><name>maxlevels</name><value>6</value></action>
</block>
<action method="setTemplate"><template>catalog/category/view.roadmap.phtml</template></action>
<action method="setData"><name>roadmap_type</name><value>onderdelen</value></action>
<action method="setData"><name>per_row</name><value>4</value></action>
<reference name="products.list">
<action method="setData"><name>roadmap_type</name><value>onderdelen</value></action>
</reference>
</reference></reference>
Now when I apply this update, the website's meta title does not show any of the 'breadcrumbs' that the user has followed so far, it only shows the shop's name.
However, when I remove the custom XML, the meta title neatly displays the 'breadcrumbs' in the title, followed by the suffix we have set through the admin panel.
I have compared the original file in /app/design/frontend/package/default/template/catalog/category/view.phtml with the file I am using, but I just can't seem to figure it out.
I would say it has something to do with the Bootstrapped theme I'm using, but then why would it work when I remove this simple custom XML?
Also, the title does change when I set a meta title in the category settings, and it adds the suffix, but it does not show the 'path'. The website also displays my meta description when I set one.
I have also looked at the file in /app/code/core/Mage/Catalog/Block/Category/View.php but nothing's there that would give me a hint on what goes wrong.
Could anyone help me get to the right direction?
EDIT: I have also tried removing the file in templates/page/html/head.phtml from my custom theme, just to see if that does anything wrong, but nothing changed after that, either.
EDIT2: My sub-categories use the parent category settings.
Old question - however I found that the following in general kills meta title
<remove name="breadcrumbs" />
Once you add that to any layout, the meta title returns blank.

Modifying Magento layout for specific pages or extensions without impacting other pages

New to Magento here, looking for advice in making sure I modify the correct files to limit the scope of changes and not run into any issues when updating. I installed the following extension for FAQ function:
http://www.magentocommerce.com/magento-connect/flagbit-faq.html
By default the front end FAQ page was displaying with 2 columns (1 left sidebar showing a product comparison block which was unnecessary on a FAQ page). I found the following file:
/app/design/frontend/base/default/layout/faq.xml
And changed:
<default>
<reference name="root">
<action method="setTemplate"><template>page/page/2columns-left.phtml</template></action>
</reference>
</default>
To:
<default>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</default>
This had the desired result on the FAQ page, but also the undesired result of removing the compare box from the actual product list page. How would I best make the desired change to the FAQ page layout without impacting other pages?
Their module's faq.xml shouldn't be setting that on the default node.
Inspect the page and look for the class on body. It might be something like cms-faq (should say something about faq). Convert the dash - to an underscore _ and use that value in place of default in faq.xml
<cms_faq>
<reference name="root">
....
</cms_faq>
That should make sure the change to the setTemplate action only affects that page.
By setting default there, they are targeting all layout handles, which is really not what they should be doing in a module that just creates a new page.

Magento Cart layout change not sticking

Sorry this is a novice question...
I have changed the layout of my magento cart to popup.html.
i have edited the checkout.xml to use popup.phtml... this is the code i have used in the checkout.xml....
<checkout_cart_index translate="label">
<label>Shopping Cart</label>
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate">
<template>page/popup.phtml</template>
</action>
</reference>
</checkout_cart_index>
The problem is that everything was working fine... but i was making changes on the category page and suddenly the cart has stopped showing layout popup.phtml and has started showing 2 column-left and that too without the cart content.
i was making some changes to catalog.xml ... but cant see how it would override the display of checkout/cart
I have been banging my head around this for couple of hours now... Any suggestions as to where i should look to see whats overriding the popup.phtml completely and just displaying an empty two column layout with left column.
thanks..much appreciate..
The particular file generally does not matter. What matters is the layout update handle, i.e. top level nodes in layout update XML, e.g. default, catalog_category_layered, checkout_onepage_index. It is these which "scope" your layout XML directives.

Resources