示例#1
0
 public function __construct(Context $context, StoreManagerInterface $storeManager, MerchantCollection $merchantCollection, CustomerRegistry $customerRegistry)
 {
     parent::__construct($context);
     $website = $storeManager->getWebsite();
     $this->merchant = $merchantCollection->getItemById($website->getId())->getMerchant();
     $this->customerRegistry = $customerRegistry;
 }
示例#2
0
 public function __construct(Context $context, StoreManagerInterface $storeManager, CustomerFactory $customerFactory, AddressFactory $addressFactory, Session $customerSession, ProductRepositoryInterface $productRepository, Cart $cart, Collection $merchantCollection, Application $application)
 {
     parent::__construct($context);
     $this->customerFactory = $customerFactory;
     $this->addressFactory = $addressFactory;
     $this->customerSession = $customerSession;
     $this->productRepository = $productRepository;
     $this->cart = $cart;
     $this->merchant = $merchantCollection->getItemById($storeManager->getWebsite()->getId())->getMerchant();
     $this->application = $application->getApp();
     $this->countryProvider = $this->application['country_code.provider'];
 }