gpt4 book ai didi

database - 创建模块 prestashop 1.7 在客户端验证订单后启动

转载 作者:搜寻专家 更新时间:2023-10-30 22:07:41 26 4
gpt4 key购买 nike

我想知道如何在客户端验证订单并在数据库中插入 id_order 和 order_state 后创建模块 prestashop 1.7 启动这是我现在尝试的但只是为了测试我尝试使用验证订单但是 Hook validationorder dosn没有任何 $parms thenak 你的帮助,抱歉我的英语不好

<?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中有你需要的一切:

public function hookActionValidateOrder($params)
{
$cart = $params['cart']; // The cart object
$order_status = $params['orderStatus']; // The order status
$order = $params['order']; // And the order object

$order->id; // This is the id order
}

检查 CartOrder 类,看看您可以用该对象做什么。

希望对您有所帮助:)

关于database - 创建模块 prestashop 1.7 在客户端验证订单后启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44828502/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com