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
|
@@ 425-437 (lines=13) @@
|
| 422 |
|
/** |
| 423 |
|
* @return \Shopware\Models\Customer\Group|null |
| 424 |
|
*/ |
| 425 |
|
public function getConnectCustomerGroup() |
| 426 |
|
{ |
| 427 |
|
$repo = Shopware()->Models()->getRepository('Shopware\Models\Attribute\CustomerGroup'); |
| 428 |
|
/** @var \Shopware\Models\Attribute\CustomerGroup $model */ |
| 429 |
|
$model = $repo->findOneBy(array('connectGroup' => true)); |
| 430 |
|
|
| 431 |
|
$customerGroup = null; |
| 432 |
|
if ($model && $model->getCustomerGroup()) { |
| 433 |
|
return $model->getCustomerGroup(); |
| 434 |
|
} |
| 435 |
|
|
| 436 |
|
return null; |
| 437 |
|
} |
| 438 |
|
|
| 439 |
|
/** |
| 440 |
|
* Load article detail |