diff --git a/_serp.html b/_serp.html
index 913d34c..08ace22 100644
--- a/_serp.html
+++ b/_serp.html
@@ -138,10 +138,10 @@
 
 	<!--{{vtDo:-act="updateSession", SerpID="{vtID}"}}-->
 
+	<!--{{vtCapture:Searchstring}}-->{{vtSelection: mainsearch, -search}}<!--{{vtEndCapture}}-->
+
 	<!--{{vtCapture:PageText}}-->
-		<!--{{vtIf: {vtSelection: mainsearch, -search} .neq.}}-->
-			{{vtSelection: mainsearch, -search}}
-		<!--{{vtEndIf}}-->
+		{{vtGet: Searchstring | htmlspecialchars }}
 		<!--{{vtIf: {vtSelection: mainsearch, Keywords} .neq.}}-->
 			keywords:{{vtSelection: mainsearch, Keywords}}
 		<!--{{vtEndIf}}-->
@@ -221,7 +221,7 @@
 				{{vtSet: Image[badge] = "{vtGet:s_txt_0018}" }}
 			{{vtEndIf}}
 
-			{{vtCalc: getImageInfo( '{vtGet:thumbnailPath,escaped}{Verzeichnis}/{Dateiname}' ) }}
+			{{vtCalc: getImageInfo( '{vtGet:thumbnailPath,escaped}{Verzeichnis:escaped}/{Dateiname:escaped}' ) }}
 			{{vtSet: Info = "{vtResult}" }}
 			{{vtSet: Image[width] = "{vtGet:Info[width]}" }}
 			{{vtSet: Image[height] = "{vtGet:Info[height]}" }}
diff --git a/ajax/order_dialog.html b/ajax/order_dialog.html
index 87fdc7b..3319790 100644
--- a/ajax/order_dialog.html
+++ b/ajax/order_dialog.html
@@ -103,7 +103,7 @@
 											<!--{{vtElse}}-->
 												<span class="netprice">{{vtGet:Price|num-en:2}}</span>&nbsp;{{vtGlobal:pxtcCurrency}}
 												<!--{{vtCalc: {vtGet:Price} * ( 1 + {vtItem:vatRate}/100 ) }}-->
-												{{vtGet:s_txt_0071}} <span class="vatrate">{{vtGet:VatRate}</span>}% {{vtGet:s_txt_0072}} = 
+												{{vtGet:s_txt_0071}} <span class="vatrate">{{vtGet:VatRate}}</span>% {{vtGet:s_txt_0072}} = 
 												<span class="price">{{vtResult|num-en:2}}</span>&nbsp;{{vtGlobal:pxtcCurrency}}
 											<!--{{vtEndIf}}-->
 										<!--{{vtElse}}-->
@@ -230,7 +230,9 @@
 						console.log( data );
 						return;
 					}
