Example #1
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $varsToPush = array('activated' => array(0, 'int'), 'company_code' => array('', 'char'), 'account' => array('', 'char'), 'license' => array('', 'char'), 'committ' => array(0, 'int'), 'only_cart' => array(1, 'int'), 'dev' => array(1, 'int'), 'avatax_virtuemart_country_id' => array(0, 'int'), 'avatax_virtuemart_state_id' => array(0, 'int'), 'accrual' => array(0, 'int'), 'prevCheckoutAddInv' => array(1, 'int'));
     $this->setConfigParameterable('calc_params', $varsToPush);
     $this->setPluginLoggable();
     $this->tableFields = array('id', 'virtuemart_order_id', 'client_ip', 'sentValue', 'recievedValue');
     $this->_tableId = 'id';
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     if (JVM_VERSION > 1) {
         define('VMAVALARA_PATH', JPATH_ROOT . DS . 'plugins' . DS . 'vmcalculation' . DS . 'avalara');
     } else {
         define('VMAVALARA_PATH', JPATH_ROOT . DS . 'plugins' . DS . 'vmcalculation');
     }
     define('VMAVALARA_CLASS_PATH', VMAVALARA_PATH . DS . 'classes');
     require VMAVALARA_PATH . DS . 'AvaTax.php';
     // include in all Avalara Scripts
     if (!class_exists('ATConfig')) {
         require VMAVALARA_CLASS_PATH . DS . 'ATConfig.class.php';
     }
 }
Example #2
0
 function __construct(&$subject, $config)
 {
     // 		if(self::$_this) return self::$_this;
     parent::__construct($subject, $config);
     $varsToPush = array('activated' => array(0, 'int'), 'company_code' => array('', 'char'), 'account' => array('', 'char'), 'license' => array('', 'char'), 'committ' => array(0, 'int'), 'vAddress' => array(0, 'int'));
     $this->setConfigParameterable('calc_params', $varsToPush);
     $this->_loggable = TRUE;
     $this->tableFields = array('id', 'virtuemart_order_id', 'client_ip', 'sentValue', 'recievedValue');
     $this->_tableId = 'id';
     $this->_tablepkey = 'id';
     if (JVM_VERSION === 2) {
         define('VMAVALARA_PATH', JPATH_ROOT . DS . 'plugins' . DS . 'vmcalculation' . DS . 'avalara');
     } else {
         define('VMAVALARA_PATH', JPATH_ROOT . DS . 'plugins' . DS . 'vmcalculation');
     }
     define('VMAVALARA_CLASS_PATH', VMAVALARA_PATH . DS . 'classes');
     require VMAVALARA_PATH . DS . 'AvaTax.php';
     // include in all Avalara Scripts
     if (!class_exists('ATConfig')) {
         require VMAVALARA_CLASS_PATH . DS . 'ATConfig.class.php';
     }
 }