예제 #1
0
 /**
  * Prepare data for 'low limit warning' email notifications
  *
  * @return array
  */
 protected function prepareDataForNotification()
 {
     $data = array();
     $product = $this->getProduct();
     $data['product'] = $product;
     $data['name'] = $product->getName();
     $data['sku'] = $this->getDisplaySku();
     $data['amount'] = $this->getAmount();
     $params = array('product_id' => $product->getProductId(), 'page' => 'inventory');
     $data['adminURL'] = \XLite\Core\Converter::buildFullURL('product', '', $params, \XLite::getAdminScript());
     return $data;
 }
예제 #2
0
파일: AView.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Defines the admin URL
  *
  * @return string
  */
 protected function getAdminURL()
 {
     return \XLite::getInstance()->getShopURL(\XLite::getAdminScript());
 }
예제 #3
0
 /**
  * Initialization
  *
  * @return void
  */
 public static function initialize()
 {
     if (static::isDropCacheRequested()) {
         // Drop classes cache
         \Includes\Decorator\Utils\CacheManager::cleanupCacheIndicators();
         // Redirect to avoid loop
         \Includes\Utils\Operator::redirect(\XLite::getAdminScript() . '?target=main');
     } elseif (static::isSafeModeRequested() && !static::isSafeModeStarted()) {
         $restorePoint = null;
         if (static::isRestoreDateSet()) {
             $restorePoint = \Includes\Utils\ModulesManager::getRestorePoint(static::getRestoreDate());
         }
         if (static::isSoftwareResetEnabled()) {
             if (!($restorePoint != null ^ static::isRestoreDateSet())) {
                 // Put safe mode indicator
                 \Includes\Utils\FileManager::write(static::getIndicatorFileName(), static::getIndicatorFileContent());
                 // Clean cache indicators to force cache generation
                 \Includes\Decorator\Utils\CacheManager::cleanupCacheIndicators();
             } else {
                 $date = \DateTime::createFromFormat(\Includes\Utils\ModulesManager::RESTORE_DATE_FORMAT, static::getRestoreDate());
                 \Includes\Decorator\Utils\PersistentInfo::set('restoreFailed', $date->getTimestamp());
             }
         }
         // Redirect to avoid loop
         \Includes\Utils\Operator::redirect(\XLite::getAdminScript() . '?target=main');
     }
 }
예제 #4
0
 /**
  * Get iframe URL
  *
  * @return string
  */
 public function getIframeUrl()
 {
     return \XLite\Module\CDev\XPaymentsConnector\Core\ZeroAuth::getInstance()->getIframeUrl($this->getCustomerProfile(), \XLite::getAdminScript());
 }
 /**
  * Get finishOperateAs action url
  * 
  * @return string
  */
 protected function getFinishOperateAsUrl()
 {
     return \XLite\Core\Converter::buildURL('profile', 'finishOperateAs', array(), \XLite::getAdminScript());
 }
예제 #6
0
 /**
  * Return link to settings form
  *
  * @return string
  */
 public function getSettingsForm()
 {
     $params = array('moduleId' => $this->getModuleId(), 'returnTarget' => \XLite::getController()->getTarget());
     return $this->callModuleMethod('getSettingsForm') ?: \XLite\Core\Converter::buildURL('module', '', $params, \XLite::getAdminScript());
 }
예제 #7
0
 /**
  * Returns orders full url in admin area
  *
  * @return string
  */
 protected function getOrderAdminUrl()
 {
     return \XLite\Core\Converter::buildFullURL('order', '', array('order_number' => $this->getOrder()->getOrderNumber()), \XLite::getAdminScript());
 }
예제 #8
0
 /**
  * Send notification about updated profile to the user
  *
  * @param \XLite\Model\Profile $profile  Profile object
  * @param string               $password Profile password OPTIONAL
  *
  * @return void
  */
 public static function sendProfileUpdatedCustomer(\XLite\Model\Profile $profile, $password = null)
 {
     $interface = $profile->isAdmin() ? \XLite::getAdminScript() : \XLite::getCustomerScript();
     $url = \XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('login', '', array(), $interface));
     static::register(array('profile' => $profile, 'password' => $password, 'url' => $url));
     static::compose(static::TYPE_PROFILE_UPDATED_CUSTOMER, static::getSiteAdministratorMail(), $profile->getLogin(), 'profile_modified', array(), true, \XLite::CUSTOMER_INTERFACE, static::getMailer()->getLanguageCode(\XLite::CUSTOMER_INTERFACE, $profile->getLanguage()));
 }