This commit is contained in:
Thomas Peterson 2024-06-14 14:18:48 +00:00
parent e8e9340f87
commit 35e4918af2
7 changed files with 42 additions and 30 deletions

File diff suppressed because one or more lines are too long

View File

@ -429,16 +429,42 @@ class UserController extends AbstractController
$s = $newarray["q"]; $s = $newarray["q"];
$qb = $this->documentManager->getRepository(PSCContact::class)->createQueryBuilder('contact'); $qb = $this->documentManager->getRepository(PSCContact::class)->createQueryBuilder('contact');
$qb->addOr($qb->expr()->field('contact.custom1')->equals(new Regex('/.*'.$s.'.*/i'))); $qb->addOr($qb->expr()->field('custom1')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('contact.custom2')->equals(new Regex('/.*'.$s.'.*/i'))); $qb->addOr($qb->expr()->field('custom2')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom3')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom4')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom5')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom6')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom7')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom8')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom9')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom10')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom11')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom12')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom13')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom14')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom15')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom16')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom17')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom18')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom19')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom20')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom21')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom22')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom23')->equals(new Regex($s)));
$qb->addOr($qb->expr()->field('custom24')->equals(new Regex($s)));
dump($qb->getQuery()->execute()); $ids = [];
foreach($qb->getQuery()->execute() as $row) {
$ids[] = (int)$row->getUid();
}
$contacts = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Contact')->createQueryBuilder('contact') $contacts = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Contact')->createQueryBuilder('contact')
->orderBy('contact.' . $orderBy, $sort) ->orderBy('contact.' . $orderBy, $sort)
->leftJoin('contact.shops', 'shop') ->leftJoin('contact.shops', 'shop')
->where('contact.username != :sysadmin_email AND contact.enable = 1 AND contact.uid != 1 AND shop.uid = :shop')->setParameter('sysadmin_email', "sysadmin@printshopcreator.de")->setParameter('shop', $this->shopService->getShopByDomain()->getId()) ->where('contact.username != :sysadmin_email AND contact.enable = 1 AND contact.uid != 1 AND shop.uid = :shop')->setParameter('sysadmin_email', "sysadmin@printshopcreator.de")->setParameter('shop', $this->shopService->getShopByDomain()->getId())
->andwhere('(contact.firstname like :q or contact.lastname like :q or contact.username like :q or contact.company like :q or contact.street like :q or contact.houseNumber like :q or contact.city like :q or contact.zip like :q or CONCAT(contact.firstname, \' \', contact.lastname) like :q)')->setParameter("q", $q)->getQuery()->execute(); ->andwhere('(contact.uid in (:ids) or contact.firstname like :q or contact.lastname like :q or contact.username like :q or contact.company like :q or contact.street like :q or contact.houseNumber like :q or contact.city like :q or contact.zip like :q or CONCAT(contact.firstname, \' \', contact.lastname) like :q)')->setParameter('ids', $ids)->setParameter("q", $q)->getQuery()->execute();
$temp = []; $temp = [];
foreach($contacts as $contact) { foreach($contacts as $contact) {

View File

@ -265,9 +265,7 @@ if ($teile[5] == "") {
<div class="row articletemplates-6"> <div class="row articletemplates-6">
<div class="col-xs-12"> <div class="col-xs-12">
<a class="btn btn-large pull-right" href="<?php if ($backlink == "") { ?>javascript:history.back()<?php } else { <a class="btn btn-large pull-right" href="javascript:history.back()"><?php echo $this->translate('Zurück') ?></a>
echo $backlink;
} ?>"><?php echo $this->translate('Zurück') ?></a>
<?php if($this->layouterSession && $this->layouterSession->getTitle() != ""): ?> <?php if($this->layouterSession && $this->layouterSession->getTitle() != ""): ?>
<h1><?php echo $this->layouterSession->getTitle() ?></h1> <h1><?php echo $this->layouterSession->getTitle() ?></h1>
@ -1722,4 +1720,4 @@ if ($teile[5] == "") {
<?= $this->partial('article/_upload_multi.phtml', array('article' => $this->article, 'basepath' => $this->basepath, 'addcontactform' => $this->addcontactform)) ?> <?= $this->partial('article/_upload_multi.phtml', array('article' => $this->article, 'basepath' => $this->basepath, 'addcontactform' => $this->addcontactform)) ?>
<?php endif; ?> <?php endif; ?>
</div><!-- // row --> </div><!-- // row -->

View File

@ -265,9 +265,7 @@ if ($teile[5] == "") {
<div class="row articletemplates-6"> <div class="row articletemplates-6">
<div class="col-xs-12"> <div class="col-xs-12">
<a class="btn btn-large pull-right" href="<?php if ($backlink == "") { ?>javascript:history.back()<?php } else { <a class="btn btn-large pull-right" href="javascript:history.back()"><?php echo $this->translate('Zurück') ?></a>
echo $backlink;
} ?>"><?php echo $this->translate('Zurück') ?></a>
<?php if($this->layouterSession && $this->layouterSession->getTitle() != ""): ?> <?php if($this->layouterSession && $this->layouterSession->getTitle() != ""): ?>
<h1><?php echo $this->layouterSession->getTitle() ?></h1> <h1><?php echo $this->layouterSession->getTitle() ?></h1>
@ -1731,4 +1729,4 @@ if ($teile[5] == "") {
<?= $this->partial('article/_upload_multi.phtml', array('article' => $this->article, 'basepath' => $this->basepath, 'addcontactform' => $this->addcontactform)) ?> <?= $this->partial('article/_upload_multi.phtml', array('article' => $this->article, 'basepath' => $this->basepath, 'addcontactform' => $this->addcontactform)) ?>
<?php endif; ?> <?php endif; ?>
</div><!-- // row --> </div><!-- // row -->

View File

@ -274,9 +274,7 @@ if ($teile[5] == "") {
<div class="row articletemplates-6"> <div class="row articletemplates-6">
<div class="col-xs-12"> <div class="col-xs-12">
<a class="btn btn-large pull-right" href="<?php if ($backlink == "") { ?>javascript:history.back()<?php } else { <a class="btn btn-large pull-right" href="javascript:history.back()"><?php echo $this->translate('Zurück') ?></a>
echo $backlink;
} ?>"><?php echo $this->translate('Zurück') ?></a>
<?php if ($this->layouterSession && $this->layouterSession->getTitle() != "") : ?><h1><?php echo $this->layouterSession->getTitle() ?></h1><?php else : ?><h1><?php echo $this->article->getTitle() ?></h1><?php endif; ?> <?php if ($this->layouterSession && $this->layouterSession->getTitle() != "") : ?><h1><?php echo $this->layouterSession->getTitle() ?></h1><?php else : ?><h1><?php echo $this->article->getTitle() ?></h1><?php endif; ?>
</div> </div>
@ -1773,4 +1771,4 @@ if (($this->admin && $this->role->level >= 40) && !$this->layouterPreviewId): ?>
}); });
</script> </script>

