我想知道如何創建模塊prestashop 1.7啓動後,客戶端驗證命令,並在數據庫中插入id_order和order_state這是我現在嘗試,但只是爲了測試中,我嘗試用驗證順序,但掛鉤validationorder不到風度有任何$ PARMS thenakü烏拉圭回合的幫助,對不起我的英文不好創建模塊prestashop 1.7啓動後客戶端驗證訂單
<?php
if (!defined('_PS_VERSION_'))
{
exit;
}
class VanmieghemFlux extends Module
{
public function __construct()
{
$this->name = 'vanmieghemflux';
$this->tab = 'front_office_features';
$this->version = '1.0.0';
$this->author = ' DK group';
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.7.0.0', 'max' => _PS_VERSION_);
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('vanmieghemflux');
$this->description = $this->l('Automatisation des flux');
$this->confirmUninstall = $this->l('Êtes-vous sur de vouloir désinstaller?');
}
public function install()
{
if (!parent::install() || !$this->registerHook('displayLeftColumn'))
return false;
return true;
}
public function uninstall()
{
if (!parent::uninstall())
return false;
return true;
}
public function getContent()
{
return "test return";
}
public function hookdisplayLeftColumn($params)
{
return "test return";
}
}
?>
使用'hookActionValidateOrder($ params)方法',發現使用另一個模塊,掛鉤一個有效的例子 – sarcom
是啊,但actionvalidateorder dosnt HVE任何$ PARMS我需要id_order在我的功能感謝 –
您在'$ params'數組中擁有整個訂單對象,您可以從中獲得訂單ID。 – TheDrot