Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

POST array is empty!

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-07-2015, 05:35 AM
 
Roman Prisiazhniuk Roman Prisiazhniuk is offline
 

Member
  
Join Date: Apr 2015
Posts: 17
 

Default POST array is empty!

Here is a link where there is a forn on right side:
http://64.15.78.216/dev10/mymotoshield/cart.php?target=policy
When I fill this form the $_POST var is empty? here is a code of function that I invoke
Code:
public function addCarSearch(){ $fh= fopen('log.txt','w'); fputs($fh,\XLite\Core\Request::getInstance()->make); fputs($fh,serialize($_POST)); fclose($fh); return \XLite\Core\Request::getInstance()->make; }
I invoke it using next code:
Code:
addCarSearch()
but nothing is shown, also file log.txt is empty!
Please help me with this problem
__________________
xcart 4.4.1, 5
Reply With Quote
  #2  
Old 04-08-2015, 09:03 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: POST array is empty!

Code:
public function addCarSearch($in_var) { $fh= fopen('log.txt','w'); fputs($fh,\XLite\Core\Request::getInstance()->make); fputs($fh,serialize($in_var)); fclose($fh); return \XLite\Core\Request::getInstance()->make; }

Code:
addCarSearch($_POST);
Reply With Quote
  #3  
Old 04-08-2015, 12:41 PM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: POST array is empty!

As a first step, try to add the debug code to handleRequest() method of the \XLite\Controller\AController class.

You need to make sure that your request is even handled by controllers.

Please, make sure that your debug the code in the <X-Cart>/var/run folder.

Finally, you can use built-in logger instead of writing your own one:
http://kb.x-cart.com/display/XDD/Debugging+X-Cart#DebuggingX-Cart-Logging
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:57 PM.

   

 
X-Cart forums © 2001-2020