Beispiel #1
0
 /**
  * Returns true if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     /** @var \XLite\Model\Cart $cart */
     $cart = $this->getCart();
     return parent::isVisible() && $cart && 0 < $cart->getTotal() && \XLite\Module\CDev\Paypal\Main::isPaypalCreditEnabled($cart) && $cart->checkCart();
 }
Beispiel #2
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     $result = parent::isVisible() && (Paypal\Main::isPaypalCreditEnabled() || Paypal\Main::isPaypalWPSEnabled()) && $this->isValidTarget() && $this->getPublisherId() && $this->getSetting('agreement');
     if ($result) {
         $settingName = 'bannerOn' . ucfirst($this->getParam(static::PARAM_PAGE));
         $result = $this->getParam(static::PARAM_POSITION) == $this->getSetting($settingName);
     }
     return $result;
 }