-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ffe489
commit 339c2e5
Showing
10 changed files
with
198 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Gally to newer versions in the future. | ||
* | ||
* @package Gally | ||
* @author Gally Team <[email protected]> | ||
* @copyright 2024-present Smile | ||
* @license Open Software License v. 3.0 (OSL-3.0) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Gally\OroPlugin\Decorator; | ||
|
||
use Gally\OroPlugin\Search\SearchRegistry; | ||
use Oro\Bundle\FilterBundle\Datasource\FilterDatasourceAdapterInterface; | ||
use Oro\Bundle\FilterBundle\Filter\FilterInterface; | ||
use Oro\Bundle\SearchBundle\Datagrid\Filter\SearchNumberFilter; | ||
|
||
class SavePriceFilterUnit implements FilterInterface | ||
{ | ||
public function __construct( | ||
private SearchNumberFilter $decorated, | ||
private SearchRegistry $searchRegistry, | ||
) { | ||
} | ||
|
||
public function init($name, array $params) | ||
{ | ||
$this->decorated->init($name, $params); | ||
} | ||
|
||
public function getName() | ||
{ | ||
return $this->decorated->getName(); | ||
} | ||
|
||
public function getForm() | ||
{ | ||
return $this->decorated->getForm(); | ||
} | ||
|
||
public function getMetadata() | ||
{ | ||
return $this->decorated->getMetadata(); | ||
} | ||
|
||
public function resolveOptions() | ||
{ | ||
return $this->decorated->resolveOptions(); | ||
} | ||
|
||
public function apply(FilterDatasourceAdapterInterface $ds, $data): void | ||
{ | ||
if (isset($data['unit'])) { | ||
$this->searchRegistry->setPriceFilterUnit($data['unit']); | ||
} | ||
$this->decorated->apply($ds, $data); | ||
} | ||
|
||
public function prepareData(array $data): array | ||
{ | ||
return $this->decorated->prepareData($data); | ||
} | ||
|
||
public function setFilterState($state): void | ||
{ | ||
$this->decorated->setFilterState($state); | ||
} | ||
|
||
public function getFilterState() | ||
{ | ||
return $this->decorated->getFilterState(); | ||
} | ||
|
||
public function reset(): void | ||
{ | ||
$this->decorated->reset(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,31 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Gally to newer versions in the future. | ||
* | ||
* @package Gally | ||
* @author Gally Team <[email protected]> | ||
* @copyright 2024-present Smile | ||
* @license Open Software License v. 3.0 (OSL-3.0) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Gally\OroPlugin\Resolver; | ||
|
||
class PriceGroupResolver | ||
{ | ||
|
||
public function getGroupId(bool $isCPLUsed, int $priceListId, string $currency, ?string $unit): string | ||
{ | ||
return implode( | ||
'_', | ||
array_filter([ | ||
$isCPLUsed ? 'cpl' : 'pl', | ||
$priceListId, | ||
$currency, | ||
$unit, | ||
]) | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Gally to newer versions in the future. | ||
* | ||
* @package Gally | ||
* @author Gally Team <[email protected]> | ||
* @copyright 2024-present Smile | ||
* @license Open Software License v. 3.0 (OSL-3.0) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Gally\OroPlugin\Search; | ||
|
||
use Oro\Bundle\CustomerBundle\Entity\Customer; | ||
use Oro\Bundle\EntityBundle\ORM\DoctrineHelper; | ||
use Oro\Bundle\SearchBundle\Query\Criteria\Criteria; | ||
use Oro\Bundle\SearchBundle\Query\Query; | ||
use Oro\Bundle\VisibilityBundle\Driver\AbstractCustomerPartialUpdateDriver; | ||
use Oro\Bundle\VisibilityBundle\Entity\VisibilityResolved\BaseVisibilityResolved; | ||
use Oro\Bundle\VisibilityBundle\Indexer\ProductVisibilityIndexer; | ||
use Oro\Bundle\VisibilityBundle\Visibility\Provider\ProductVisibilityProvider; | ||
use Oro\Bundle\WebsiteElasticSearchBundle\Manager\ElasticSearchPartialUpdateManager; | ||
use Oro\Bundle\WebsiteSearchBundle\Provider\PlaceholderProvider; | ||
|
||
/** | ||
* Driver for the partial update of the customer visibility in the website search index | ||
* Driver for the partial update of the customer visibility in the website search index. | ||
*/ | ||
class CustomerPartialUpdateDriver extends AbstractCustomerPartialUpdateDriver | ||
{ | ||
|
Oops, something went wrong.