-					
+					let row = $( 'tr.pxtc-product[data-id=' + data.productId + ']' );
+					row.find('.price').text( data.itemPrice.replace( /\./, ',' ) );
+					row.find('.netprice').text( data.itemNetprice.replace( /\./, ',' ) );
 					$('#add-to-cart').modal('hide');
 					if ( handle_cart_change ){
 						handle_cart_change( data.imageId, data.inCartStatus != '', data.cartCount );
diff --git a/coupon.vtnew.html b/coupon.vtnew.html
index a9ab4b6..f25be38 100644
--- a/coupon.vtnew.html
+++ b/coupon.vtnew.html
@@ -242,7 +242,8 @@
 					</td>
 				</tr>
 				<tr class="type-dependant type-1 type-2">
-					<td class="normal" style="padding-bottom:15px">
+					<td class="normal" style="padding-bottom:15px">Mindestbestellwert</td>
+					<td>
 						<input type="text" name="Mindestbestellwert" size="7" onchange="make_price(this)">
 						{{vtGlobal:pxtcCurrency}}
 						&nbsp;&nbsp;
diff --git a/lib/pxtc_products.class.php b/lib/pxtc_products.class.php
index afd3279..7f7fa79 100644
--- a/lib/pxtc_products.class.php
+++ b/lib/pxtc_products.class.php
@@ -56,7 +56,8 @@ class Pixtacy_Products {
 		$userGroups = empty( self::$options['userGroups'] ) ? array () : explode( ',', self::$options['userGroups'] );
 		$sql = "SELECT c.id, IF( c.containerID = {$pageIdProducts}, 0, c.containerID ) AS 'group',
 			p.`benutzer`, p.`kennung`, p.`preis:num`, IF( c.containerID = {$pageIdProducts}, p.`zuordnung:num`, pg.`zuordnung:num` ) AS 'zuordnung:num',
-			p.`typ`, p.`bezeichnung`, p.`bezeichnung_en`, p.`beschreibung`, p.`beschreibung_en`, p.`preisanpassung`, p.`steuersatz`
+			p.`typ`, p.`bezeichnung`, p.`bezeichnung_en`, p.`beschreibung`, p.`beschreibung_en`, p.`preisanpassung`, p.`steuersatz`,
+			p.rabatt_anwenden, p.rabattstaffel
 			FROM `%data_product` p
 			LEFT JOIN `%content` c ON c.id = p.vtid
 			LEFT JOIN `%data_product` pg ON c.containerID = pg.vtid
@@ -231,29 +232,27 @@ class Pixtacy_Products {
 		return $products;
 	}
 
-	public static function get_cart_price( $prodId ){
+	public static function get_discounted_price( $prodId ){
 		if ( empty( self::$globalProducts[ $prodId ] ) ){
 			return FALSE;
 		}
-		if ( empty( self::$cart ) ){
-			return 0;
-		}
 		if ( is_null( self::$productQuantities ) ){
 			self::$productQuantities = array ();
 			foreach ( self::$cart as $item ){
 				self::$productQuantities[ $item['product'] ] = 
-				isset( self::$productQuantities[ $item['product'] ] ) 
+					isset( self::$productQuantities[ $item['product'] ] ) 
 					? self::$productQuantities[ $item['product'] ] + $item['quantity'] 
-				: $item['quantity'];
+					: $item['quantity'];
 			}
 		}
 		$quantity = isset( self::$productQuantities[ $prodId ] ) 
 			? self::$productQuantities[ $prodId ] 
 			: 1;
 		$product = self::$globalProducts[ $prodId ];
-		$price = (float) $product['price'];
-		if ( ! empty( $product['applyDiscount'] ) && ! empty( $product['discountScale'] ) ){
-			foreach ( $product['discountScale'] as $level ){
+		$price = (float) $product['preis:num'];
+		if ( ! empty( $product['rabatt_anwenden'] ) && ! empty( $product['rabattstaffel'] ) ){
+			$staffel = json_decode( $product['rabattstaffel'], TRUE );
+			foreach ( $staffel as $level ){
 				if ( $quantity >= $level['quantity'] ){
 					$price = (float) $level['price'];
 				}
@@ -292,7 +291,7 @@ class Pixtacy_Products {
 		else {
 			$name = $p['bezeichnung'];
 		}
-		$price = $p['preis:num'];
+		$price = self::get_discounted_price( $prodId );
 		if ( ! empty( $p['preisanpassung'] ) && ! empty( self::$options['userPriceFactor'] ) ){
 			$factor = (float) str_replace( ',', '.', self::$options['userPriceFactor'] );
 			$price = round( $price * $factor, 2 );
diff --git a/orderlist.html b/orderlist.html
index 9593e4f..48d4bbf 100644
--- a/orderlist.html
+++ b/orderlist.html
@@ -130,6 +130,8 @@
 					{{vtDo: -act="updateSelection", -name="orderlist", -filter="{bezahlt} .eq. 1, {erledigt} .neq. 1" }}
 				{{vtElseIf: {vtPostValue:filter} .eq. erledigt  }}
 					{{vtDo: -act="updateSelection", -name="orderlist", -filter="{erledigt} .eq. 1" }}
+				{{vtElseIf: {vtPostValue:filter} .eq. unerledigt  }}
+					{{vtDo: -act="updateSelection", -name="orderlist", -filter="{erledigt} .neq. 1" }}
 				{{vtEndIf}}
 
 			{{vtEndIf}}
@@ -145,6 +147,7 @@
 					<option value="abgeschlossen" {{vtIf: {vtSession:OrderlistFilter} .eq. abgeschlossen }}selected{{vtEndIf}}>abgeschlossen/unbezahlt</option>
 					<option value="bezahlt" {{vtIf: {vtSession:OrderlistFilter} .eq. bezahlt }}selected{{vtEndIf}}>bezahlt/unerledigt</option>
 					<option value="erledigt" {{vtIf: {vtSession:OrderlistFilter} .eq. erledigt }}selected{{vtEndIf}}>erledigt</option>
+					<option value="unerledigt" {{vtIf: {vtSession:OrderlistFilter} .eq. unerledigt }}selected{{vtEndIf}}>nicht erledigt</option>
 				</select>
 			</form>
 		<!--{{vtEndIf}}-->
diff --git a/product.vtedit.html b/product.vtedit.html
index b33e48e..341e514 100644
--- a/product.vtedit.html
+++ b/product.vtedit.html
@@ -24,10 +24,6 @@
 			$( '#pxprint_id' ).hide();
 			// {{vtEndIf}}
 
-			// {{vtIf: {Rabatt_anwenden} .neq. 1 }}
-			$( '#Rabattstaffel' ).hide();
-			// {{vtEndIf}}
-			
 			$( '#Rabattstaffel' ).on( 'change', 'input', function(){
 				if( $( 'input[name="-quantity"]' ).last().val() != '' )
 				{
@@ -43,6 +39,7 @@
 			$( 'input[name="Typ"]' ).change( function(){
 				$('#pxprint_id').toggle( $('input[name="Typ"][value="Print"]').prop('checked') );
 				$('.product-data').toggle( ! $('input[name="Typ"][value="Gruppe"]').prop('checked') );
+				$( '#Rabattstaffel' ).toggle( $( 'input[name="Rabatt_anwenden"]' ).prop('checked') );
 			});
 			$( 'input[name="Typ"]' ).change();
 
diff --git a/resources/functions.php b/resources/functions.php
index afb2758..6612f2c 100644
--- a/resources/functions.php
+++ b/resources/functions.php
@@ -1881,94 +1881,6 @@ function discountCart( $couponProduct = NULL, $couponAmount = NULL )
 }
 
 
-function get_cart_price( $product_id )
-{
-	static $quantities;
-
-	if ( ! v::vtuse( $product_id ) || v::vtpage('vtPageType') != 'product' )
-	{
-		return FALSE;
-	}
-
-	if ( ! isset( $quantities ) )
-	{
-		$cart = json_decode( v::vtget('Cart'), TRUE );
-		$quantities = array ();
-
-		foreach ( $cart as $item )
-		{
-			$quantities[ $item['product'] ] = isset( $quantities[ $item['product'] ] ) ? $quantities[ $item['product'] ] + $item['quantity'] : $item['quantity'];
-		}
-	}
-
-	$quantity = isset( $quantities[ $product_id ] ) ? $quantities[ $product_id ] : 1;
-	$price = (float) v::vtpage('Preis');
-	$factor = v::vtuser('Preisfaktor') == '' ? 1 : (float) str_replace( ',', '.', v::vtuser('Preisfaktor') );
-
-	if ( v::vtpage('Rabatt_anwenden') )
-	{
-		foreach ( json_decode( v::vtpage('Rabattstaffel'), TRUE ) as $level )
-		{
-			if ( $quantity >= $level['quantity'] )
-			{
-				$price = (float) $level['price'];
-			}
-		}
-	}
-
-	if ( v::vtpage('Preisanpassung') && $factor != 1 )
-	{
-		$price = $price * $factor;
-	}
-
-	$product['netprice'] = $price;
-	$product['price'] = $price;
-
-	if ( v::vtglobal('pxtcVatHandling') != '' )
-	{
-		$vatrate = v::vtpage('Steuersatz') == '2' ? v::vtglobal('pxtcVatRate2') : v::vtglobal('pxtcVatRate');
-
-		if ( v::vtglobal('pxtcVatHandling') == 'excluded' )
-		{
-			$product['netprice'] = $price;
-			$product['price'] = $product['netprice'] + $product['vat'];
-		}
-		else
-		{
-			$product['price'] = $price;
-			$product['netprice'] = round( $price / (1 + $vatrate/100 ), 2 );
-		}
-	}
-
-	v::vtenduse();
-	return v::vtglobal('pxtcVatHandling') == 'excluded' ? $product['netprice'] : $product['price'];
-}
-
-
-function get_cart_quantity( $image_id, $product_id )
-{
-	static $quantities;
-
-	if ( ! isset( $quantities ) )
-	{
-		$cart = json_decode( v::vtget('Cart'), TRUE );
-		$quantities = array ();
-
-		foreach ( $cart as $item )
-		{
-			$quantities[ $item['image'] ][ $item['product'] ] = $item['quantity'];
-		}
-	}
-
-	if ( isset( $quantities[ $image_id ][ $product_id ] ) )
-	{
-		return $quantities[ $image_id ][ $product_id ];
-	}
-
-	return 0;
-}
-
-
 function xml_character_encode( $string )
 {
 	$trans = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES );
diff --git a/resources/scripts.js b/resources/scripts.js
index 19e6651..66a7fc6 100644
--- a/resources/scripts.js
+++ b/resources/scripts.js
@@ -42,3 +42,6 @@ $(document).ready( function(){
 		return false;
 	});
 });
+
+window.setInterval( function(){ $.get( location.href ); }, 1800000 );
+
diff --git a/resources/scripts_r.js b/resources/scripts_r.js
index bb9c3fb..20c8c51 100644
--- a/resources/scripts_r.js
+++ b/resources/scripts_r.js
@@ -150,3 +150,5 @@ $(document).ready( function(){
 	});
 });
 
+window.setInterval( function(){ $.get( location.href ); }, 1800000 );
+
