Example #1
0
 /**
  * Return Google Content Service Instance
  *
  * @param int $storeId
  * @return \Magento\Framework\Gdata\Gshopping\Content
  */
 public function getService($storeId = null)
 {
     if (!$this->_service) {
         $this->_service = $this->_connect($storeId);
         if ($this->getConfig()->getIsDebug($storeId)) {
             $this->_service->setLogAdapter($this->logger, 'debug')->setDebug(true);
         }
     }
     return $this->_service;
 }
Example #2
0
 /**
  * Return Google Content Service Instance
  *
  * @param int $storeId
  * @return \Magento\Framework\Gdata\Gshopping\Content
  */
 public function getService($storeId = null)
 {
     if (!$this->_service) {
         $this->_service = $this->_connect($storeId);
         if ($this->getConfig()->getIsDebug($storeId)) {
             $this->_service->setLogAdapter($this->_logAdapterFactory->create(array('fileName' => 'googleshopping.log')), 'log')->setDebug(true);
         }
     }
     return $this->_service;
 }