2

I added below line in CMS Home Page to display products of a certain category in Magento 1.

{{block type="catalog/product_list" column_count="4" category_id="179" template="catalog/product/list.phtml"}}

Now I can see the products of that category. But I also got a tool-bar as a phtml file (I got this using Template Path Hints). Now I would like to know how can I find which XML file include this phtml file ? I would like to remove that inclusion of phtml file from XML file.

  • A quick tip: If you search for the template path and name you should find the XML file(s) that render this block. You can then manipulate it in your theme. – Ben Crook Mar 28 '17 at 12:18
1
  1. Go to your theme and locate app/design/frontend/ [ your interface name] / [your theme name] /template/catalog/product/list.phtml

  2. Take a copy of this and rename list.phtml to homepage-list.phtml.

  3. Remove this code <?php echo $this->getToolbarHtml() ?> from around line 39 and 131 and save.

  4. Update your CMS home page to this {{block type="catalog/product_list" column_count="4" category_id="179" template="catalog/product/homepage-list.phtml"}}

  5. Refresh your page.

  • Thanks @krishna ijjada for your reply. Yes, you are right. But my intension is little different. How did this toolbar display here ? I think this toolbar is included through a XML file, because when I on the Template Path Hint I got a hint of .phtml file. (Am I right or wrong). I would like to remove that inclusion from that XML file. Thanks – abu abu Nov 28 '16 at 14:30
  • Yeah, you are right, toolbar is adding from catalog.xml, you can remove it by removing toolbar.phtml in the catalog.xml but it will effect product catalog. – Krishna ijjada Nov 28 '16 at 14:44
  • Thanks @krishna ijjada for your wise reply. I removed toolbar.phtml from catalog.xml of current theme and base theme. I also removed toolbar.phtml from catalogsearch.xml of current theme and base theme. But it is still displaying. [1]: i.stack.imgur.com/uu2UJ.png – abu abu Nov 29 '16 at 15:01
  • Ok, find/search toolbar.phtml in catalog.xml. you can find it in multiple places, comment the code and remove the cache, check one more time. Still facing , I am available on stack chatroom. – Krishna ijjada Nov 29 '16 at 15:10
  • I searched toolbar.phtml in catalog.xml and catalogsearch.xml and removed toolbar.phtml from multiple places of those files before your comment. Cache is disabled. But the toolbar is still displaying. The site is using theme254k. This Theme is behaving uneven behavior from beginning. What to do? Thanks. – abu abu Nov 30 '16 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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