diff --git a/doc/1.Setup/Abandoned carts settings.md b/doc/1.Setup/Abandoned carts settings.md new file mode 100644 index 0000000..a772157 --- /dev/null +++ b/doc/1.Setup/Abandoned carts settings.md @@ -0,0 +1,5 @@ +### Настройки брошенных корзин + +В версии 4.6.0 добавлен функционал выгрузки брошенных корзин. + +Для активации необходимо включить опцию ***Выгружать брошенные корзины*** \ No newline at end of file diff --git a/resources/pot/retailcrm-es_ES.pot b/resources/pot/retailcrm-es_ES.pot index 18d23f1..aac0ee1 100644 --- a/resources/pot/retailcrm-es_ES.pot +++ b/resources/pot/retailcrm-es_ES.pot @@ -369,3 +369,12 @@ msgstr "No es necesario proporcionar datos de autorización." msgid "Unable to obtain reference values." msgstr "No se pueden obtener valores de referencia." + +msgid "Abandoned carts" +msgstr "Carritos Abandonadas" + +msgid "Upload abandoned carts" +msgstr "Importar los carritos abandonados" + +msgid "Enable if you want to in CRM abandoned shopping carts were unloaded" +msgstr "Habilitar Si desea que en CRM se descargaron las cestas abandonadas de los compradores" diff --git a/resources/pot/retailcrm-ru_RU.pot b/resources/pot/retailcrm-ru_RU.pot index 8817fb2..1176f76 100644 --- a/resources/pot/retailcrm-ru_RU.pot +++ b/resources/pot/retailcrm-ru_RU.pot @@ -378,3 +378,12 @@ msgstr "Нет необходимости предоставлять автор msgid "Unable to obtain reference values." msgstr "Не удалось получить эталонное значение" + +msgid "Abandoned carts" +msgstr "Брошенные корзины" + +msgid "Upload abandoned carts" +msgstr "Выгружать брошенные корзины" + +msgid "Enable if you want to in CRM abandoned shopping carts were unloaded" +msgstr "Включите, если хотите, чтобы в CRM выгружались брошенные корзины покупателей" diff --git a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php index 5bc546c..ee93bde 100644 --- a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php +++ b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php @@ -111,15 +111,6 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration 'id' => 'api_options' ]; - $this->form_fields['corporate_enabled'] = [ - 'title' => __('Corporate customers support', 'retailcrm'), - 'label' => __('Enabled'), - 'description' => '', - 'class' => 'checkbox', - 'type' => 'checkbox', - 'desc_tip' => true - ]; - $this->form_fields['online_assistant'] = [ 'title' => __('Online assistant', 'retailcrm'), 'type' => 'textarea', @@ -533,6 +524,24 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration 'type' => 'checkbox' ]; + $this->form_fields['corporate_enabled'] = [ + 'title' => __('Corporate customers support', 'retailcrm'), + 'label' => __('Enabled'), + 'description' => '', + 'class' => 'checkbox', + 'type' => 'checkbox', + ]; + + $this->form_fields['abandoned_carts_enabled'] = [ + 'title' => __('Abandoned carts', 'retailcrm'), + 'label' => __('Upload abandoned carts', 'retailcrm'), + 'class' => 'checkbox', + 'type' => 'checkbox', + 'description' => __( + 'Enable if you want to in CRM abandoned shopping carts were unloaded', + 'retailcrm' + ), + ]; $this->form_fields['history'] = [ 'label' => __('Activate history uploads', 'retailcrm'), diff --git a/src/languages/retailcrm-es_ES.mo b/src/languages/retailcrm-es_ES.mo index be30a9f..b85f085 100644 Binary files a/src/languages/retailcrm-es_ES.mo and b/src/languages/retailcrm-es_ES.mo differ diff --git a/src/languages/retailcrm-ru_RU.mo b/src/languages/retailcrm-ru_RU.mo index 35011bf..f4b9b21 100644 Binary files a/src/languages/retailcrm-ru_RU.mo and b/src/languages/retailcrm-ru_RU.mo differ diff --git a/tests/helpers/class-wc-retailcrm-test-case-helper.php b/tests/helpers/class-wc-retailcrm-test-case-helper.php index 217665f..1e2e2ed 100644 --- a/tests/helpers/class-wc-retailcrm-test-case-helper.php +++ b/tests/helpers/class-wc-retailcrm-test-case-helper.php @@ -21,7 +21,6 @@ class WC_Retailcrm_Test_Case_Helper extends WC_Unit_Test_Case $options = [ 'api_url' => 'https://example.retailcrm.ru', 'api_key' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1', - 'corporate_enabled' => 'yes', 'online_assistant' => 'code', 'p_draft' => 'no', 'p_pending' => 'no', @@ -53,6 +52,8 @@ class WC_Retailcrm_Test_Case_Helper extends WC_Unit_Test_Case 'whatsapp_location_icon' => 'yes', 'whatsapp_number' => '+79184567234', 'icml' => 'yes', + 'corporate_enabled' => 'yes', + 'abandoned_carts_enabled' => 'yes', 'single_order' => '123', 'history' => 'yes', 'deactivate_update_order' => 'no', diff --git a/tests/test-wc-retailcrm-base.php b/tests/test-wc-retailcrm-base.php index 47f9860..b999427 100644 --- a/tests/test-wc-retailcrm-base.php +++ b/tests/test-wc-retailcrm-base.php @@ -118,6 +118,7 @@ class WC_Retailcrm_Base_Test extends WC_Retailcrm_Test_Case_Helper //Other settings $this->assertArrayHasKey('corporate_enabled', $this->baseRetailcrm->form_fields); + $this->assertArrayHasKey('abandoned_carts_enabled', $this->baseRetailcrm->form_fields); $this->assertArrayHasKey('online_assistant', $this->baseRetailcrm->form_fields); $this->assertArrayHasKey('deactivate_update_order', $this->baseRetailcrm->form_fields); $this->assertArrayHasKey('bind_by_sku', $this->baseRetailcrm->form_fields);