Jump to content

Editing the Add predefined product page in Quotes


Vivek Nair

Recommended Posts

Hello,

          I have been working on a  project with quotes on WHMCS. Now a new requirement has come up and I have come up with a solution for it. But i am stuck now at a page. I have been relying on the hooks mainly for this project.

In order to write custom jquery code in admin area pages i generally use in this format :

add_hook('AdminAreaPage', 1, function($vars) {
                
                        $jquery_code = $vars['jquerycode'];
                        $jquery_code .= ' $(document).ready(function(){
								
										});';

                        $return = array();
                        $return['jquerycode'] = $jquery_code;
                        return $return;
                             
                  
});

This works on all pages,but somehow in this page domain.com/quotes.php?action=loadprod&id=xxx it is not working.   I tried like this  in the page :

add_hook('AdminAreaPage', 1, function($vars) {
                  if($_GET['action'] == 'loadprod'){
                        $jquery_code = $vars['jquerycode'];

                        $jquery_code .= ' $(document).ready(function(){ alert(); });';

                        $return = array();
                        $return['jquerycode'] = $jquery_code;
                        return $return;
                              
                  }
        });

 

Could someone guide me or help me through this ? 

Thanks in advance

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated