|
@@ 665-676 (lines=12) @@
|
| 662 |
|
* @param $voucherCode |
| 663 |
|
* @return mixed |
| 664 |
|
*/ |
| 665 |
|
public function findPercentagedIndividualVouchers($voucherCode) |
| 666 |
|
{ |
| 667 |
|
$builder = Shopware()->Models()->createQueryBuilder(); |
| 668 |
|
|
| 669 |
|
$builder->select('voucher') |
| 670 |
|
->from('Shopware\Models\Voucher\Voucher', 'voucher') |
| 671 |
|
->innerJoin('voucher.codes', 'codes', 'WITH', 'codes.code LIKE :voucherCode') |
| 672 |
|
->where('voucher.percental = true') |
| 673 |
|
->setParameter('voucherCode', $voucherCode); |
| 674 |
|
|
| 675 |
|
return $builder->getQuery()->getResult(); |
| 676 |
|
} |
| 677 |
|
|
| 678 |
|
/** |
| 679 |
|
* Find all vouchers matching the code |
|
@@ 684-695 (lines=12) @@
|
| 681 |
|
* @param $voucherCode |
| 682 |
|
* @return mixed |
| 683 |
|
*/ |
| 684 |
|
public function findPercentagedVouchers($voucherCode) |
| 685 |
|
{ |
| 686 |
|
$builder = Shopware()->Models()->createQueryBuilder(); |
| 687 |
|
|
| 688 |
|
$builder->select('voucher') |
| 689 |
|
->from('Shopware\Models\Voucher\Voucher', 'voucher') |
| 690 |
|
->where('voucher.voucherCode LIKE :voucherCode') |
| 691 |
|
->andWhere('voucher.percental = true') |
| 692 |
|
->setParameter('voucherCode', $voucherCode); |
| 693 |
|
|
| 694 |
|
return $builder->getQuery()->getResult(); |
| 695 |
|
} |
| 696 |
|
|
| 697 |
|
/** |
| 698 |
|
* @return \Shopware\Connect\SDk |