Browse Source

Correctif MerchantResolver

packProduct
Guillaume 3 years ago
parent
commit
f2c5e9226a
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      Resolver/MerchantResolver.php

+ 3
- 1
Resolver/MerchantResolver.php View File

@@ -8,6 +8,8 @@ namespace Lc\CaracoleBundle\Resolver;


use Doctrine\ORM\EntityManagerInterface;
use Lc\CaracoleBundle\Definition\MerchantSettingDefinition;
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\CaracoleBundle\Model\User\UserMerchantInterface;
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository;
@@ -64,7 +66,7 @@ class MerchantResolver
} // distant
else {
foreach ($merchants as $merchant) {
$url = $merchant->getMerchantConfig('url');
$url = $merchant->getMerchantSettingValue(MerchantSettingDefinition::SETTING_URL);
if ($url && strlen($url) && strpos($url, $_SERVER['HTTP_HOST']) !== false) {
$this->currentMerchant = $merchant;
}

Loading…
Cancel
Save