本文整理汇总了PHP中Aitoc_Aitsys_Abstract_Service类的典型用法代码示例。如果您正苦于以下问题:PHP Aitoc_Aitsys_Abstract_Service类的具体用法?PHP Aitoc_Aitsys_Abstract_Service怎么用?PHP Aitoc_Aitsys_Abstract_Service使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Aitoc_Aitsys_Abstract_Service类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get
/**
* @return Aitoc_Aitsys_Abstract_Service
*/
public static function get($object = null)
{
if (!self::$_instance) {
self::$_instance = new self();
}
return self::$_instance->setCurrentObject($object);
}
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:10,代码来源:Service.php
示例2: checkIfCaptchaEnabled
public function checkIfCaptchaEnabled()
{
if ($this->_enabled === null) {
$this->_enabled = $this->checkIfFormAdditionalInfoAllowed() && Aitoc_Aitsys_Abstract_Service::get()->isModuleActive('Mage_Captcha');
}
return $this->_enabled;
}
开发者ID:Madhurabhat,项目名称:test,代码行数:7,代码来源:Captcha.php
示例3: _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);
}
开发者ID:Madhurabhat,项目名称:test,代码行数:25,代码来源:CheckoutController.php
示例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());
}
}
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:8,代码来源:Giftmessage.php
示例5: checkIfAitocAitcheckoutIsActive
/**
* @return boolean
*/
public function checkIfAitocAitcheckoutIsActive()
{
try {
return (bool) Aitoc_Aitsys_Abstract_Service::get()->isModuleActive('Aitoc_Aitcheckout');
} catch (Exception $e) {
}
return false;
}
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:11,代码来源:Data.php
示例6: checkIfEbizmartsSagePaySuiteActive
/**
*
* @return boolean
*/
public function checkIfEbizmartsSagePaySuiteActive()
{
try {
return Aitoc_Aitsys_Abstract_Service::get()->isModuleActive('Ebizmarts_SagePaySuite');
} catch (Exception $e) {
return false;
}
}
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:12,代码来源:Sagepay.php
示例7: validateAction
public function validateAction()
{
$key = Mage::app()->getRequest()->getParam('key');
if ($key) {
$value = Aitoc_Aitsys_Abstract_Service::get()->getLicenseHelper()->getValidationValue($key);
echo $value;
}
}
开发者ID:CherylMuniz,项目名称:fashion,代码行数:8,代码来源:ValidateController.php
示例8: 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'));
}
/**/
}
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:56,代码来源:Observer.php
示例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;
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:15,代码来源:Rules.php
示例10: 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;
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:10,代码来源:Stores.php
示例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;
}
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:12,代码来源:Subscribe.php
示例12: 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');
}
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:12,代码来源:IndexController.php
示例13: _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;
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:21,代码来源:FrontSalesRuleValidator.php
示例14: 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();
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:16,代码来源:AccountController.php
示例15: 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);
}
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:17,代码来源:SalesRuleResourceRuleCollection.php
示例16: _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());
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:17,代码来源:Stores.php
示例17: getInstance
/**
*
* @return Aitoc_Aitsys_Model_Platform
*/
public static function getInstance()
{
if (!self::$_instance) {
self::$_instance = new self();
try {
try {
self::$_instance->init();
} catch (Exception $exc) {
self::$_instance->block();
throw $exc;
}
} catch (Aitoc_Aitsys_Model_Aitfilesystem_Exception $exc) {
$msg = "Error in the file: %s. Probably it does not have write permissions.";
self::$_instance->addAdminError(Aitoc_Aitsys_Abstract_Service::get()->getHelper()->__($msg, $exc->getMessage()));
}
}
return self::$_instance;
}
开发者ID:CherylMuniz,项目名称:fashion,代码行数:22,代码来源:Platform.php
示例18: addLink
public function addLink($name, $path, $label, $urlParams = array())
{
$isAddLink = true;
if ('aitloyalty' == $name) {
$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'))) {
$isAddLink = false;
}
/* */
}
if ($isAddLink) {
parent::addLink($name, $path, $label, $urlParams);
}
return $this;
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:19,代码来源:FrontAccountNavigation.php
示例19: 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 (is_null($now)) {
$now = Mage::getModel('core/date')->date('Y-m-d');
}
$this->addBindParam('code', $couponCode);
$this->getSelect()->where('is_active=1');
$this->getSelect()->where('find_in_set(?, website_ids)', (int) $websiteId);
$iCustomerId = Mage::getSingleton('customer/session')->getCustomerId();
$oResource = Mage::getSingleton('core/resource');
$sTable = $oResource->getTableName('aitoc_salesrule_assign_cutomer');
if ($sTable) {
if (!$iCustomerId) {
$iCustomerId = 0;
// fix for create order by admin
if ($_SESSION and isset($_SESSION['adminhtml_quote']) and isset($_SESSION['adminhtml_quote']['customer_id']) and $_SESSION['adminhtml_quote']['customer_id']) {
$iCustomerId = $_SESSION['adminhtml_quote']['customer_id'];
}
}
$this->getSelect()->joinLeft(array('rc' => $sTable), 'main_table.rule_id = rc.entity_id AND rc.customer_id = ' . $iCustomerId);
$sWhere = '(rc.entity_id IS NOT NULL) OR (find_in_set("' . (int) $customerGroupId . '", customer_group_ids))';
$this->getSelect()->where($sWhere);
}
if (empty($couponCode)) {
$this->getSelect()->where("code is null or code=''");
} else {
$this->getSelect()->where("code is null or code='' or code=:code");
}
$this->getSelect()->where('from_date is null or from_date<=?', $now);
$this->getSelect()->where('to_date is null or to_date>=?', $now);
$this->getSelect()->order('sort_order');
return $this;
}
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:42,代码来源:SalesRuleMysql4RuleCollection.php
示例20: _copy
protected function _copy($source, $target, $firstIteration = true)
{
parent::_copy($source, $target, $firstIteration);
if (is_file($target) && file_exists($target)) {
$platform = Aitoc_Aitsys_Abstract_Service::get()->platform();
$dirs = $platform->getModuleDirs();
foreach ($dirs as $dir) {
if ($item = strstr($source, $dir)) {
if ($item != $dir) {
file_put_contents($target, '<?php class_exists("Mage_Adminhtml_Controller_Action"); require_once "' . $source . '";?>');
return $this;
}
}
}
$name = pathinfo($target, PATHINFO_FILENAME);
$loader = Aitoc_Aitsys_Model_Rewriter_Autoload::instance();
if ($loader->hasClass($name)) {
$path = $loader->getRewriteDir();
$source = <<<SOURCE
<?php
class_exists("Mage_Adminhtml_Controller_Action");
function _{$name}_autoloader( \$class )
{
foreach (glob('{$path}*') as \$path)
{
require_once \$path;
}
}
if (defined('AITSYS_REWRITED')) return;
spl_autoload_register('_{$name}_autoloader');
_{$name}_autoloader(null);
spl_autoload_unregister('_{$name}_autoloader');
define('AITSYS_REWRITED',true);
SOURCE;
file_put_contents($target, '');
}
}
return $this;
}
开发者ID:CherylMuniz,项目名称:fashion,代码行数:40,代码来源:Process.php
注:本文中的Aitoc_Aitsys_Abstract_Service类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论