/**
  * Retrieve product
  *
  * @return \Magento\Catalog\Model\Product
  */
 public function getProduct()
 {
     $product = parent::getProduct();
     if ($product && $product->getTypeInstance()->getStoreFilter($product) === null) {
         $product->getTypeInstance()->setStoreFilter($this->_storeManager->getStore(), $product);
     }
     return $product;
 }
示例#2
0
 public function testGetProduct()
 {
     $this->assertSame($this->_product, $this->_block->getProduct());
 }