Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: about ajax URL?  (Read 5991 times)

Offline huyhoang08

  • Newbie
  • *
  • Posts: 25
  • Karma: +1/-1
    • View Profile
about ajax URL?
« 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?

Offline huyhoang08

  • Newbie
  • *
  • Posts: 25
  • Karma: +1/-1
    • View Profile
Re: about ajax URL?
« Reply #1 on: March 21, 2016, 10:27:59 AM »
additional, i want to view URL on storefront

yonghan

  • Guest
Re: about ajax URL?
« Reply #2 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.

Offline huyhoang08

  • Newbie
  • *
  • Posts: 25
  • Karma: +1/-1
    • View Profile
Re: about ajax URL?
« Reply #3 on: March 21, 2016, 09:39:14 PM »
thank, i sloved my problem.

 

Powered by SMFPacks Social Login Mod