diff --git a/bin/types/Search.js b/bin/types/Search.js deleted file mode 100644 index 9a25fd738dac5f02d4d8679584632025cf8dbae4..0000000000000000000000000000000000000000 --- a/bin/types/Search.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @module package/quiqqer/productsearch/bin/types/Search - * @author www.pcsg.de (Henning Leutz) - * - * Search functionality -> JavaScript - */ -define('package/quiqqer/productsearch/bin/types/Search', [ - - 'qui/QUI', - 'qui/controls/Control', - 'URI' - -], function (QUI, QUIControl, URI) { - "use strict"; - - Element.NativeEvents.popstate = 2; - - return new Class({ - - Extends: QUIControl, - Type : 'package/quiqqer/productsearch/bin/types/Search', - - initialize: function (options) { - this.parent(options); - - this.$Search = null; - - this.addEvents({ - onImport: this.$onImport - }); - }, - - $onImport: function () { - var Elm = this.getElm(), - Form = Elm.getElement('.quiqqer-products-search-form'); - - this.$Search = Elm.getElement('[type="search"]'); - - // form event - Form.addEvent('submit', function (event) { - event.stop(); - - this.$Search.focus(); - this.$setWindowLocation(); - - // prodctlist search execute - var nodelist = this.getElm().getElements( - '[data-qui="package/quiqqer/products/bin/controls/frontend/category/ProductList"]' - ); - - var i, len, ProductList; - - for (i = 0, len = nodelist.length; i < len; i++) { - ProductList = QUI.Controls.getById(nodelist[i].get('data-quiid')); - - ProductList.$productId = false; - - if (ProductList) { - ProductList.execute(); - } - } - - if ("history" in window) { - window.history.pushState({}, "", window.location.toString()); - window.fireEvent('popstate'); - } - }.bind(this)); - - var Url = URI(window.location), - query = Url.query(true); - - if ("search" in query) { - this.$Search.set('value', query.search); - } - }, - - /** - * Read the searhc input and set the search=* query - */ - $setWindowLocation: function () { - var Url = URI(window.location); - Url.setSearch('search', this.$Search.value); - - var url = location.pathname + '?' + Object.toQueryString(Url.query(true)); - - if ("origin" in location) { - url = location.origin + url; - } - - window.history.pushState({}, "", url); - } - }); -}); \ No newline at end of file diff --git a/bin/types/search.css b/bin/types/search.css deleted file mode 100644 index d8e3fbe3a0a62fcf512629a4dc8a9aecaa7a55c7..0000000000000000000000000000000000000000 --- a/bin/types/search.css +++ /dev/null @@ -1,24 +0,0 @@ - -.quiqqer-products-search-form { - float: left; - margin-bottom: 30px; - width: 100%; -} - -.quiqqer-products-search-form input[type="search"] { - float: left; - height: 40px; - line-height: 40px !important; - max-width: calc(100% - 100px); - padding: 0 10px !important; - width: 400px; -} - -.quiqqer-products-search-form button { - border: none; - float: left; - line-height: 40px !important; - margin: 0; - padding: 0 10px !important; - width: 100px; -} diff --git a/src/QUI/ERP/Products/Product/Model.php b/src/QUI/ERP/Products/Product/Model.php index b37b09aea4a5a7496b9d7b19f08f82b94baa420e..9ba5ef03ee541a169e47102004e046fce2984a6a 100644 --- a/src/QUI/ERP/Products/Product/Model.php +++ b/src/QUI/ERP/Products/Product/Model.php @@ -1581,10 +1581,28 @@ protected function writeCacheEntry($lang) $Locale->setCurrent($lang); // wir nutzen system user als netto user - $SystemUser = QUI::getUsers()->getSystemUser(); - $minPrice = $this->getMinimumPrice($SystemUser)->value(); - $maxPrice = $this->getMaximumPrice($SystemUser)->value(); - $currentPrice = $this->getCurrentPrice($SystemUser)->value(); + $SystemUser = QUI::getUsers()->getSystemUser(); + + try { + $minPrice = $this->getMinimumPrice($SystemUser)->value(); + } catch (\Exception $Exception) { + QUI\System\Log::writeDebugException($Exception); + $minPrice = false; + } + + try { + $maxPrice = $this->getMaximumPrice($SystemUser)->value(); + } catch (\Exception $Exception) { + QUI\System\Log::writeDebugException($Exception); + $maxPrice = false; + } + + try { + $currentPrice = $this->getCurrentPrice($SystemUser)->value(); + } catch (\Exception $Exception) { + QUI\System\Log::writeDebugException($Exception); + $currentPrice = false; + } // Dates $cDate = $this->getAttribute('c_date');