0

I use Magento 1.9.3 and I would like to show all product tags on the start page.

Can somebody tell me the code I need to use and where I need to put in the code when I want to have the tag cloud shown in the footer of the start page? Tag Cloud

Thank You very much.

1 Answer 1

0

Use below code for get all tags on any page:

 $model = Mage::getModel('tag/tag');
  $TaGCollection= $model->getResourceCollection()
            ->addPopularity()
            ->addStatusFilter($model->getApprovedStatus())
            ->setFlag('relation', true)
            ->addStoreFilter(Mage::app()->getStore()->getId())
            ->setActiveFilter()
            ->load();

  $Tags=$TaGCollection->getItems();

  if(count($Tags)):
  foreach ($Tags as $tag) 
  {
       echo  $tag->getTaggedProductsUrl();
       echo $tag->getName();
  }
  endif;

Reference link: Display product tags in a category page

4
  • I saw this post already but this didn't work for me.
    – Moppelfett
    Commented Apr 7, 2018 at 14:46
  • This code generates a link. What I want is the Tag Cloud itself right on the frontpage in the footer.
    – Moppelfett
    Commented Apr 7, 2018 at 15:07
  • As per your question you want the tag display on homepage. Can you explain your question in detail? so i can get idea what you want. Commented Apr 9, 2018 at 5:04
  • Thanks for answering. I want to place the tag cloud as seen on the image at the footer of the magento start page. Your first code just generates a link to the tag cloud but I want the tag cloud itself been shown on the footer of the start page.
    – Moppelfett
    Commented Apr 9, 2018 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.