ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Lts\Catalog\Helper;
|
||||
|
||||
use Magento\Framework\App\Helper\Context;
|
||||
|
||||
class ShowProductOrNot extends \Magento\Framework\App\Helper\AbstractHelper
|
||||
{
|
||||
protected \Magento\Customer\Model\Session $customerSession;
|
||||
|
||||
public function __construct(
|
||||
Context $context,
|
||||
\Magento\Customer\Model\Session $customerSession,
|
||||
) {
|
||||
parent::__construct($context);
|
||||
$this->customerSession = $customerSession;
|
||||
}
|
||||
|
||||
public function checkByNetsuiteStatus(): bool
|
||||
{
|
||||
// Kept under the legacy method name because it is used by existing
|
||||
// category, checkout and product templates. The approved design uses
|
||||
// authentication itself as the dealer-pricing/purchase boundary.
|
||||
return $this->customerSession->isLoggedIn();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user