From aed62d49f9401043daac935bbc18fc983447b0c3 Mon Sep 17 00:00:00 2001 From: Uryvskiy Dima Date: Mon, 13 Mar 2023 14:19:23 +0300 Subject: [PATCH] ref #88115 Added an option in the module settings for abandoned carts --- doc/1.Setup/Abandoned carts settings.md | 5 ++++ resources/pot/retailcrm-es_ES.pot | 9 ++++++ resources/pot/retailcrm-ru_RU.pot | 9 ++++++ .../class-wc-retailcrm-abstracts-settings.php | 27 ++++++++++++------ src/languages/retailcrm-es_ES.mo | Bin 10780 -> 11077 bytes src/languages/retailcrm-ru_RU.mo | Bin 13337 -> 13734 bytes .../class-wc-retailcrm-test-case-helper.php | 3 +- tests/test-wc-retailcrm-base.php | 1 + 8 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 doc/1.Setup/Abandoned carts settings.md 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 be30a9fdee6a2296dcdf84a50b752c7289696fe3..b85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h{6BzQ7Fx<>4(~5FaFNB}Nd+ly=hX+W)PbJVt1}+6lFZgtE{~ ztR?>6NSOD(VUFuu?Np`L5NsZ=wQyAG)l|eP?BS+e6!k7x|3*$8CYp#bUZ=md54iIr z=Vm7>H$F?xOJwmh*4X$$;syNi@eY_tU zZ8iO%r~t!+wqPNVNDMdaj>ierl71W10zTe9D(!piEVUv+FXQdWD!hfLQ-^DtQ2Y80 zVpVTNa!I@=`PV@2^^~-Df6CRQ_-C0rg7Nm8#$aMubF^)9OYg;;N%3WQhm+%3Q^SG( E00fBXZU6uP diff --git a/src/languages/retailcrm-ru_RU.mo b/src/languages/retailcrm-ru_RU.mo index 35011bf50fc24ec52b24c2977e8f734501aa7594..f4b9b2115920afd045a50479108c22c0622e4f42 100644 GIT binary patch delta 3081 zcma*peN0t#9LMpW0tv{20-~bjNzEP<6{SKG2~CAWK}<3g_41^oUPvw)3SA*hQkMZM zEmP-Kn$t=p6maTVI&0QCCue`;W3yUKs`W?tkIvqodymy$t>65f*YEr|zsK`EcfPfB z?=t_DxX?EYrH&X#goYZk54(DBp)^Jsqw1^3Khwk|3g5w=xF2J&4g2F6xBV*i=Kcou z!`nC*6X`S#$Ke2D{HBVE9@vV5@O|W2^BLygdF+K2v-ZIh48v)t_8G`PW+6u78jQn6 z_kIT^alaq?;%SV)OE{SM&5u+xPz1fTgCtakRMZY~Q48{53@*p}ajpCJou~zTgp=_c zYKO5rJOZ<^99Q9RyoNf_D2{Ce^P2=JlQ0vtfb}>NccE7N3u=L3To~IVB28u}sy&qp zdoWYn_Iy;oBGi$uaocy|V(ve{OpIZ7{;5>*sKnzoWO3#IK7yS%41aL{9>uwiURy9%k*GywfDnR9ESJc{CLivXG{?d30UnuxCu4UcI2Nq%S8iS zL_Oby*?0%F^K3dRc?&Qct5DXqz8J%19r<0U^865L!x?eGTb zNN=GQHi%w2s)vv!GYXZQQ&G=(P+!e@Ov86kukbSJ1iMiE2CypDWX518W}!~fA410I zT_&Qh8ySo`(spK1m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nKosEWV2F3NlJJ4JFo!NUI5k60BVI!px*x)b=<>P&V@Sv z=~T9IV;yGTAeP`M?8M)(30pGEUc)gg#U_?R9lefg@ICCpYq$#Qm`xuJpeEvDG%S{_ zKz79{&^`aHRG5VAMQOU2fCq6DpTQ0MSZF5a zkxAHh7>3b2tYa68Y_}~z4WJCQ*Mq1D9Y?i)4mE%Yhe|1xEY3$Y$Wy&Dwza3Xb%vxiRsc!Mf+Vvut08U_EcVMQvVrLb`cK| z{N}htNp_!C7jeWB#CBpQ(N44xF@#Dqq2CCVSt0C6PvwbnqJ?;zc$84CxJC2Veyec$ z>`p>wxs*_XXzx|lhj9O!_AvEM;vVmw@7f!&lo0iY2clL7FGkJr1?R_RL '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);