Skip to content

Instantly share code, notes, and snippets.

@incrize
Created March 9, 2021 12:45
Show Gist options
  • Save incrize/91d439b5f54ec4ac96466e0509cfeab9 to your computer and use it in GitHub Desktop.
Save incrize/91d439b5f54ec4ac96466e0509cfeab9 to your computer and use it in GitHub Desktop.
diff --git a/app/addons/my_changes/func.php b/app/addons/my_changes/func.php
new file mode 100644
index 0000000000..20662c41fd
--- /dev/null
+++ b/app/addons/my_changes/func.php
@@ -0,0 +1,22 @@
+<?php
+/***************************************************************************
+ * *
+ * (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
+ * *
+ * This is commercial software, only users who have purchased a valid *
+ * license and accept to the terms of the License Agreement can install *
+ * and use this program. *
+ * *
+ ****************************************************************************
+ * PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
+ * "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
+ ****************************************************************************/
+
+
+function fn_my_changes_update_product_feature_pre(&$feature_data, $feature_id, $lang_code)
+{
+ if (!empty($feature_data['external_id']) && $feature_id && empty($feature_data['internal_name'])) {
+ // Do not update product feature name if product feature updating from rus_exim_1c add-on
+ unset($feature_data['description']);
+ }
+}
diff --git a/app/addons/my_changes/init.php b/app/addons/my_changes/init.php
new file mode 100644
index 0000000000..e5767047c7
--- /dev/null
+++ b/app/addons/my_changes/init.php
@@ -0,0 +1,15 @@
+<?php
+/***************************************************************************
+ * *
+ * (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
+ * *
+ * This is commercial software, only users who have purchased a valid *
+ * license and accept to the terms of the License Agreement can install *
+ * and use this program. *
+ * *
+ ****************************************************************************
+ * PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
+ * "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
+ ****************************************************************************/
+
+fn_register_hooks('update_product_feature_pre');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment