Skip to content
Code-Schnipsel Gruppen Projekte
Commit a40ac7ca erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'dev' of dev.quiqqer.com:quiqqer/products into dev

Übergeordnete 3243c21c 2b98ddba
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
/**
* @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
.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;
}
......@@ -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');
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren