本文整理汇总了PHP中Aitoc_Aitsys_Abstract_Service::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Aitoc_Aitsys_Abstract_Service::get方法的具体用法?PHP Aitoc_Aitsys_Abstract_Service::get怎么用?PHP Aitoc_Aitsys_Abstract_Service::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aitoc_Aitsys_Abstract_Service
的用法示例。
在下文中一共展示了Aitoc_Aitsys_Abstract_Service::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkIfCaptchaEnabled
public function checkIfCaptchaEnabled()
{
if ($this->_enabled === null) {
$this->_enabled = $this->checkIfFormAdditionalInfoAllowed() && Aitoc_Aitsys_Abstract_Service::get()->isModuleActive('Mage_Captcha');
}
return $this->_enabled;
}
示例2: _saveCustomerRequiredData
protected function _saveCustomerRequiredData()
{
if (!$this->_getOnepage()->getCustomerSession()->getCustomerId()) {
return;
}
$data = $requiredData = $this->getRequest()->getPost();
$customer = $this->_getOnepage()->getCustomerSession()->getCustomer();
if (Aitoc_Aitsys_Abstract_Service::get()->isMagentoVersion('>=1.5')) {
$customerForm = Mage::getModel('customer/form');
$customerForm->setFormCode('checkout_register')->setIsAjaxRequest(Mage::app()->getRequest()->isAjax());
$customerForm->setEntity($customer);
$customerRequest = $customerForm->prepareRequest($data);
$customerFields = $customerForm->extractData($customerRequest);
} else {
$customerFields = array('firstname' => 'firstname', 'lastname' => 'lastname', 'email' => 'email', 'dob' => 'dob', 'taxvat' => 'taxvat', 'gender' => 'gender', 'suffix' => 'suffix', 'prefix' => 'prefix');
}
$requiredData = $this->getRequest()->getPost('billing');
foreach ($requiredData as $fieldId => $value) {
if (isset($customerFields[$fieldId])) {
$customer->setData($fieldId, $value);
}
}
$customer->save();
$this->_getOnepage()->getQuote()->setCustomer($customer);
}
示例3: validateAction
public function validateAction()
{
$key = Mage::app()->getRequest()->getParam('key');
if ($key) {
$value = Aitoc_Aitsys_Abstract_Service::get()->getLicenseHelper()->getValidationValue($key);
echo $value;
}
}
示例4: isMessagesAvailable
public function isMessagesAvailable()
{
if (Aitoc_Aitsys_Abstract_Service::get()->isMagentoVersion('>=1.4.2')) {
return parent::isMessagesAvailable();
} else {
return Mage::helper('giftmessage/message')->isMessagesAvailable('quote', $this->getEntity());
}
}
示例5: checkIfEbizmartsSagePaySuiteActive
/**
*
* @return boolean
*/
public function checkIfEbizmartsSagePaySuiteActive()
{
try {
return Aitoc_Aitsys_Abstract_Service::get()->isModuleActive('Ebizmarts_SagePaySuite');
} catch (Exception $e) {
return false;
}
}
示例6: checkIfAitocAitcheckoutIsActive
/**
* @return boolean
*/
public function checkIfAitocAitcheckoutIsActive()
{
try {
return (bool) Aitoc_Aitsys_Abstract_Service::get()->isModuleActive('Aitoc_Aitcheckout');
} catch (Exception $e) {
}
return false;
}
示例7: onModelSaveAfter
public function onModelSaveAfter($observer)
{
$model = $observer->getObject();
if ($model instanceof Mage_SalesRule_Model_Rule) {
if (isset($_POST['rule'])) {
$oResource = Mage::getSingleton('core/resource');
$sDisplayTable = $oResource->getTableName('aitoc_salesrule_display');
$sTitlesTable = $oResource->getTableName('aitoc_salesrule_display_title');
// delete items
$oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
$oDb->delete($sDisplayTable, 'rule_id = ' . $model->getRuleId());
// delete titles
$oDb->delete($sTitlesTable, 'rule_id = ' . $model->getRuleId());
$oReq = Mage::app()->getFrontController()->getRequest();
$data = $oReq->getPost();
if ($data) {
if (!empty($data['aitloyalty_customer_display_enable'])) {
Mage::helper('aitloyalty/legal')->setHasLoyaltyFeatures();
$aDBInfo = array('rule_id' => $model->getRuleId(), 'coupone_enable' => $data['aitloyalty_customer_display_coupon']);
$oDb->insert($sDisplayTable, $aDBInfo);
// insert titles
if (!empty($data['aitloyalty_customer_display_titles'])) {
foreach ($data['aitloyalty_customer_display_titles'] as $iStoreId => $sValue) {
$aDBInfo = array('rule_id' => $model->getRuleId(), 'store_id' => $iStoreId, 'value' => $sValue);
$oDb->insert($sTitlesTable, $aDBInfo);
}
}
}
}
}
/* */
if (Mage::helper('aitloyalty/legal')->getHasLoyaltyFeatures()) {
$license = Aitoc_Aitsys_Abstract_Service::get()->platform()->getModule('Aitoc_Aitloyalty')->getLicense();
$rulesInfo = Mage::helper('aitsys/license')->getRulesInfo($license);
$licensedStores = Mage::getStoreConfig('aitsys/modules/Aitoc_Aitloyalty');
if (!is_array($licensedStores)) {
$licensedStores = explode(',', $licensedStores);
}
$websiteIds = $model->getWebsiteIds();
if (!is_array($websiteIds)) {
$websiteIds = explode(',', $websiteIds);
}
array_push($licensedStores, '');
if (!$license->isInstalled()) {
Mage::helper('aitloyalty/legal')->setIsNotifyRestrictedFeatures();
} elseif (null !== $rulesInfo['store']['licensed'] && $rulesInfo['store']['licensed'] < $rulesInfo['store']['total'] && count(array_diff($websiteIds, $licensedStores))) {
Mage::helper('aitloyalty/legal')->setIsNotifyRestrictedFeatures();
}
}
if (Mage::helper('aitloyalty/legal')->getIsNotifyRestrictedFeatures()) {
$session = Mage::getSingleton('core/session');
$session->addWarning(Mage::helper('aitloyalty')->__('Aitoc Loyalty Program functionality is disabled for some stores in websites you specified'));
}
/**/
}
}
示例8: licenseMoreOrEqExistsStores
private function licenseMoreOrEqExistsStores()
{
$license = Aitoc_Aitsys_Abstract_Service::get()->platform()->getModule('Aitoc_Aitloyalty')->getLicense();
$rulesInfo = Mage::helper('aitsys/license')->getRulesInfo($license);
$licensedStores = explode(',', Mage::getStoreConfig('aitsys/modules/Aitoc_Aitloyalty'));
if (null !== $rulesInfo['store']['licensed'] && $rulesInfo['store']['licensed'] >= $rulesInfo['store']['total']) {
return true;
}
return false;
}
示例9: applyExcludeFilesRule
/**
* Removes some collected files
*
* @return Aitoc_Aitsys_Model_Compiler_Rules
*/
public function applyExcludeFilesRule()
{
foreach (array_keys($this->getCompileConfig()->getNode('exclude_files')->asArray()) as $exclusion) {
$target = $this->getIncludeDir() . DS . $exclusion . '.php';
if (@file_exists($target)) {
Aitoc_Aitsys_Abstract_Service::get()->filesystem()->rmFile($target);
}
}
return $this;
}
示例10: permissionsAction
public function permissionsAction()
{
$mode = Mage::app()->getRequest()->getParam('mode');
try {
Aitoc_Aitsys_Abstract_Service::get()->filesystem()->permissonsChange($mode);
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('aitsys')->__('Write permissions were changed successfully'));
// Aitoc_Aitsys_Abstract_Service::get()->getCache()->remove('aitsys_db_config'); // removed from 2.20
} catch (Exception $e) {
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('aitsys')->__('There was an error while changing write permissions. Permissions were not changed.'));
}
$this->_redirect('*/index');
}
示例11: isShow
public function isShow()
{
$customerSession = Mage::getSingleton('customer/session');
if (!$customerSession->isLoggedIn()) {
if (Aitoc_Aitsys_Abstract_Service::get()->isMagentoVersion('>=1.4.1')) {
return Mage::getStoreConfigFlag(Mage_Newsletter_Model_Subscriber::XML_PATH_ALLOW_GUEST_SUBSCRIBE_FLAG);
} else {
return true;
}
}
return false;
}
示例12: _isUseCustomActions
/**
* Check if rule can be applied for custom actions
*
* @return bool
*/
protected static function _isUseCustomActions()
{
if (null === self::$_isUseCustomActions) {
self::$_isUseCustomActions = true;
$iStoreId = Mage::app()->getStore()->getId();
$iSiteId = Mage::app()->getWebsite()->getId();
/* */
$performer = Aitoc_Aitsys_Abstract_Service::get()->platform()->getModule('Aitoc_Aitloyalty')->getLicense()->getPerformer();
$ruler = $performer->getRuler();
if (!($ruler->checkRule('store', $iStoreId, 'store') || $ruler->checkRule('store', $iSiteId, 'website'))) {
self::$_isUseCustomActions = false;
}
/* */
}
return self::$_isUseCustomActions;
}
示例13: promostatsAction
public function promostatsAction()
{
$iStoreId = Mage::app()->getStore()->getId();
$iSiteId = Mage::app()->getWebsite()->getId();
/* */
$performer = Aitoc_Aitsys_Abstract_Service::get()->platform()->getModule('Aitoc_Aitloyalty')->getLicense()->getPerformer();
$ruler = $performer->getRuler();
if (!($ruler->checkRule('store', $iStoreId, 'store') || $ruler->checkRule('store', $iSiteId, 'website'))) {
return $this->_redirect('customer/account/');
}
/* */
$this->loadLayout();
$this->_initLayoutMessages('customer/session');
$this->getLayout()->getBlock('head')->setTitle($this->__('My Coupons'));
$this->renderLayout();
}
示例14: setValidationFilter
public function setValidationFilter($websiteId, $customerGroupId, $couponCode = '', $now = null)
{
/* */
$iStoreId = Mage::app()->getStore()->getId();
$iSiteId = Mage::app()->getWebsite()->getId();
$performer = Aitoc_Aitsys_Abstract_Service::get()->platform()->getModule('Aitoc_Aitindividpromo')->getLicense()->getPerformer();
$ruler = $performer->getRuler();
if (!($ruler->checkRule('store', $iStoreId, 'store') || $ruler->checkRule('store', $iSiteId, 'website'))) {
return parent::setValidationFilter($websiteId, $customerGroupId, $couponCode);
}
/* */
if (version_compare(Mage::getVersion(), '1.12.0.0', '>=')) {
return parent::setValidationFilter($websiteId, $customerGroupId, $couponCode, $now);
} else {
return $this->_setValidationFilter14($websiteId, $customerGroupId, $couponCode, $now);
}
}
示例15: _beforeSave
protected function _beforeSave()
{
$path = $this->getPath();
$path = explode('/', $path);
$moduleKey = array_pop($path);
$tool = Aitoc_Aitsys_Abstract_Service::get();
$helper = $tool->getHelper();
$module = $tool->platform()->getModule($moduleKey);
if (!$module) {
Mage::throwException($helper->__($helper->getErrorText('seg_config_stores_module_not_found'), (string) $moduleKey));
}
$performer = $module->getLicense()->getPerformer();
if (!$performer) {
Mage::throwException($helper->__($helper->getErrorText('seg_config_module_license_not_found'), (string) $moduleKey));
}
$performer->filterStoreConfigValue($this->getValue());
}