Monday, 26 October 2015

Display associated posts on a Magento Product page

<?php echo $this->getLayout()
        ->createBlock('wordpress/post_associated')
            ->setTemplate("wordpress/post/associated.phtml")
            ->setTitle('Related Blog Posts')
            ->setEntity('product')
            ->setCount(5)
            ->toHtml() ?>
 Display associated products on a blog post page

                        <?php echo $this->getLayout()
    ->createBlock('wordpress/post_associated_products')
        ->setTemplate('wordpress/post/associated/products.phtml')
        ->setTitle('Related Products')
        ->toHtml() ?>

1 comment: