diff --git a/locale.xml b/locale.xml index d562ebc7e036e777627637aad922b0677de2001e..77b2e643d02f85c52f26a0872dbacabbacca5586 100644 --- a/locale.xml +++ b/locale.xml @@ -299,6 +299,11 @@ <de><![CDATA[Standard Sortierung]]></de> <en><![CDATA[Default sorting]]></en> </locale> + + <locale name="settings.window.fieldsearch.freetext.sort.title"> + <de><![CDATA[Produkt-Sortierung]]></de> + <en><![CDATA[Product sorting]]></en> + </locale> <locale name="fieldtype"> <de><![CDATA[Feld-Typ]]></de> diff --git a/settings.xml b/settings.xml index 2cb28eb3ae0c92f2d8fcda9761f8dc14971d2db5..c9786ca67ad29dd29e8beacddc2f8e433e78867e 100644 --- a/settings.xml +++ b/settings.xml @@ -343,7 +343,7 @@ <settings title="freetext" name="freetext"> <title> - <locale group="quiqqer/products" var="settings.window.fieldsearch.freetext.title"/> + <locale group="quiqqer/products" var="settings.window.fieldsearch.freetext.sort.title"/> </title> <input conf="products.sortFields" diff --git a/src/QUI/ERP/Products/EventHandling.php b/src/QUI/ERP/Products/EventHandling.php index ad5458e9ef0ed83be951da4f9e73763a5b92dc99..65b197ac2fab4d3a732edb7d4b5bdcc0ef1716d2 100644 --- a/src/QUI/ERP/Products/EventHandling.php +++ b/src/QUI/ERP/Products/EventHandling.php @@ -36,7 +36,6 @@ public static function onPackageSetup(Package $Package) QUI\ERP\Products\Handler\Manufacturers::registerManufacturerUrlPaths(); - self::setDefaultSearchSettings(); self::patchProductTypes(); try { @@ -1097,45 +1096,6 @@ public static function onRequest(QUI\Rewrite $Rewrite, $url) } } - /** - * Set default search settings if none are set - * - * @return void - * @throws QUI\Exception - */ - protected static function setDefaultSearchSettings() - { - try { - $Conf = QUI::getPackage('quiqqer/products')->getConfig(); - } catch (\Exception $Exception) { - QUI\System\Log::writeException($Exception); - - return; - } - - $search = $Conf->getSection('search'); - - // Backend search fields - if (empty($search['backend'])) { - $search['backend'] = implode(',', [ - Fields::FIELD_PRODUCT_NO, - Fields::FIELD_TITLE - ]); - } - - if (empty($search['freetext'])) { - $search['freetext'] = implode(',', [ - Fields::FIELD_PRODUCT_NO, - Fields::FIELD_TITLE, - Fields::FIELD_SHORT_DESC, - Fields::FIELD_KEYWORDS - ]); - } - - $Conf->setSection('search', $search); - $Conf->save(); - } - /** * events: frontend cache clearing */