ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,35 @@
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Hide Price (Call for Price) for Magento 2
*/
namespace Amasty\HidePrice\Plugin\Catalog\Model\Option;
class Value
{
/**
* @var \Amasty\HidePrice\Helper\Data
*/
private $helper;
public function __construct(
\Amasty\HidePrice\Helper\Data $helper
) {
$this->helper = $helper;
}
public function afterGetPrice(
$subject,
$result
) {
if ($this->helper->isNeedHideProduct($subject->getOption()->getProduct())
&& !$subject->getOption()->getDisableHideprice()
) {
return '';
}
return $result;
}
}
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Hide Price (Call for Price) for Magento 2
*/
namespace Amasty\HidePrice\Plugin\Catalog\Model\Product\Option\Type;
use Magento\Catalog\Model\Product\Option\Type\Select;
class DisableOptionsHidePriceInQuote
{
/**
* @see Select::getOptionPrice()
*
* @param Select $subject
* @param string $result
*
* @return void
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function beforeGetOptionPrice(Select $subject, string $result): void
{
$subject->getOption()->setData('disable_hideprice', true);
}
}