Magento static block issue in 1.9.2.2 - magento

I just have upgraded my store to latest CE 1.9.2.2 and my static blocks called on home page are not more there.
I tried both ways to implement but in vain.
1) In home page layout update section
<reference name="content">
<block type="catalog/product_list" name="home-popular" template="catalog/product/popular_list.phtml">
<action method="setCategoryId"><category_id>2</category_id></action>
</block>
</reference>
2) In cms content area
{{block type="catalog/product_list" category_id="2" template="catalog/product/popular_list.phtml"}}
I remember we had block cache issue in 1.9.1.x
can you please guide me what could be the issue?

I had the same problem. In that new version the block include in CMS is blocked. You have to set permissions first. That is very very annoying especially if that is your AGB for block for example. You can fix that problem when you go to
System -> Permissions -> Blocks
There you add a new entry named cms/block and set them to Allowed. Then you get your blocks back.

Add catalog/product_list to the System -> Permissions -> Blocks
Block name: catalog/product_list
is Allowed: yes

Related

magento How to add a block to the bundled product page

I am a newcomer to magento. During the learning process, I want to know how to add a block to the bundled product page. The piece of information I found through google doesn't know what to do with it.
It depends on where you want to put it, and I am assuming that you have a theme setup with a local.xml file, but you could also add that part in the product's edit page in Admin->Manage Products->Edit Product->Design->Custom Layout Update.
The xml, added in app/design/frontend/[your-theme]/[your-subtheme]/layout/local.xml
<PRODUCT_TYPE_bundle>
<reference name="content">
<block name="yourtheme_yoursubtheme_nameofblock" type="core/text" template="path/to/your/template.phtml" />
</reference>
</PRODUCT_TYPE_bundle>
This will add the output of app/design/frontend/[your-theme]/[your-subtheme]/template/path/to/your/template.phtml at the bottom of every bundle-type product page. You may want to read up on Magento Layout XML

Magento CE 1.7.0.2: some methods do not work only when the cache is enabled on footer.phtml

Magento Cache Enabled: methods like Mage::getBlockSingleton('page/html_header')->getIsHomePage(), among others, do not work only when the cache enabled on footer.phtml
No they wont as the phtml of the footer will cache as a block. You should either nest blocks within it in your page.xml which will not cache - such as cart_sidebar for example, or if you are targeting the home page only, then in admin go to the home page cms, go to layout updates and add the block there;
<reference name="footer">
<block type="your/block" name="yourblock" template="path/to/block.phtml" before="-" />
</reference>

Disable content of leftside column in magento

I am using magento 1.8.1. i want left side column on customer account page, but when i enable it, all the content of left column is shown here. i want only account related content on this page, but when i disable other content it is disable from other pages also.
so please tell me how to disable unnecessary content left side column for account page only.
This section is created from yourtheme/layout files..
So, go to xml files and comment or remove code..
That should help.
for shop by brand go to app/design/frontend/yourpackage/yourtheme/layout/manufacturer.xml file and comment below code bydefault this file in app/design/frontend/base/default/layout/manufacturer.xml
so if you find this file in your base directory pls copy this into your theme so dont face any problem at the time of magento up-gradation
<block type="manufacturer/navigation" name="manufacturer.navigation.left" after="sidenav">
<action method="setTemplate" ifconfig="manufacturer/sidebar/enabledleft">
<template>manufacturer/navigation/brands_nav.phtml</template>
</action>
</block>
for remove from account page go to customer.xml file and add this code
<reference name="left"> <remove name="manufacturer.navigation.left"/> </reference>

Magento - changes to template file not showing up - /customer/form/register.phml

I'm making some changes to /customer/form/register.phml but they are not showing up in the frontend. Changes that I made to login.phtml and forgotpassword.phtml do show up.
I checked if magento was using a fallback from the base/default theme but it's not. I deleted register.phtml in both my theme and in the base/default theme to check what would happen: the page showed up just fine (without the changes of course).
I looks like magento gets the file from somewhere else (maybe the core). I've got no idea on how to solve this.
Thanks in advance for your help.
My Customer.xml file looks like this, I'm using magento 1.5.1
<customer_account_create translate="label">
<label>Customer Account Registration Form</label>
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
<label>Form Fields Before</label>
</block>
</block>
</reference>
</customer_account_create>
The best way to debug this - is to turn on template path hints.
You probably need to edit template/persistent/customer/form/register.phtml.
Yes i agree with WebFlake turn on template hints that will let you know which template file the form is being pulled from, most likely you are modifying the wrong template.
Here is a link which explains how to turn on template hints: http://vimeo.com/1067069
Use the template hints. Also, with any phtml changes you make, make sure that you have caching disabled, and flush all caches (System -> Cache Management).
I used template hints and discovered a plugin replaced the file. Enabling template hints: http://vimeo.com/1067069 helped a lot

Newsletter Signup on CMS page in Magento

How can I add Magento's default newsletter signup module within a CMS page? Thanks
found it.
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
The mentioned code adds a signup form to a CMS page, but it was non-working for me.
Changing the block type to newsletter/subscribe fixed that. So working code for me was:
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
Real answer has been added already,
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
but it does not work for some people (on newer versions of Magento). The reason for this, most likely, are block permissions.
The block (newsletter/subscribe) is not allowed on frontend by default. Go to
System > Permissions > Blocks
and enable it.
Use this in the layout update section of the specific page you want to change.
<reference name="right">
<block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"/>
</reference>
My configurations
Check out the image attached above, it worked for me.
I went to home page's design tab, and added those lines in "Page Layout".
<block type="newsletter/subscribe" name="home.footer.newsletter" template="newsletter/subscribe-mini.phtml" />
as you can see those lines in the image too.

Resources