Skip to content

Commit

Permalink
Merge pull request #7 from 4cpatrickgebhardt/master
Browse files Browse the repository at this point in the history
Fixed configpath in InstallSchema.php
  • Loading branch information
peterjaap authored Dec 6, 2023
2 parents ae49ab2 + e7ce762 commit c3a59b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Setup/InstallSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function buildStatement($event, $setup)
switch ($event) {
case Trigger::EVENT_INSERT:
$triggerSql = "DECLARE isEnable SMALLINT(5);\n";
$triggerSql .= "SELECT 1 INTO isEnable FROM ".$setup->getTable('core_config_data')." WHERE path = 'inventory_log/general/inventory_enabled' and value = 1;\n";
$triggerSql .= "SELECT 1 INTO isEnable FROM ".$setup->getTable('core_config_data')." WHERE path = 'cataloginventory/options/inventory_enabled' and value = 1;\n";
$triggerSql .= "IF (isEnable = 1) THEN\n";
$triggerSql .= "IF (NEW.qty IS NOT NULL) THEN\n";
$triggerSql .= "IF (NEW.ukey IS NULL) THEN\n";
Expand All @@ -190,7 +190,7 @@ public function buildStatement($event, $setup)
case Trigger::EVENT_UPDATE:
$triggerSql = "DECLARE isEnable SMALLINT(5);\n";
$triggerSql .= "DECLARE qty_movement DECIMAL(12,0);\n";
$triggerSql .= "SELECT 1 INTO isEnable FROM ".$setup->getTable('core_config_data')." WHERE path = 'inventory_log/general/inventory_enabled' and value = 1;\n";
$triggerSql .= "SELECT 1 INTO isEnable FROM ".$setup->getTable('core_config_data')." WHERE path = 'cataloginventory/options/inventory_enabled' and value = 1;\n";
$triggerSql .= "IF (isEnable = 1) THEN\n";
$triggerSql .= "IF (NEW.qty IS NOT NULL) THEN\n";
$triggerSql .= "IF (NEW.ukey IS NULL OR NEW.ukey = OLD.ukey ) THEN\n";
Expand Down

0 comments on commit c3a59b7

Please sign in to comment.