Php 获取步骤和页面。敞篷车

Php 获取步骤和页面。敞篷车,php,opencart,Php,Opencart,我正在尝试获取$steps和$page 我试过这个: $steps = $myAPI->cleanPost($_POST['steps']); $page = $myAPI->cleanPost($_POST['page']); 但我没有得到什么 在PrestaShop,我们是这样做的: $page = (trim(Tools::getValue('page')) > 0) ? trim(Tools::getValue('page')) : 0; $steps = trim(

我正在尝试获取$steps和$page

我试过这个:

$steps = $myAPI->cleanPost($_POST['steps']);
$page = $myAPI->cleanPost($_POST['page']);
但我没有得到什么

在PrestaShop,我们是这样做的:

$page = (trim(Tools::getValue('page')) > 0) ? trim(Tools::getValue('page')) : 0;
$steps = trim(Tools::getValue('steps'));
$page = (trim($app->getRequest()->getParam('page')) > 0) ? trim($app->getRequest()->getParam('page')) : 0;
$steps = trim($app->getRequest()->getParam('steps'));
在Magento,就像这样:

$page = (trim(Tools::getValue('page')) > 0) ? trim(Tools::getValue('page')) : 0;
$steps = trim(Tools::getValue('steps'));
$page = (trim($app->getRequest()->getParam('page')) > 0) ? trim($app->getRequest()->getParam('page')) : 0;
$steps = trim($app->getRequest()->getParam('steps'));
有人知道我如何用OpenCart做到这一点吗


谢谢

您以前读过opencart文档吗?因为我看到你为此贴了几个问题。首先,您必须阅读“如何开发opencart模块”:其次:您必须用opencart包装器替换您的超全局变量
$this->request->post['steps']
谢谢。应该是这样的:$steps=$myAPI->cleanPost($this->request->post['steps']);?是的。你必须重构你的代码,使之成为“opencart风格”好的,谢谢。你还知道我如何才能在“OpenCart风格”中获取登录密码吗?你无法获取密码-只能获取密码的哈希值