Example #1
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.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    BSmkyyBCrrBjcahr('fcf4ff7f92cf9d56a58a0b170bdfcd3c');
    /**
     * @copyright  Copyright (c) 2009 AITOC, Inc. 
     */
    class Aitoc_Aitloyalty_Model_Rule_Condition_Customer extends Mage_Rule_Model_Condition_Abstract
    {
        protected $_iPeriodLength = null;
        private $_sPeriodType = null;
        private $_sValue = null;
        public function loadOperatorOptions()
        {
            $this->setOperatorOption(array('==' => Mage::helper('rule')->__('is'), '!=' => Mage::helper('rule')->__('is not'), '>=' => Mage::helper('rule')->__('equals or greater than'), '<=' => Mage::helper('rule')->__('equals or less than'), '>' => Mage::helper('rule')->__('greater than'), '<' => Mage::helper('rule')->__('less than')));
            $this->setOperatorByInputType(array('string' => array('==', '!=', '>=', '>', '<=', '<', '{}', '!{}', '()', '!()'), 'numeric' => array('==', '!=', '>=', '>', '<=', '<', '()', '!()'), 'date' => array('==', '>=', '<='), 'select' => array('==', '!='), 'multiselect' => array('==', '!=', '{}', '!{}'), 'grid' => array('()', '!()')));
            return $this;
        }
        protected function _init()
        {
            $aValues = explode('---', $this->getValue());
            if (is_array($aValues) and count($aValues) > 1) {
                switch ($this->getAttribute()) {
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/Rewrite/Front/Sales/Order/Totals.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    BSmkyyBCrrBjcahr('210c8dccb5bd3a467cc640d51f9e3483');
    /**
     *
     * @copyright  Copyright (c) 2011 AITOC, Inc.
     * @package    Aitoc_Aitloyalty
     * @author lyskovets
     */
    class Aitoc_Aitloyalty_Block_Rewrite_Front_Sales_Order_Totals extends Mage_Sales_Block_Order_Totals
    {
        /**
         * Initialize order totals array
         *
         * @return Mage_Sales_Block_Order_Totals
         */
        protected function _initTotals()
        {
            $source = $this->getSource();
            $this->_totals = array();
            $this->_totals['subtotal'] = new Varien_Object(array('code' => 'subtotal', 'value' => $source->getSubtotal(), 'label' => $this->__('Subtotal')));
            /**
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/Helper/Discount.php
 * Copyright:   (c) 2013 AITOC, Inc.
 */
if (Aitoc_Aitsys_Abstract_Service::initSource(__FILE__, 'Aitoc_Aitloyalty')) {
    BSmkyyBCrrBjcahr('d80500ab6e7c65c67f42801a572c92bc');
    /**
     *
     * @copyright  Copyright (c) 2011 AITOC, Inc.
     * @package    Aitoc_Aitloyalty
     * @author lyskovets
     */
    class Aitoc_Aitloyalty_Helper_Discount extends Mage_Core_Helper_Abstract
    {
        public function getTitlePart($amount)
        {
            $part = $amount > 0 ? 'Surcharge' : 'Discount';
            return $part;
        }
    }
}