Post by semihalimi112 » Fri Feb 22, 2019 12:29 am

Hi

What I want to achieve is to have a category description below products listed in this category, Default setting is that it shows above the products, is there any way to move it down ?

Regards
Thank You

Newbie

Posts

Joined
Fri Feb 22, 2019 12:28 am

Post by Johnathan » Fri Feb 22, 2019 12:31 am

You'd want to edit this file if you want to move the description down on the page:

/catalog/view/theme/YOURTHEME/template/product/category.twig

Don't forget to clear your theme cache after updating the file, or it won't appear to update. You can do that with the gear icon in the upper-right of the main admin dashboard page.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by paulfeakins » Fri Feb 22, 2019 7:57 pm

If you don't want to touch any template files, it could potentially be done with pure CSS:
https://stackoverflow.com/questions/742 ... s-with-css

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by semihalimi112 » Mon Mar 04, 2019 11:04 pm

Johnathan wrote:
Fri Feb 22, 2019 12:31 am
You'd want to edit this file if you want to move the description down on the page:

/catalog/view/theme/YOURTHEME/template/product/category.twig

Don't forget to clear your theme cache after updating the file, or it won't appear to update. You can do that with the gear icon in the upper-right of the main admin dashboard page.
Thanks for reply but wich code i need to change on category.twig ?

Newbie

Posts

Joined
Fri Feb 22, 2019 12:28 am

Post by Johnathan » Tue Mar 05, 2019 6:11 am

The part that prints out the category description is this one:

Code: Select all

{% if description %}
<div class="col-sm-10">{{ description }}</div>
{% endif %}</div>

You would move that to somewhere else in the file, wherever you want it placed.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by letxobnav » Tue Mar 05, 2019 6:58 pm

either move the thumb and the description:

Code: Select all

      {% if thumb or description %}
      <div class="row"> {% if thumb %}
        <div class="col-sm-2"><img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" class="img-thumbnail" /></div>
        {% endif %}
        {% if description %}
        <div class="col-sm-10">{{ description }}</div>
        {% endif %}</div>
      <hr>
      {% endif %}
or just the description:

Code: Select all

        {% if description %}
        <div class="col-sm-10">{{ description }}</div>
        {% endif %}

be aware of the column size definitions.

Crystal Light Centrum Taiwan


Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Who is online

Users browsing this forum: No registered users and 35 guests