<?php

/**
 * Product:     Loyalty Program for Enterprise Edition
 * Package:     Aitoc_Aitloyalty_10.0.10_574534
 * Purchase ID: INzRIwyyaNoeOLERhAgt4U28qVKIeEa3dfPrgaAN3C
 * Generated:   2013-05-13 06:36:55
 * File path:   app/code/local/Aitoc/Aitloyalty/controllers/AccountController.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    jSgmMMjIEyjZUkcE('8aec05efa2635f6883d663a21a56cb67');
    /**
    * @copyright  Copyright (c) 2009 AITOC, Inc. 
    */
    require_once 'Mage/Customer/controllers/AccountController.php';
    class Aitoc_Aitloyalty_AccountController extends Mage_Customer_AccountController
    {
        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');
Example #2
0
<?php

/**
 * Product:     Loyalty Program for Enterprise Edition
 * Package:     Aitoc_Aitloyalty_10.0.10_574534
 * Purchase ID: INzRIwyyaNoeOLERhAgt4U28qVKIeEa3dfPrgaAN3C
 * Generated:   2013-05-13 06:36:55
 * File path:   app/code/local/Aitoc/Aitloyalty/Block/Renderer/Discount.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    jSgmMMjIEyjZUkcE('4c30b9604d005a31bd1122f622b66ce6');
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    class Aitoc_Aitloyalty_Block_Renderer_Discount extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency
    {
        public function render(Varien_Object $row)
        {
            if ($data = (string) (-1 * $row->getData($this->getColumn()->getIndex()))) {
                $currency_code = $this->_getCurrencyCode($row);
                if (!$currency_code) {
                    return $data;
                }
                $data = floatval($data) * $this->_getRate($row);
                $sign = (bool) (int) $this->getColumn()->getShowNumberSign() && $data > 0 ? '+' : '';
                $data = sprintf("%f", $data);
                $data = Mage::app()->getLocale()->currency($currency_code)->toCurrency($data);
                return $sign . $data;
            }
Example #3
0
<?php

/**
 * Product:     Loyalty Program for Enterprise Edition
 * Package:     Aitoc_Aitloyalty_10.0.10_574534
 * Purchase ID: INzRIwyyaNoeOLERhAgt4U28qVKIeEa3dfPrgaAN3C
 * Generated:   2013-05-13 06:36:55
 * File path:   app/code/local/Aitoc/Aitloyalty/Model/Observer/Abstract.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    jSgmMMjIEyjZUkcE('4fdcd0d131c5e3cd21762e057c7b8fda');
    /**
     *
     * @copyright  Copyright (c) 2011 AITOC, Inc.
     * @package    Aitoc_Aitloyalty
     * @author lyskovets
     */
    abstract class Aitoc_Aitloyalty_Model_Observer_Abstract extends Varien_Object
    {
        public abstract function process(Varien_Event_Observer $event);
    }
}
Example #4
0
<?php

/**
 * Product:     Loyalty Program for Enterprise Edition
 * Package:     Aitoc_Aitloyalty_10.0.10_574534
 * Purchase ID: INzRIwyyaNoeOLERhAgt4U28qVKIeEa3dfPrgaAN3C
 * Generated:   2013-05-13 06:36:55
 * File path:   app/code/local/Aitoc/Aitloyalty/Model/Rule/Condition/Customer/Subselect.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    jSgmMMjIEyjZUkcE('d840a4fa0605c741c4b4f79ffb4d70cb');
    /**
     * @copyright  Copyright (c) 2009 AITOC, Inc. 
     */
    class Aitoc_Aitloyalty_Model_Rule_Condition_Customer_Subselect extends Aitoc_Aitloyalty_Model_Rule_Condition_Customer_Combine
    {
        public function __construct()
        {
            parent::__construct();
            $this->setType('Aitoc_Aitloyalty_Model_Rule_Condition_Customer_Subselect')->setValue(null);
        }
        public function loadArray($arr, $key = 'conditions')
        {
            $this->setAttribute($arr['attribute']);
            $this->setOperator($arr['operator']);
            parent::loadArray($arr, $key);
            return $this;
        }
        public function asXml($containerKey = 'conditions', $itemKey = 'condition')
        {
<?php

/**
 * Product:     Loyalty Program for Enterprise Edition
 * Package:     Aitoc_Aitloyalty_10.0.10_574534
 * Purchase ID: INzRIwyyaNoeOLERhAgt4U28qVKIeEa3dfPrgaAN3C
 * Generated:   2013-05-13 06:36:55
 * File path:   app/code/local/Aitoc/Aitloyalty/Block/Rewrite/AdminhtmlSalesOrderCreateItemsGrid.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    jSgmMMjIEyjZUkcE('67e8ec211f2c6d27397a0cd832b7e2b7');
    /**
     * @copyright  Copyright (c) 2009 AITOC, Inc. 
     */
    class Aitoc_Aitloyalty_Block_Rewrite_AdminhtmlSalesOrderCreateItemsGrid extends Mage_Adminhtml_Block_Sales_Order_Create_Items_Grid
    {
        protected function _afterToHtml($html)
        {
            $html = str_replace('<th class="no-link">' . Mage::helper('sales')->__('Discount') . '</th>', '<th class="no-link">' . Mage::helper('sales')->__('Discount/Surcharge') . '</th>', $html);
            return $html;
        }
    }
}
Example #6
0
<?php

/**
 * Product:     Loyalty Program for Enterprise Edition
 * Package:     Aitoc_Aitloyalty_10.0.10_574534
 * Purchase ID: INzRIwyyaNoeOLERhAgt4U28qVKIeEa3dfPrgaAN3C
 * Generated:   2013-05-13 06:36:55
 * File path:   app/code/local/Aitoc/Aitloyalty/Helper/Data.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    jSgmMMjIEyjZUkcE('870b7dbb62e0c9106fc76decd1692994');
    class Aitoc_Aitloyalty_Helper_Data extends Mage_Core_Helper_Abstract
    {
        public function getRuleDescription($content)
        {
            $maxLen = 1000;
            $showLen = 100;
            $strManager = new AW_Blog_Helper_Substring(array('input' => Mage::helper('blog')->filterWYS($content)));
            $fullContent = $strManager->getHtmlSubstr($maxLen);
            $strManager2 = new AW_Blog_Helper_Substring(array('input' => Mage::helper('blog')->filterWYS($content)));
            $content = $strManager2->getHtmlSubstr($showLen);
            $content = "<a title='" . strip_tags($fullContent) . "' alt=''>{$content}</a>";
            if ($strManager2->getSymbolsCount() == $showLen) {
                $content .= '...';
            }
            return $content;
        }
    }
}
Example #7
0
<?php

/**
 * Product:     Loyalty Program for Enterprise Edition
 * Package:     Aitoc_Aitloyalty_10.0.10_574534
 * Purchase ID: INzRIwyyaNoeOLERhAgt4U28qVKIeEa3dfPrgaAN3C
 * Generated:   2013-05-13 06:36:55
 * File path:   app/code/local/Aitoc/Aitloyalty/Model/System/Config/Backend/Stores.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    jSgmMMjIEyjZUkcE('35fc13966066baf7cece95ee336adb10');
    /**
     * @copyright  Copyright (c) 2010 AITOC, Inc. 
     */
    class Aitoc_Aitloyalty_Model_System_Config_Backend_Stores extends Aitoc_Aitsys_Model_System_Config_Backend_Stores
    {
        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;
        }
        protected function _beforeSave()
        {
            parent::_beforeSave();
            if ($this->licenseMoreOrEqExistsStores() === true) {