|
@@ 723-734 (lines=12) @@
|
| 720 |
|
* @param $voucherCode |
| 721 |
|
* @return mixed |
| 722 |
|
*/ |
| 723 |
|
public function findPercentagedIndividualVouchers($voucherCode) |
| 724 |
|
{ |
| 725 |
|
$builder = Shopware()->Models()->createQueryBuilder(); |
| 726 |
|
|
| 727 |
|
$builder->select('voucher') |
| 728 |
|
->from('Shopware\Models\Voucher\Voucher', 'voucher') |
| 729 |
|
->innerJoin('voucher.codes', 'codes', 'WITH', 'codes.code LIKE :voucherCode') |
| 730 |
|
->where('voucher.percental = true') |
| 731 |
|
->setParameter('voucherCode', $voucherCode); |
| 732 |
|
|
| 733 |
|
return $builder->getQuery()->getResult(); |
| 734 |
|
} |
| 735 |
|
|
| 736 |
|
/** |
| 737 |
|
* Find all vouchers matching the code |
|
@@ 742-753 (lines=12) @@
|
| 739 |
|
* @param $voucherCode |
| 740 |
|
* @return mixed |
| 741 |
|
*/ |
| 742 |
|
public function findPercentagedVouchers($voucherCode) |
| 743 |
|
{ |
| 744 |
|
$builder = Shopware()->Models()->createQueryBuilder(); |
| 745 |
|
|
| 746 |
|
$builder->select('voucher') |
| 747 |
|
->from('Shopware\Models\Voucher\Voucher', 'voucher') |
| 748 |
|
->where('voucher.voucherCode LIKE :voucherCode') |
| 749 |
|
->andWhere('voucher.percental = true') |
| 750 |
|
->setParameter('voucherCode', $voucherCode); |
| 751 |
|
|
| 752 |
|
return $builder->getQuery()->getResult(); |
| 753 |
|
} |
| 754 |
|
|
| 755 |
|
/** |
| 756 |
|
* @return \Shopware\Connect\SDk |