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





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

Loading…
Cancel
Save