Jump to content

Prestashop 1.7 modifying the code for category template in Classic Theme


Dave R
 Share

Recommended Posts

Hi all. First post. I would like to remove the content area of the category page that appears when you select a menu item on the home page in the Classic Theme. I believe that this is the category page as when I "inspect" the live site I can delete a line of code the refers to the element "category row".  This has the desired effect. However, I have literally searched every .tpl file under the Classic Theme and cannot find the template for this page in order to remove the code. Please could someone point me in the right direction. 

Thanks

Dave

Share this post


Link to post
Share on other sites

Hi..
goto themes/classic/templates/catalog/_partials inside this path there is locate in category-header.tpl file 

Change code

<div id="js-product-list-header">
    {if $listing.pagination.items_shown_from == 1}
        <div class="block-category card card-block">
            <h1 class="h1">{$category.name}</h1>
            <div class="block-category-inner">
                {if $category.description}
                    <div id="category-description" class="text-muted">{$category.description nofilter}</div>
                {/if}
                {if $category.image.large.url}
                    <div class="category-cover">
                        <img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
                    </div>
                {/if}
            </div>
        </div>
    {/if}
</div>

To  

<div id="js-product-list-header">
    {if $listing.pagination.items_shown_from == 1}
        <div class="block-category card card-block">
            <h1 class="h1">{$category.name}</h1>
            <div class="block-category-inner">
                {*{if $category.description}
                    <div id="category-description" class="text-muted">{$category.description nofilter}</div>
                {/if}*}
                {if $category.image.large.url}
                    <div class="category-cover">
                        <img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
                    </div>
                {/if}
            </div>
        </div>
    {/if}
</div>

 

Share this post


Link to post
Share on other sites

Firstlt, thanks so much for the reply. i implemented your changes and cleared cache and history, but the live page was not effected. I then blocked even more content in the same template and still no change. So I think that this is not the correct template for the page content that I want to change. Is there anything else I can tell you that would help you to identify the template that I need to edit?

Thanks

Dave

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More