Пример #1
0
 protected function applyXml(&$messages)
 {
     global $vqmod;
     $dir_store = dirname(DIR_APPLICATION) . "/";
     $vqmod_folder = $this->getVQModFolder($vqmod);
     $xml_folder = $dir_store . $vqmod_folder . "/xml/";
     $xml_file = $xml_folder . $this->xml_file;
     $patched_files = $this->getPatchedFiles($xml_file);
     if (empty($patched_files)) {
         return true;
     }
     foreach ($patched_files as $pfk => $pfv) {
         $file = KaVQMod::modCheck($dir_store . $pfv);
     }
     return true;
 }
Пример #2
0
<?php

/*
	Project: Abandoned Cart Recovery
	Author : karapuz <*****@*****.**>
	Version: 2 ($Revision: 74 $)
*/
require_once KaVQMod::modCheck(DIR_SYSTEM . 'engine/ka_model.php');
class ModelLocalisationKaReminderEmails extends KaModel
{
    protected function getRecords($data, $language_id = 0)
    {
        if (empty($data['fields'])) {
            trigger_error("ka_acr: No fields data in getRecords() function");
            return false;
        }
        if (!$language_id) {
            $language_id = $this->config->get('config_language_id');
        }
        $sql = "SELECT " . $data['fields'] . " FROM " . DB_PREFIX . "ka_reminder_emails re \n\t\t\tLEFT JOIN " . DB_PREFIX . "ka_reminder_emails_descr red\n\t\t\t\tON (re.reminder_email_id = red.reminder_email_id \n\t\t\t\tAND red.language_id = " . (int) $language_id . ")\n\t\t";
        if (!empty($data['where'])) {
            $sql .= " WHERE " . $data['where'];
        }
        if (!empty($data['sort'])) {
            $sql .= " ORDER BY " . $data['sort'];
            if (!empty($data['order'])) {
                $sql .= ' ' . $data['order'];
            }
        }
        if (isset($data['start']) || isset($data['limit'])) {
            if ($data['start'] < 0) {
Пример #3
0
 public function isSchedulerModel($model)
 {
     $file = KaVQMod::modCheck(DIR_APPLICATION . 'model/' . $model . '.php');
     $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $model);
     if (!file_exists($file)) {
         return false;
     }
     $content = file_get_contents($file);
     if (!preg_match("/class[\\s]*{$class}\\s/i", $content)) {
         return false;
     }
     @(include_once $file);
     if (!class_exists($class)) {
         return false;
     }
     $methods = get_class_methods($class);
     if (empty($methods)) {
         return false;
     }
     if (in_array('runSchedulerOperation', $methods)) {
         return true;
     }
     return false;
 }
Пример #4
0
<?php

/*
	Project: Abandoned Cart Recovery
	Author : karapuz <*****@*****.**>
	Version: 2 ($Revision: 89 $)
*/
require_once KaVQMod::modCheck(DIR_SYSTEM . 'library/ka_db.php');
require_once KaVQMod::modCheck(DIR_SYSTEM . 'library/ka_mail.php');
require_once KaVQMod::modCheck(DIR_SYSTEM . 'engine/ka_model.php');
require_once KaVQMod::modCheck(DIR_SYSTEM . 'library/cart.php');
require_once KaVQMod::modCheck(DIR_SYSTEM . 'library/tax.php');
require_once KaVQMod::modCheck(DIR_SYSTEM . 'library/customer.php');
class ModelSaleKaAbandonedCarts extends KaModel
{
    public static $max_reminder_delay = 2160;
    // in hours
    public static $token_prefix = 'ka-';
    protected $kadb = null;
    protected function onLoad()
    {
        $this->kadb = new KaDb($this->db);
        $this->load->model('sale/customer');
        $this->load->model('localisation/language');
        $this->loadLanguage('ka_extensions/ka_acr');
        $this->registry->set('encryption', new Encryption($this->config->get('config_encryption')));
    }
    protected function queryHash($qry_string, $key)
    {
        $qry = $this->db->query($qry_string);
        if (empty($qry->rows)) {