소스 검색

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Guillaume 3 년 전
부모
커밋
80ab0f2ad3
3개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -1
      Controller/User/UserAdminController.php
  2. +2
    -1
      Repository/Product/ProductFamilyRepositoryQuery.php
  3. +2
    -1
      Repository/StoreTrait.php

+ 2
- 1
Controller/User/UserAdminController.php 파일 보기

@@ -31,7 +31,8 @@ abstract class UserAdminController extends SovUserAdminController
foreach ($entity->getActions() as $action){
if($action->getName() == ActionDefinition::SWITCH_USER){
$sectionDefault = $this->getSectionContainer()->getStore()->setMerchant($this->getMerchantCurrent())->getOneDefault();
$url = $this->generateUrl($this->getParameter('lc_sov.homepage_route'), array('_switch_user' => $entity->getInstance()->getEmail(), 'section'=> $sectionDefault));
dump($sectionDefault);
$url = $this->generateUrl($this->getParameter('lc_sov.homepage_route'), array('_switch_user' => $entity->getInstance()->getEmail(), 'section'=> $sectionDefault->getSlug()));
$action->setLinkUrl($url);
}
}

+ 2
- 1
Repository/Product/ProductFamilyRepositoryQuery.php 파일 보기

@@ -29,7 +29,8 @@ class ProductFamilyRepositoryQuery extends AbstractRepositoryQuery

$this->leftJoin('.productFamilySectionProperties', 'productFamilySectionProperties');
if ($addSelect) {
$this->addSelect('productFamilySectionProperties');
//NB : Ici le select est en commentaire car si il est actif doctrine n'hydrate pas correectement ProductFamilySectionProperties (si filtre sur section les ProductFamilySectionProperties des autres sections ne sont pas chargé et ça peut être problématique pr la gestion des stocks)
//$this->addSelect('productFamilySectionProperties');
}
}
return $this;

+ 2
- 1
Repository/StoreTrait.php 파일 보기

@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Repository;

trait StoreTrait
{
public function resetContext(): void
public function resetContext(): self
{
if(method_exists($this, 'setMerchant')) {
$this->setMerchant(null);
@@ -13,5 +13,6 @@ trait StoreTrait
if(method_exists($this, 'setSection')) {
$this->setSection(null);
}
return $this;
}
}

Loading…
취소
저장