Implemented a way to use the external barcode lookup plugin also from within the frontend as a product picker workflow

This commit is contained in:
Bernd Bestel
2023-11-03 20:47:43 +01:00
parent c9215a9a4e
commit 27f9d70b56
11 changed files with 62 additions and 14 deletions

View File

@@ -1702,14 +1702,12 @@ class StockService extends BaseService
private function LoadBarcodeLookupPlugin()
{
$pluginName = defined('GROCY_STOCK_BARCODE_LOOKUP_PLUGIN') ? GROCY_STOCK_BARCODE_LOOKUP_PLUGIN : '';
if (empty($pluginName))
{
throw new \Exception('No barcode lookup plugin defined');
}
$path = GROCY_DATAPATH . "/plugins/$pluginName.php";
if (file_exists($path))
{
require_once $path;