diff --git a/Models/Agency.php b/Models/Agency.php index 70f1219bc..c2d10ddc9 100755 --- a/Models/Agency.php +++ b/Models/Agency.php @@ -8,8 +8,6 @@ class Agency { const AGENCY_SELECTED_JADLOG_CENTRALIZED = 'melhorenvio_option_agency_jadlog_centralized'; - const AGENCY_SELECTED_CORREIOS_CENTRALIZED = 'melhorenvio_option_agency_correios_centralized'; - const AGENCY_SELECTED_LOGGI = 'melhorenvio_option_agency_loggi'; const AGENCY_SELECTED_JET = 'melhorenvio_option_agency_jet'; @@ -32,15 +30,6 @@ public function getJadlogCentralized() { return get_option( self::AGENCY_SELECTED_JADLOG_CENTRALIZED, null ); } - /** - * function to get the id of agency Correios centralized selected. - * - * @return array - */ - public function getCorreiosCentralized() { - return get_option( self::AGENCY_SELECTED_CORREIOS_CENTRALIZED, null ); - } - /** * function to get the id of agency Loggi selected. * @@ -86,19 +75,6 @@ public function setJadlogCentralized( $data ) { return true; } - /** - * @param array $data - * @return bool - */ - public function setCorreiosCentralized( $data ) { - delete_option( self::AGENCY_SELECTED_CORREIOS_CENTRALIZED ); - if ( ! add_option( self::AGENCY_SELECTED_CORREIOS_CENTRALIZED, $data ) ) { - return false; - } - - return true; - } - /** * @param array $data * @return bool diff --git a/Models/ShippingService.php b/Models/ShippingService.php index 55855ae02..05032ac76 100644 --- a/Models/ShippingService.php +++ b/Models/ShippingService.php @@ -4,7 +4,7 @@ class ShippingService { - const SERVICES_CORREIOS = array( 1, 2, 17, 28, 29, 30 ); + const SERVICES_CORREIOS = array( 1, 2, 17 ); const SERVICES_JADLOG = array( 3, 4, 27 ); @@ -14,12 +14,8 @@ class ShippingService { const CORREIOS_PAC = 1; - const CORREIOS_PAC_CENTRALIZED = 28; - const CORREIOS_SEDEX = 2; - const CORREIOS_SEDEX_CENTRALIZED = 29; - const JADLOG_PACKAGE = 3; const JADLOG_PACKAGE_CENTRALIZED = 27; @@ -36,8 +32,6 @@ class ShippingService { const CORREIOS_MINI = 17; - const CORREIOS_MINI_CENTRALIZED = 30; - const LOGGI_EXPRESS = 31; const LOGGI_COLETA = 32; @@ -86,12 +80,8 @@ public static function getCodeByMethodId( $methodId ) { switch ( $methodId ) { case 'melhorenvio_correios_pac': return self::CORREIOS_PAC; - case 'melhorenvio_correios_pac_centralized': - return self::CORREIOS_PAC_CENTRALIZED; case 'melhorenvio_correios_sedex': return self::CORREIOS_SEDEX; - case 'melhorenvio_correios_sedex_centralized': - return self::CORREIOS_SEDEX_CENTRALIZED; case 'melhorenvio_jadlog_package': return self::JADLOG_PACKAGE; case 'melhorenvio_jadlog_package_centralized': @@ -112,8 +102,6 @@ public static function getCodeByMethodId( $methodId ) { return self::AZUL_ECOMMERCE; case 'melhorenvio_correios_mini': return self::CORREIOS_MINI; - case 'melhorenvio_correios_mini_centralized': - return self::CORREIOS_MINI_CENTRALIZED; case 'melhorenvio_latam_juntos': return self::LATAM_JUNTOS; case 'melhorenvio_buslog_rodoviario': diff --git a/Models/Version.php b/Models/Version.php index c2fbde39d..87792e5c4 100755 --- a/Models/Version.php +++ b/Models/Version.php @@ -4,5 +4,5 @@ class Version { - const VERSION = '2.15.5'; + const VERSION = '2.15.6'; } diff --git a/Services/AgenciesSelectedService.php b/Services/AgenciesSelectedService.php index 8661d67a4..69a167feb 100644 --- a/Services/AgenciesSelectedService.php +++ b/Services/AgenciesSelectedService.php @@ -26,13 +26,6 @@ public function getJadlogCentralized() { return $this->agencyModel->getJadlogCentralized(); } - /** - * @return array - */ - public function getCorreiosCentralized() { - return $this->agencyModel->getCorreiosCentralized(); - } - /** * @return array */ @@ -71,24 +64,12 @@ public function setJadlogCentralized( $data ) { return $this->agencyModel->setJadlogCentralized( $data ); } - /** - * @param array $data - * @return bool - */ - public function setCorreiosCentralized( $data ) { - if ( empty( $data ) ) { - return true; - } - - return $this->agencyModel->setCorreiosCentralized( $data ); - } - /** * @param array $data * @return bool */ public function setLoggi( $data ) { - + if ( empty( $data ) ) { return true; } diff --git a/Services/CartService.php b/Services/CartService.php index a8a268739..152a28f34 100644 --- a/Services/CartService.php +++ b/Services/CartService.php @@ -143,14 +143,6 @@ private function getAgencyToInsertCart( $shippingMethodId ) { $agenciesSelectedService = new AgenciesSelectedService(); - if (in_array($shippingMethodId, [ - ShippingService::CORREIOS_SEDEX_CENTRALIZED, - ShippingService::CORREIOS_PAC_CENTRALIZED, - ShippingService::CORREIOS_MINI_CENTRALIZED]) - ) { - return $agenciesSelectedService->getCorreiosCentralized(); - } - if ((int) $shippingMethodId === ShippingService::JADLOG_PACKAGE_CENTRALIZED) { return $agenciesSelectedService->getJadlogCentralized(); } diff --git a/Services/ConfigurationsService.php b/Services/ConfigurationsService.php index c61988b26..f884ab830 100644 --- a/Services/ConfigurationsService.php +++ b/Services/ConfigurationsService.php @@ -75,10 +75,6 @@ public function saveConfigurations( $data ) { ( new AgenciesSelectedService() )->set( $response['agency'] ); } - if ( ! empty( $data['agency_correios_centralized'] ) ) { - ( new AgenciesSelectedService() )->setCorreiosCentralized( $data['agency_correios_centralized'] ); - } - if ( ! empty( $data['agency_jadlog_centralized'] ) ) { ( new AgenciesSelectedService() )->setJadlogCentralized( $data['agency_jadlog_centralized'] ); } @@ -140,8 +136,6 @@ public function getConfigurations() { $agenciesCentralizedsJadlog = array(); - $agenciesCentralizedsCorreios = array(); - $agenciesLoggi = array(); $agenciesSelecteds = array(); @@ -158,10 +152,6 @@ public function getConfigurations() { $address['company'] = ShippingCompany::JADLOG; $agenciesCentralizedsJadlog = ( new AgenciesService($address))->get(); - $address['serviceId'] = ShippingService::CORREIOS_SEDEX_CENTRALIZED; - $address['company'] = ShippingCompany::CORREIOS; - $agenciesCentralizedsCorreios = ( new AgenciesService($address))->get(); - $address['serviceId'] = ShippingService::LOGGI_EXPRESS; $address['company'] = ShippingCompany::LOGGI; $agenciesLoggi = ( new AgenciesService($address))->get(); @@ -170,7 +160,6 @@ public function getConfigurations() { $agenciesSelectedService = new AgenciesSelectedService(); $agenciesSelecteds = $agenciesSelectedService->get(); - $agencyCorreiosCentralizedSelected = $agenciesSelectedService->getCorreiosCentralized(); $agencyJadlogCentralizedSelected = $agenciesSelectedService->getJadlogCentralized(); $agencyLoggiSelected = $agenciesSelectedService->getLoggi(); @@ -182,7 +171,6 @@ public function getConfigurations() { ShippingCompany::JADLOG ), 'agenciesJadlogCentralized' => $agenciesCentralizedsJadlog, - 'agenciesCorreiosCentralized' => $agenciesCentralizedsCorreios, 'agenciesLoggi' => $agenciesLoggi, 'agenciesAzul' => $this->filterAgenciesByCompany( $agencies, @@ -205,7 +193,6 @@ public function getConfigurations() { ShippingCompany::JADLOG ), 'agencyJadlogCentralizedSelected' => $agencyJadlogCentralizedSelected, - 'agencyCorreiosCentralizedSelected' => $agencyCorreiosCentralizedSelected, 'agencyLoggiSelected' => $agencyLoggiSelected, 'agencyLatamSelected' => $this->filterAgencySelectedByCompany( $agenciesSelecteds, diff --git a/assets/src/admin/components/Configuracoes.vue b/assets/src/admin/components/Configuracoes.vue index 2a59f3f56..c3a00c6ce 100755 --- a/assets/src/admin/components/Configuracoes.vue +++ b/assets/src/admin/components/Configuracoes.vue @@ -299,39 +299,6 @@
-
-

Correios Centralizado

-

- Escolha a agência correios centralizado de sua preferência para realizar o envio dos - seus produtos. -

-
- -
-
-
-

Jadlog Centralizado

@@ -755,7 +722,6 @@ export default { canUpdate: true, origin: null, agency: null, - agency_correios_centralized: null, agency_jadlog_centralized: null, agency_loggi: null, agency_azul: null, @@ -766,7 +732,6 @@ export default { show_calculator: false, show_all_agencies_jadlog: false, show_all_agencies_azul: false, - show_all_agencies_correios_centralized: false, show_all_agencies_jadlog_centralized: false, show_all_agencies_loggi: false, options_calculator: { @@ -799,7 +764,6 @@ export default { label: "getLabel", dimension: "getDimension", agencySelected_: "getAgencySelected", - agencyCorreiosCentralizedSelected_: "getAgencyCorreiosCentralizedSelected", agencyJadlogCentralizedSelected_: "getAgencyJadlogCentralizedSelected", agencyLoggiSelected_: "getAgencyLoggiSelected", agencyAzulSelected_: "getAgencyAzulSelected", diff --git a/assets/src/admin/components/Pedido/Documentos.vue b/assets/src/admin/components/Pedido/Documentos.vue index b7b604db6..71b483b84 100644 --- a/assets/src/admin/components/Pedido/Documentos.vue +++ b/assets/src/admin/components/Pedido/Documentos.vue @@ -5,11 +5,8 @@