Prestashop:当订单状态更改为“;已装运”;
我需要得到订单的详细信息时,订单状态更改为“发货”由管理员,以张贴到第三方应用程序与api。 我正在使用Prestashop v1.7.7.0 我需要帮助。谢谢Prestashop:当订单状态更改为“;已装运”;,prestashop,prestashop-1.6,prestashop-1.7,Prestashop,Prestashop 1.6,Prestashop 1.7,我需要得到订单的详细信息时,订单状态更改为“发货”由管理员,以张贴到第三方应用程序与api。 我正在使用Prestashop v1.7.7.0 我需要帮助。谢谢 $city_cl = $_GET['????????']; $state_cl = $_GET['????????']; $address_cl = $_GET['????????']; $tel_2_cl = $_GET['????????']; $products = $_GET['?????
$city_cl = $_GET['????????'];
$state_cl = $_GET['????????'];
$address_cl = $_GET['????????'];
$tel_2_cl = $_GET['????????'];
$products = $_GET['????????'];
$Quantity = $_GET['????????'];
$cod = $_GET['????????'];
$note = $_GET['????????'];
$Url_str = 'http://example.com/api/set_parcel_post.php?id=123&tel_cl='.$tel_cl.'&name_lastname_cl='.$name_lastname_cl.'&city_cl='.$city_cl.'&state_cl='.$state_cl.'&address_cl='.$address_cl.'&tel_2_cl='.$tel_2_cl.'&products='.$products.'&cod='.$cod.'&Quantity='.$Quantity.'¬e='.$note;
$json = file_get_contents($Url_str);
$result = json_decode($json);
我需要帮助。感谢这是一个超级siple模块,可根据需要执行操作,最后一个方法在订单状态更改时调用(保存过程后)。
$city_cl = $_GET['????????'];
$state_cl = $_GET['????????'];
$address_cl = $_GET['????????'];
$tel_2_cl = $_GET['????????'];
$products = $_GET['????????'];
$Quantity = $_GET['????????'];
$cod = $_GET['????????'];
$note = $_GET['????????'];
$Url_str = 'http://example.com/api/set_parcel_post.php?id=123&tel_cl='.$tel_cl.'&name_lastname_cl='.$name_lastname_cl.'&city_cl='.$city_cl.'&state_cl='.$state_cl.'&address_cl='.$address_cl.'&tel_2_cl='.$tel_2_cl.'&products='.$products.'&cod='.$cod.'&Quantity='.$Quantity.'¬e='.$note;
$json = file_get_contents($Url_str);
$result = json_decode($json);
您必须遵循有关如何创建和安装模块()的指南,并调用相应的钩子(列表)
我的代码对吗?我需要得到国家和州的名称,产品和订单信息。
请问我怎么做?
此外,该模块不能安装在prestashop中。
需要帮助吗。谢谢
public function hookActionOrderStatusPostUpdate($params)
{
if($params['newOrderStatus']->id == 13)
{
$order = new Order((int)$params['id_order']);
$address = new Address((int)$order->id_address_delivery);
$customer = new Customer((int)($address->id_customer));
$country = new Country((int)($address->id_country));
$state = new Country((int)($address->id_state));
$tel_cl = $address->phone;
$name_lastname_cl = $address->lastname . ' ' . $address->firstname;
$country_cl = **Not yet**;
$state_cl = **Not yet**;
$adress_cl = $address->address1 . ' ' . $address->address2;
$tel_2_cl = $address->phone_mobile
$products = **Not yet**;
$quantity = "1"
$cod = $order->total_paid
$note = **Not yet(order message)**;
$Url_str = 'http://example.com/api/set_parcel_post.php?id=123&tel_cl='.$tel_cl.'&name_lastname_cl='.$name_lastname_cl.'&city_cl='.$country_cl.'&state_cl='.$state_cl.'&address_cl='.$address_cl.'&tel_2_cl='.$tel_2_cl.'&products='.$products.'&cod='.$cod.'&Quantity='.$Quantity.'¬e='.$note;
$json = file_get_contents($Url_str);
$result = json_decode($json);
return false;
}
}
需要帮助吗。谢谢您能开发一个模块吗?如果是这样,请查看文档并在“订单状态”部分下找到正确的挂钩。然后将一个模块挂接到该特定操作,您就完成了。您好,谢谢您的回复,我可以直接在核心文件中插入代码吗?因此,我需要知道确切的文件,以及如何获得订单详细信息。谢谢。如果唯一的解决方案是开发一个模块,我是初学者,我需要知道如何做到这一点,请在模块中如何获得订单详细信息。谢谢。您好,非常感谢您的回复@Jack,我仍然需要如何获取这些参数,请$city\u cl、$state\u cl、$address\u cl、$tel\u 2\u cl、$products、$Quantity、$cod、$note。请问我错过了什么<代码>公共函数hookActionOrderStatusPostUpdate($params){if($params['newOrderStatus']->id==13){$order=neworder((int)$params['id_order']);$address=newaddress((int)$order->id_address_delivery);$customer=新客户((int)($address->id_customer));$country=新国家((int)($address->id_country))$state=new Country((int)($address->id_state));
我需要获取国家名称、州名称和产品说明。正如我在回答中提到的,您必须遵循安装过程指南。您在检索信息方面做了什么似乎没问题。请遵循指南,不要让别人为您编码。
public function hookActionOrderStatusPostUpdate($params)
{
if($params['newOrderStatus']->id == 13)
{
$order = new Order((int)$params['id_order']);
$address = new Address((int)$order->id_address_delivery);
$customer = new Customer((int)($address->id_customer));
$country = new Country((int)($address->id_country));
$state = new Country((int)($address->id_state));
$tel_cl = $address->phone;
$name_lastname_cl = $address->lastname . ' ' . $address->firstname;
$country_cl = **Not yet**;
$state_cl = **Not yet**;
$adress_cl = $address->address1 . ' ' . $address->address2;
$tel_2_cl = $address->phone_mobile
$products = **Not yet**;
$quantity = "1"
$cod = $order->total_paid
$note = **Not yet(order message)**;
$Url_str = 'http://example.com/api/set_parcel_post.php?id=123&tel_cl='.$tel_cl.'&name_lastname_cl='.$name_lastname_cl.'&city_cl='.$country_cl.'&state_cl='.$state_cl.'&address_cl='.$address_cl.'&tel_2_cl='.$tel_2_cl.'&products='.$products.'&cod='.$cod.'&Quantity='.$Quantity.'¬e='.$note;
$json = file_get_contents($Url_str);
$result = json_decode($json);
return false;
}
}