|
@@ 696-707 (lines=12) @@
|
| 693 |
|
* @param $voucherCode |
| 694 |
|
* @return mixed |
| 695 |
|
*/ |
| 696 |
|
public function findPercentagedIndividualVouchers($voucherCode) |
| 697 |
|
{ |
| 698 |
|
$builder = Shopware()->Models()->createQueryBuilder(); |
| 699 |
|
|
| 700 |
|
$builder->select('voucher') |
| 701 |
|
->from('Shopware\Models\Voucher\Voucher', 'voucher') |
| 702 |
|
->innerJoin('voucher.codes', 'codes', 'WITH', 'codes.code LIKE :voucherCode') |
| 703 |
|
->where('voucher.percental = true') |
| 704 |
|
->setParameter('voucherCode', $voucherCode); |
| 705 |
|
|
| 706 |
|
return $builder->getQuery()->getResult(); |
| 707 |
|
} |
| 708 |
|
|
| 709 |
|
/** |
| 710 |
|
* Find all vouchers matching the code |
|
@@ 715-726 (lines=12) @@
|
| 712 |
|
* @param $voucherCode |
| 713 |
|
* @return mixed |
| 714 |
|
*/ |
| 715 |
|
public function findPercentagedVouchers($voucherCode) |
| 716 |
|
{ |
| 717 |
|
$builder = Shopware()->Models()->createQueryBuilder(); |
| 718 |
|
|
| 719 |
|
$builder->select('voucher') |
| 720 |
|
->from('Shopware\Models\Voucher\Voucher', 'voucher') |
| 721 |
|
->where('voucher.voucherCode LIKE :voucherCode') |
| 722 |
|
->andWhere('voucher.percental = true') |
| 723 |
|
->setParameter('voucherCode', $voucherCode); |
| 724 |
|
|
| 725 |
|
return $builder->getQuery()->getResult(); |
| 726 |
|
} |
| 727 |
|
|
| 728 |
|
/** |
| 729 |
|
* @return \Shopware\Connect\SDk |