File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
setup/src/Magento/Setup/Model Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1296,6 +1296,29 @@ private function installOrderIncrementPrefix($orderIncrementPrefix)
1296
1296
];
1297
1297
$ dbConnection ->insert ($ setup ->getTable ('eav_entity_store ' ), $ rowData );
1298
1298
}
1299
+
1300
+ // Get meta id for adding in profile table for order prefix
1301
+ $ selectMeta = $ dbConnection ->select ()
1302
+ ->from ($ setup ->getTable ('sales_sequence_meta ' ), 'meta_id ' )
1303
+ ->where ('entity_type = \'order \'' )
1304
+ ->where ('store_id = \'' . Store::DISTRO_STORE_ID . '\'' );
1305
+ $ metaId = $ dbConnection ->fetchOne ($ selectMeta );
1306
+
1307
+ // See if row already exists
1308
+ $ incrementRow = $ dbConnection ->fetchRow (
1309
+ 'SELECT * FROM ' . $ setup ->getTable ('sales_sequence_profile ' ) . ' WHERE meta_id = ? ' ,
1310
+ [$ metaId ]
1311
+ );
1312
+
1313
+ if (!empty ($ incrementRow )) {
1314
+ // Row exists, update it
1315
+ $ profileId = $ incrementRow ['profile_id ' ];
1316
+ $ dbConnection ->update (
1317
+ $ setup ->getTable ('sales_sequence_profile ' ),
1318
+ ['prefix ' => $ orderIncrementPrefix , 'is_active ' => '1 ' ],
1319
+ 'profile_id = ' . $ profileId
1320
+ );
1321
+ }
1299
1322
}
1300
1323
1301
1324
/**
You can’t perform that action at this time.
0 commit comments