Backoffice order page too slow

  • Hello

    the orders page in the back office is loading too slow. Sometimes this is not the case but since days I notice an annoying delay.

    So, I assumed that there are some scripts running that have difficulties to to run or are slowing down the order pages and I started network traffic analysis in the browser tools.

    alt text

    I have no real clue how to use these browser tools but I see that there is a 404 (Ganalytics ?)

    and a … ?

    Mh, reading “reacorded event” gives me a goose neck :) but anyhow I would really appreciate if TB would give us an option to use Gmaps service or not.

    => I vote for a TB exclusive tab in future ThirtyBees version with options like this that might increase priovacy a bit more.

    Until then, I would like to ask where I can block the Gmaps call (edit file) and what causes the 404.

    Thank you

  • TB uses google location services to help you determine if customer’s address is valid or not. This might prevent you from sending your goods to non-existing address. I would say that’s a good thing.

    In order for this to work, you need to get google api key and save it to Preferences > General > Google Maps API Key. Without api key this whole process is useless.

    If you are really that paranoid and think that google is out there to get you, you can always edit file /controllers/admin/AdminOrdersController.php . line ~ 400. :)

  • Thank you Datakick for the hint with the file. I do not see any reason at the moment to tell Google who I am shipping to. Moreover, this adress validation is done by my delivery service…

    Any tips on the 404 Error?

  • Actually, in order to satisfy both types of shop owners - the ones who care about Google connections and those who do not -

    best would be to have an “on demand” look up Google Map adress button.

    I think this goes with Thirty Bees concept and should be build in.

    Thank you alot

  • @pedalman said in Backoffice order page too slow:

    Actually, in order to satisfy both types of shop owners - the ones who care about Google connections and those who do not -

    best would be to have an “on demand” look up Google Map adress button.

    I think this goes with Thirty Bees concept and should be build in.

    Thank you alot

    That seems reasonable imo. I think address validation doesn’t even work for my country. No sense having it enabled.

  • Hello, i absolutely agree with that idea, >> best would be to have an “on demand” look up Google Map adress button, so we can choose if this should be enabled or disabled, also regarding privacy policies in some countries.

    I have checked the /controllers/admin/AdminOrdersController.php
    and this begins in line 383:

     * Set Media
     * @return void
     * @since 1.0.0
    public function setMedia()
        if ($this->tabAccess['edit'] == 1 && $this->display == 'view') {
            $apiKey = (Configuration::get('TB_GOOGLE_MAPS_API_KEY')) ? 'key='.Configuration::get('TB_GOOGLE_MAPS_API_KEY').'&' : '';
            $protocol = (Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 'https' : 'http';

    HOW TO DISABLE THIS FUNCTION MANUALLY? Just comment this out or delete something? Please tell me, thank you!

  • Hi,

    Another way, is to block assets you don’t want to load on your browser.

    Way to do in chrome: options panel (3 dots in top right) -> More Tools -> Developer Tools -> Network tab -> right click on what you want block -> Block request URL

    Resources will be block forever, no need to do it every time. Hopefully, you can unblock if needed.

    0_1517066538299_BlockRequest.jpg image url)

  • Hi Lathaneo,
    thank you for this, but i think this is the solution for end-user.

    What i want, is to disable this function in TB, so that the shop will not use this google function.

  • Mh

    I never learned how to programm so I had a look at the Terms&Conditions check during checkout and tried to edit the controller in question - but without luck :)

      if ($this->tabAccess['edit'] == 1 && $this->display == 'view' 
             && isset($checkedMAP) && $checkedMAP checked=='checked' )

    That was meant to be the first step. The second would be to have a button that sets checkedMAP. Anyhow syntax is wrong and all what I could do was to set the display condition to something else that does not exist…
    if ($this->tabAccess[‘edit’] == 1 && $this->display == ‘view2’

  • @pedalman what are you trying to achieve?

    If you want to disable the whole address validation functionality, then you need to do following steps:

    1 - don’t load google api library - get rid of following lines from AdminOrderController

    $apiKey = (Configuration::get('TB_GOOGLE_MAPS_API_KEY')) ? 'key='.Configuration::get('TB_GOOGLE_MAPS_API_KEY').'&' : '';
    $protocol = (Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 'https' : 'http';

    2 - get rid of actual geolocation javascript call. Edit file <admin>/themes/default/template/controllers/orders/helpers/view/view.tpl
    and remove everything related to geocoder.

    For example, you can replace line

       var geocoder = new google.maps.Geocoder();


      var geocoder = ( ? new google.maps.Geocoder() : {
        geocode: function(address) {
"Automatic geocoding was disabled: "+address.address);

    Now, if you want to make this whole functionality on demand, that will add a lot of complexity. You would need to

    1. add some preference so tb users could actually choose if they want this functionality on demand, or keep it as it is now
    2. if it’s on demand, then you’ll need edit order page, add some button, bunch of javascript that will dynamically and asynchronously load the google library, and once the library is loaded then initialize it with api key, and perform the actual geo call…

    This is a lot of work. And I wouldn’t expect guys on core team to implement this, as it really doesn’t bring any actual value to merchants. It doesn’t fix any bug, it doesn’t provide new functionality,…

  • I see. I did not know that it would be that complex and time consuming. So, yes it is better development time is used on the really important improvements and enhancements.

  • Well,

    I have to pick up my complain and question again.

    I upgraded to 1.0.4 latest repo in the meantime in order to exclude any issues or old bugs with the bo controller etc.
    But the backoffice orders page still hangs about 5 seconds due to loading google maps ?

    I have entered an API code in bo for gmaps but this does not help. This is more than annoying and really makes no fun to work in Thirtybees BO. This behaviour started in January so I still believe this is due to some Google servers but I also still believe a free Prestashop for should give us the option to use GoogleMaps/GoogleFonts etc. in Backoffice and elsewhere!

    But in I am willing to calm down :) and want to ask other European users if they notice or do not notice this delay in bo/orders ?
    This would be very helpful.

  • Update:
    Firefox Quantum and an extension (LastPass) seem to be partly responsible for the delays. After editing the files above in order to stop the Gstatic/Gmaps … calls all seems to be pretty fast with Chrome!
    That is really weird but now I can work again in BO without building up frustration :)

    still a problem with ganalytics in BO:

Log in to reply

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.