Jump to content

1 And Its Elusive Issues And Visibility At Times Help Please


Recommended Posts

Okay I am working on a module and I have had the issue before, but generally it has always been some simple issue. However, this time I cannot find anything that would display a 1 on the index page as it is a column block module. It is a simple form that uses JQuery Ajax to perform the action, all of which works perfectly, but still displays a 1. I did try to debug but it seems i need to work on debugging skills as all I could gather is that the 1 had a data id of #text, which is nowhere in my code. It is for sure the module as the 1 is removed if the module is disabled or uninstalled.

 

My questions to you all are;

 

Have you had any issue with the displaying of a 1 in the front office?

Have you had any issue like this with JQuery or Ajax?

if yes to one or both, what was your resolution?

 

All comments are appreciated sorry I cannot post the code, but was hoping some of the veteran Prestashop developers would have ran into this before with forms, jquery, ajax, or module and front office display that could help me out as I am just at a loss with it.

 

 

SOLVED

 

 

For reference when you set the header do not return true or it will show a 1 on the front office

public function hookHeader()

    {
        $this->context->controller->addJquery();
        $this->context->controller->addJS(($this->_path).'views/js/front.js');
        $this->context->controller->addCSS(($this->_path).'views/css/front.css');
  return true;// BAD DO NOT DO --- SHOWS A 1 ON SCREEN
    }

As you can see the  return true;// BAD DO NOT DO --- SHOWS A 1 ON SCREEN is a NO NO so do not do it.

Edited by ShopSaveNEarn (see edit history)
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...