Search code examples
templatesopencartclearfix

Where is the "clearfix" DIV in OpenCart's featured.tpl


I am trying to locate the "clearfix" DIV in OpenCart's "featured.tpl", which is inserted in the live site but is not present in the actual template file.

In the latest version of OpenCart, 2.0.2.0, and probably in older versions, for a reason I don't fathom, an extra DIV is inserted after the second featured product DIV.

<div class="clearfix visible-md visible-sm"></div>

I have examined every template file in the theme (default) but I can't find it. Is it perhaps inserted by JavaScript? If so, how and where - and why? I just want to get rid it.


Solution

  • Opencart 2.X is Responsive. Here column left and column right are dynamic according to module assigned. So Opencart Checks for the module and then decides the column width, ie full width or two column or 3 column and adds the class accordingly.

    catalog/view/javascript/common.js:33
    

    Here you can find the script that is used to add clear fix.