AbanteCart Community

AbanteCart Development => API Development => Topic started by: huyhoang08 on March 21, 2016, 10:19:05 AM

Title: about ajax URL?
Post by: huyhoang08 on March 21, 2016, 10:19:05 AM
i create ajax handler, by creating file .php in controller/responses/ path. then use:
Code: [Select]
// controller/responses/myajax.php
$url=$this->html->getSecureURL('r/myajax/method1');   # for logged user
However, when i browse URL on browser, it show blank page. why?
Title: Re: about ajax URL?
Post by: huyhoang08 on March 21, 2016, 10:27:59 AM
additional, i want to view URL on storefront
Title: Re: about ajax URL?
Post by: yonghan on March 21, 2016, 01:17:53 PM
Have you pass the data to storefront template file by using
Code: [Select]
$this->data['url']=$url ;or
Code: [Select]
$this->view->assign('url',$url);
The developer docs has the reference on how to pass the data. You can look at it.
Title: Re: about ajax URL?
Post by: huyhoang08 on March 21, 2016, 09:39:14 PM
thank, i sloved my problem.