Jump to content

Remove kpi-container from B.O. pages


Recommended Posts

Hello

 

If you mean these:

http://screencast.com/t/NkSdW3ba7r

 

Then go to:

Back office > Administration > Preferences > (scroll down to) Notifications > click No

http://screencast.com/t/53Gd9aMdxE

 

Then go to:

Back office > Modules > Administration > Merchant Expertise > Disable

 

Before

http://screencast.com/t/tzuFUD2e9mYC

 

After

http://screencast.com/t/IiB3gQG1M32

 

 

Paul

Link to comment
Share on other sites

  • 5 months later...

Hi, I have a problem with this too. But i need to disable it not just hide. When displaying a category in the backoffice this module does a query that overloads the mysql server. 

 

I found the file where the query is but i prefer a method to disable this module instead of hardcode comment the query. 

 

Any help would be appreciated. Thanks.

Link to comment
Share on other sites

  • 4 months later...

Hi, I have a problem with this too. But i need to disable it not just hide. When displaying a category in the backoffice this module does a query that overloads the mysql server. 

 

I found the file where the query is but i prefer a method to disable this module instead of hardcode comment the query. 

 

Any help would be appreciated. Thanks.

 

Hey,

I won't even talk about the "hide it, but let it run" solution, that's just f*ckin' insane from a performance or even logical point of view.

 

If you don't want this (forced by default) unnecessary eye candy, the best way (in my opinion) to get rid of it, is to override AdminController.php and comment this line:

$this->content .= $this->renderKpis()

in the initComment() function.

 

Have a nice day.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...

Up please!

 

It have a solution for do this?

 

tanks

 

Well, thanks God, I'm not into this Prestashop super-bullshit anymore.

But I still receive emails when someone answers to a thread I'm involved with.

 

So basically, since we're in a PHP class, the best way would be, from my point of view:

1) To change your eCommerce solution from PS to a decent one ASAP.

2) if it's not possible, just use the Customer class to get the profile (https://www.prestashop.com/forums/topic/280108-check-if-current-user-is-in-a-certain-group/) ,cross your fingers and hope for the best since it might not work in the BO.

Then, get the profile and do a PHP switch/case statement in order to render the KPIs just for the profiles you need.

Edited by Rulian (see edit history)
Link to comment
Share on other sites

  • 7 months later...

Good Morning, At this point I am looking to implement Kpis in a module in prestashop 1.6 that I am developing. My goal is to use "renderKpis ()", similar to what exists in the backoffice on the products page. Can someone tell me how to use it?

 

 

I am posting on this post because someone from you may know how I can implement it in the module as desire.

Thanks.

 

 

 

r8Fjw.png

Edited by SilviaPimenta (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 4 years later...

On PS1.7.7 this can be done commenting or removing the following codes from file:
/httpdocs/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/index.html.twig

  {% block orders_kpi %}
    <div class="row">
      <div class="col-md-12">
        <div class="card">
          <div class="row orders-kpi">
            {{ render(controller(
              'PrestaShopBundle:Admin\\Common:renderKpiRow',
              { 'kpiRow': orderKpi }
            )) }}
          </div>
        </div>
      </div>
    </div>
  {% endblock %}

 

Link to comment
Share on other sites

  • 1 year later...

For Prestashop 8.* commenting or removing:

\src\PrestaShopBundle\Resources\views\Admin\Common\Kpi\kpi_row.html.twig

{% block kpi_row %}
  <div class="card card-kpis">

    <div class="kpi-row">
      {% for kpi in kpiRow.kpis %}
        {{ kpi|raw }}
      {% endfor %}
    </div>

    {% if kpiRow.allowRefresh %}
    <div class="kpi-refresh">
      <button class="refresh-kpis btn btn-primary" type="button">
        <i class="material-icons">refresh</i>
      </button>
    </div>
    {% endif %}

  </div>
{% endblock %}

 

Link to comment
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
×
×
  • Create New...