Subscribers/CustomerGroup.php 1 location
|
@@ 104-116 (lines=13) @@
|
| 101 |
|
* |
| 102 |
|
* @return int|null |
| 103 |
|
*/ |
| 104 |
|
public function getConnectCustomerGroupId() |
| 105 |
|
{ |
| 106 |
|
$repo = Shopware()->Models()->getRepository('Shopware\Models\Attribute\CustomerGroup'); |
| 107 |
|
/** @var \Shopware\Models\Attribute\CustomerGroup $model */ |
| 108 |
|
$model = $repo->findOneBy(array('connectGroup' => true)); |
| 109 |
|
|
| 110 |
|
$customerGroup = null; |
| 111 |
|
if ($model && $model->getCustomerGroup()) { |
| 112 |
|
return $model->getCustomerGroup()->getId(); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
return null; |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
} |
Subscribers/Article.php 1 location
|
@@ 446-458 (lines=13) @@
|
| 443 |
|
/** |
| 444 |
|
* @return \Shopware\Models\Customer\Group|null |
| 445 |
|
*/ |
| 446 |
|
public function getConnectCustomerGroup() |
| 447 |
|
{ |
| 448 |
|
$repo = Shopware()->Models()->getRepository('Shopware\Models\Attribute\CustomerGroup'); |
| 449 |
|
/** @var \Shopware\Models\Attribute\CustomerGroup $model */ |
| 450 |
|
$model = $repo->findOneBy(array('connectGroup' => true)); |
| 451 |
|
|
| 452 |
|
$customerGroup = null; |
| 453 |
|
if ($model && $model->getCustomerGroup()) { |
| 454 |
|
return $model->getCustomerGroup(); |
| 455 |
|
} |
| 456 |
|
|
| 457 |
|
return null; |
| 458 |
|
} |
| 459 |
|
|
| 460 |
|
/** |
| 461 |
|
* Load article detail |