Men modulni ishlab chiqyapman, u buyurtma nizomi administrator tomonidan yuborilgan ga o‘zgartirilsa, api yordamida uchinchi tomon ilovasiga joylashtirish uchun u buyurtma tafsilotlarini oladi. Men Prestashop V 1.7.7.0.dan foydalanmoqdaman
Men hali ham mamlakat va shtat nomlari, mahsulotlar va buyurtma xabarini olishim kerak. Iltimos, buni qanday qilishim mumkin?
Bundan tashqari, modulni prestashop-ga o'rnatib bo'lmaydi. Mening kodim to'g'rimi?
Yordam kerak. Rahmat
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.'&country_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);
}
}