2015-11-12 18:48
浏览 72


Some times i put some php files into my magento's root directory, which is my site's root directory too. I know this may not be best practice, but that is not the point of my question now.

For example, I have made one example.com/calc.php , a very specific calculator that does not interact with any magento data. That works OK.

Some times I did some pages with interaction with magento's data, but all through API calls (and is so slow!!!!)

$soap = new SoapClient("http://www.example.com/api/v2_soap/?wsdl");
$session = $soap->login($user, $pass);
// and then cancel an order for example
$soap->salesOrderCancel($session, '100004826');

Is it there a way to do this including magento's classes instead of using the API to try to make things faster?

Thanks in advance

图片转代码服务由CSDN问答提供 功能建议

有时我将一些php文件放入magento的根目录,这也是我网站的根目录。 我知道这可能不是最佳做法,但现在这不是我的问题。

例如,我做了一个example.com/calc.php,一个非常具体的计算器 不与任何magento数据交互。 这很好用。


 $ user ='mageuser'; 
 $ pass ='magepass'; 
 $ soap = new SoapClient(“http://www.example.com/api/v2_soap  /?wsdl“); 
 $ session = $ soap-&gt; login($ user,$ pass); 
 $ soap-&gt; salesOrderCancel($ session,'100004826  '); 

有没有办法做到这一点,包括magento的类而不是使用API​​来试图让事情变得更快? \ n


  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题