Magento block and reference, problem with showing block in Magento phtml

15 pts.
Tags:
PHP
Web development
Hi, I am stuck with following issue. I want show product_viewed block (recently viewed products - magento block) at specific position on my front page (templates/page/mylayout.phtml). Look at code snippets of page.xml, catalog.xml and mylayout.phtml Header and footer and other magento blocks are showing right. But problem is only with showing product_viewed block - no html code load. What I am doing wrong ? Why
<?php echo $this->getChildHtml('product_viewed') ?>
doesnt return any code ? When block hints are turned on, there is no block hint for product_viewed block (look at picture). Why ? page.xml (snippet):
<block type="page/html_header" name="header" as="header"></block>
<block type="reports/product_viewed" name="product_viewed" as="product_viewed"  template="reports/product_viewed.phtml"/>
catalog.xml (snippet):
<reference name="product_viewed">
     <block type="reports/product_viewed" name="product_viewed" template="reports/product_viewed.phtml"/>
</reference>
browser page source code of template Thanks you for any help!

Answer Wiki

Thanks. We'll let you know when a new response is added.

I have this problem, any help ??

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • MichalDrozd
    Hi i fixed it yet I just edited magetno code, there was condition which prevented showing block
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following