diff --git a/Helper/Data.php b/Helper/Data.php
index 5dc0bff..e8cc6c9 100644
--- a/Helper/Data.php
+++ b/Helper/Data.php
@@ -38,6 +38,7 @@ class Data extends AbstractHelper
const CONTACTLAB_HUB_MIN_MINUTES_FROM_LAST_UPDATE = 'contactlab_hub/abandoned_cart/min_minutes_from_last_update';
const CONTACTLAB_HUB_MAX_MINUTES_FROM_LAST_UPDATE = 'contactlab_hub/abandoned_cart/max_minutes_from_last_update';
const CONTACTLAB_HUB_CRON_EVENT_LIMIT = 'contactlab_hub/cron_events/limit';
+ const CONTACTLAB_HUB_CRON_EVENT_DELETE = 'contactlab_hub/cron_events/delete';
const CONTACTLAB_HUB_CRON_PREVIOUS_CUSTOMERS_ENABLED = 'contactlab_hub/cron_previous_customers/enabled';
const CONTACTLAB_HUB_CRON_PREVIOUS_CUSTOMERS_EXPORT_ORDERS = 'contactlab_hub/cron_previous_customers/export_orders';
const CONTACTLAB_HUB_CRON_PREVIOUS_CUSTOMERS_PREVIOUS_DATE = 'contactlab_hub/cron_previous_customers/previous_date';
@@ -47,6 +48,7 @@ class Data extends AbstractHelper
const CONTACTLAB_HUB_EXCHANGE_RATES_EXCHANGE_RATE = 'contactlab_hub/exchange_rates/exchange_rate';
const CONTACTLAB_HUB_CUSTOMER_EXTRA_PROPERTIES_EXTERNAL_ID = 'contactlab_hub/customer_extra_properties/external_id';
const CONTACTLAB_HUB_CUSTOMER_EXTRA_PROPERTIES_ATTRIBUTE_MAP = 'contactlab_hub/customer_extra_properties/attribute_map';
+ const CONTACTLAB_HUB_CAN_SEND_ANONIMOUS_EVENTS = 'contactlab_hub/behavior/send_anonymous';
const CONTACTLAB_HUB_DISABLE_SENDING_SUBSCRIPTION_EMAIL = 'contactlab_hub/behavior/disable_sending_subscription_email';
const CONTACTLAB_HUB_DISABLE_SENDING_NEW_CUSTOMER_EMAIL = 'contactlab_hub/behavior/disable_sending_new_customer_email';
const CONTACTLAB_HUB_JS_TRACKING_ENABLED = 'contactlab_hub/js_tracking/enabled';
@@ -317,9 +319,17 @@ protected function _saveConfig($path, $value, $scopeId)
return $this;
}
- public function getMonthsToClean()
+ public function getMonthsToClean($storeId = null)
{
- return 1;
+ return (int)$this->scopeConfig->getValue(self::CONTACTLAB_HUB_CRON_EVENT_DELETE,
+ ScopeInterface::SCOPE_STORE, $storeId);
+ }
+
+
+ public function canSendAnonymousEvents($storeId = null)
+ {
+ return (bool)$this->scopeConfig->getValue(self::CONTACTLAB_HUB_CAN_SEND_ANONIMOUS_EVENTS,
+ ScopeInterface::SCOPE_STORE, $storeId);
}
public function isDiabledSendingSubscriptionEmail($storeId = null)
diff --git a/composer.json b/composer.json
index 93b8a57..4d4c6f6 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,7 @@
},
"type": "magento2-module",
- "version": "1.2.5",
+ "version": "1.3.0",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index 2e70b4a..ede1b7a 100644
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -291,15 +291,47 @@
-
-
-
+
+
- Contactlab\Hub\Model\Config\Source\Limit
+ Contactlab\Hub\Model\Config\Source\Cron\Limit
validate-not-negative-number validate-digits validate-is-min-of-range
+
+
+ Contactlab\Hub\Model\Config\Source\Cron\Frequency
+ Contactlab\Hub\Model\Config\Cron\Events
+
+
+
+
+ D|W|M
+
+
+
+
+ Contactlab\Hub\Model\Config\Source\Cron\Minutes
+
+ I
+
+
+
+
+ Contactlab\Hub\Model\Config\Source\Cron\Hours
+
+ H
+
+
+
+
+ Contactlab\Hub\Model\Config\Source\Cron\Months
+
- Contactlab\Hub\Model\Config\Source\Limit
+ Contactlab\Hub\Model\Config\Source\Cron\Limit
validate-not-negative-number validate-digits validate-is-min-of-range
- * * * * *
+ crontab/contactlab_hub/jobs/contactlab_hub_export_event/schedule/cron_expr
*/5 * * * *
diff --git a/etc/module.xml b/etc/module.xml
index 474da20..2b5a833 100644
--- a/etc/module.xml
+++ b/etc/module.xml
@@ -1,7 +1,7 @@
-
+