View File

@ -134,7 +134,7 @@
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="col-sm-4"><strong>Anzahl: <?php if (isset($count) && intval($count) > 0) : ?><?php echo $count ?><?php else : ?><?php echo $barticle['basketarticle']->getCount() ?><?php endif; ?></strong><br /><br /> <div class="col-sm-4"><strong>Anzahl: <?php echo $barticle['basketarticle']->getAuflage() ?></strong><br /><br />
<?php if (($barticle['basketarticle']->getLayouterId() == "" || $barticle['basketarticle']->getLayouterId() == false)) : ?> <?php if (($barticle['basketarticle']->getLayouterId() == "" || $barticle['basketarticle']->getLayouterId() == false)) : ?>
<?php echo $barticle['article']['title'] ?> <?php echo $barticle['article']['title'] ?>
<?php else : ?> <?php else : ?>
@ -150,7 +150,7 @@
if (stripos($option, 'Auflage') === 0) { if (stripos($option, 'Auflage') === 0) {
$count = str_replace('Auflage: ', '', $option); $count = str_replace('Auflage: ', '', $option);
} else { } else {
?> ?>
<li><?php echo $option ?>, </li> <li><?php echo $option ?>, </li>
<?php } ?> <?php } ?>
<?php endforeach; ?> <?php endforeach; ?>
@ -159,14 +159,6 @@
<?php endif; ?> <?php endif; ?>
</div> </div>
<!--<div class="col-sm-1">
<label class="mobilelabel">Einzelpreis: <small><?php if (isset($count) && intval($count) > 0) : ?><?php echo $this->currency->toCurrency($barticle['basketarticle']->getBrutto() / intval($count)) ?><?php else : ?><?php echo $this->currency->toCurrency($barticle['basketarticle']->getBrutto() / $barticle['basketarticle']->getCount()) ?><?php endif; ?></small></label>
<label class="nomobilehead" style="display: block;width: 100%;text-align: right;"><?php if (isset($count) && intval($count) > 0) : ?><?php echo $this->currency->toCurrency($barticle['basketarticle']->getBrutto() / intval($count)) ?><?php else : ?><?php echo $this->currency->toCurrency($barticle['basketarticle']->getBrutto() / $barticle['basketarticle']->getCount()) ?><?php endif; ?></label>
</div>-->
<!--<div class="col-sm-1">
<label class="mobilelabel">Anzahl: <small><?php if (isset($count) && intval($count) > 0) : ?><?php echo $count ?><?php else : ?><?php echo $barticle['basketarticle']->getCount() ?><?php endif; ?></small></label>
<label class="nomobilehead"><?php if (isset($count) && intval($count) > 0) : ?><?php echo $count ?><?php else : ?><?php echo $barticle['basketarticle']->getCount() ?><?php endif; ?></label>
</div>-->
<div class="col-sm-4"> <div class="col-sm-4">
<?php if(!$this->designsettings()->get('display_no_price')) { ?><label class="mobilelabel">Preis: <small><?php if ($this->withTax) : ?> <?php if(!$this->designsettings()->get('display_no_price')) { ?><label class="mobilelabel">Preis: <small><?php if ($this->withTax) : ?>
<label style="font-weight:100;"><?php echo $this->currency->toCurrency($barticle['basketarticle']->getNetto() * $barticle['basketarticle']->getCount()) ?></label><label style="font-size:14px; font-weight:100;width: 45px;"><?php echo $this->translate('(Netto)')?></label><br /><?php echo $this->currency->toCurrency($barticle['basketarticle']->getBrutto() * $barticle['basketarticle']->getCount()) ?> <label style="font-size:14px; font-weight:100;"><?php echo $this->translate('(Brutto inkl. '.$barticle['article']['mwert'].'% MwSt.)') ?></label> <label style="font-weight:100;"><?php echo $this->currency->toCurrency($barticle['basketarticle']->getNetto() * $barticle['basketarticle']->getCount()) ?></label><label style="font-size:14px; font-weight:100;width: 45px;"><?php echo $this->translate('(Netto)')?></label><br /><?php echo $this->currency->toCurrency($barticle['basketarticle']->getBrutto() * $barticle['basketarticle']->getCount()) ?> <label style="font-size:14px; font-weight:100;"><?php echo $this->translate('(Brutto inkl. '.$barticle['article']['mwert'].'% MwSt.)') ?></label>
@ -190,7 +182,7 @@
/************************************************************************************************************************************************************************ /************************************************************************************************************************************************************************
* Zusammenfassung der Bestellung * Zusammenfassung der Bestellung
*/ */
?> ?>
<div class="col-xs-12 col-lg-9 pull-right"> <div class="col-xs-12 col-lg-9 pull-right">

View File

@ -117,7 +117,7 @@
if (stripos($option, 'Auflage') === 0) { if (stripos($option, 'Auflage') === 0) {
$count = str_replace('Auflage: ', '', $option); $count = str_replace('Auflage: ', '', $option);
} else { } else {
?> ?>
<li><?php echo $option ?>, </li> <li><?php echo $option ?>, </li>
<?php } ?> <?php } ?>
<?php endforeach; ?> <?php endforeach; ?>
@ -136,7 +136,7 @@
/************************************************************************************************************************************************************************ /************************************************************************************************************************************************************************
* Zusammenfassung der Bestellung * Zusammenfassung der Bestellung
*/ */
?> ?>
<table class="w-full table table-bordered ml-1 mr-1"> <table class="w-full table table-bordered ml-1 mr-1">