public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'shop_inform_product_available'; $this->_table_prefix = 'sipa'; }
public function __construct() { parent::__construct(); $this->_table = NAILS_DB_PREFIX . 'shop_tax_rate'; $this->_table_prefix = 'str'; $this->_destructive_delete = FALSE; }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'blog_category'; $this->_table_prefix = 'bc'; }
/** * Construct the setting model, set defaults */ public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'app_setting'; $this->_table_prefix = 'n'; $this->_settings = array(); }
/** * Construct the notification model, set defaults */ public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'app_notification'; $this->_table_prefix = 'n'; $this->_notifications = array(); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'cms_menu'; $this->_table_prefix = 'm'; $this->_table_item = NAILS_DB_PREFIX . 'cms_menu_item'; $this->_table_item_prefix = 'mi'; }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'cms_slider'; $this->_table_prefix = 's'; $this->_table_item = NAILS_DB_PREFIX . 'cms_slider_item'; $this->_table_item_prefix = 'si'; }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'user_group'; $this->_table_prefix = 'ug'; // -------------------------------------------------------------------------- $this->_default_group = $this->get_default_group(); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- // Set defaults $this->_remember_cookie = 'nailsrememberme'; $this->_is_remembered = NULL; // -------------------------------------------------------------------------- // Clear the active_user $this->clear_active_user(); }
/** * Constructor; set the defaults * * @access public * @param none * @return void **/ public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- /** * Set the search paths to look for modules within; paths listed first * take priority over those listed after it. * **/ $this->search_paths[] = FCPATH . APPPATH . 'modules/admin/controllers/'; // Admin controllers specific for this app only. $this->search_paths[] = NAILS_PATH . 'modules/admin/controllers/'; }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'blog_post'; $this->_table_prefix = 'bp'; // Hard-coded throughout model; take care when changing this $this->_table_label_column = 'title'; $this->_destructive_delete = FALSE; // -------------------------------------------------------------------------- // Define reserved words (for slugs, basically just controller methods) $this->_reserved = array('index', 'single', 'category', 'tag', 'archive'); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- // Set Defaults $this->_writers = array(); $this->_filename_json = 'sitemap.json'; $this->_filename_xml = 'sitemap.xml'; // Default writers $this->_writers['static'] = array($this, '_generator_static'); $this->_writers['cms'] = array($this, '_generator_cms'); $this->_writers['blog'] = array($this, '_generator_blog'); $this->_writers['shop'] = array($this, '_generator_shop'); }
/** * Constructor * * @access public * @param none * @return void **/ public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- // Set variables $this->brute_force_protection = array(); $this->brute_force_protection['delay'] = 1500000; $this->brute_force_protection['limit'] = 10; $this->brute_force_protection['expire'] = 900; $this->error_delimiter = array('<p>', '</p>'); $this->message_delimiter = array('<p>', '</p>'); // -------------------------------------------------------------------------- // Load helpers $this->load->helper('date'); $this->load->helper('cookie'); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_nails_templates_dir = NAILS_PATH . 'modules/cms/templates/'; $this->_app_templates_dir = FCPATH . APPPATH . 'modules/cms/templates/'; $this->_nails_widgets_dir = NAILS_PATH . 'modules/cms/widgets/'; $this->_app_widgets_dir = FCPATH . APPPATH . 'modules/cms/widgets/'; $this->_nails_prefix = 'NAILS_CMS_'; $this->_app_prefix = 'CMS_'; $this->_table = NAILS_DB_PREFIX . 'cms_page'; $this->_table_prefix = 'p'; $this->_destructive_delete = FALSE; // -------------------------------------------------------------------------- // Load the generic template & widget include_once $this->_nails_templates_dir . '_template.php'; include_once $this->_nails_widgets_dir . '_widget.php'; }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_available = NULL; $this->_module_extension = '-shop-shipping'; // Module locations // This must be an array with 2 indexes: // `path` => The absolute path to the directory containing the modules (required) // `url` => The URL to access the modules (required) $this->_module_locations = array(); // Nails modules $this->_module_locations[] = array('path' => NAILS_PATH . 'modules/shop/shipping', 'url' => NAILS_URL . 'modules/shop/shipping'); // 'Official' modules $this->_module_locations[] = array('path' => FCPATH . 'vendor/nailsapp', 'url' => site_url('vendor/nailsapp', page_is_secure())); // App Modules $this->_module_locations[] = array('path' => FCPATH . APPPATH . 'modules/shop/shipping', 'url' => site_url(APPPATH . 'modules/shop/shipping', page_is_secure())); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- // Set Defaults $this->_routes_dir = DEPLOY_CACHE_DIR; $this->_routes_file = 'routes_app.php'; $this->_writers = array(); $this->_can_write_routes = $this->_can_write_routes(); $this->_routes = array(); if (!$this->_can_write_routes) { $this->cant_write_reason = $this->last_error(); $this->clear_errors(); } // Default writers $this->_writers['sitemap'] = array($this, '_routes_sitemap'); $this->_writers['cms'] = array($this, '_routes_cms'); $this->_writers['blog'] = array($this, '_routes_blog'); $this->_writers['shop'] = array($this, '_routes_shop'); }
/** * Model constructor * * @access public * @param none * @return void **/ public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'shop_product'; $this->_table_prefix = 'p'; $this->_table_attribute = NAILS_DB_PREFIX . 'shop_product_attribute'; $this->_table_brand = NAILS_DB_PREFIX . 'shop_product_brand'; $this->_table_category = NAILS_DB_PREFIX . 'shop_product_category'; $this->_table_collection = NAILS_DB_PREFIX . 'shop_product_collection'; $this->_table_gallery = NAILS_DB_PREFIX . 'shop_product_gallery'; $this->_table_range = NAILS_DB_PREFIX . 'shop_product_range'; $this->_table_tag = NAILS_DB_PREFIX . 'shop_product_tag'; $this->_table_variation = NAILS_DB_PREFIX . 'shop_product_variation'; $this->_table_variation_gallery = NAILS_DB_PREFIX . 'shop_product_variation_gallery'; $this->_table_variation_meta = NAILS_DB_PREFIX . 'shop_product_variation_meta'; $this->_table_variation_price = NAILS_DB_PREFIX . 'shop_product_variation_price'; $this->_table_type = NAILS_DB_PREFIX . 'shop_product_type'; $this->_table_tax_rate = NAILS_DB_PREFIX . 'shop_tax_rate'; }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_available = NULL; $this->_skin_prefix = 'skin-shop-'; // Skin locations // The model will search these directories for skins; to add more directories extend this // This must be an array with 2 indexes: // `path` => The absolute path to the directory containing the skins (required) // `url` => The URL to access the skins (required) // `regex` => If the directory doesn't only contain skins then specify a regex to filter by if (empty($this->_skin_locations)) { $this->_skin_locations = array(); } // 'Official' skins $this->_skin_locations[] = array('path' => FCPATH . 'vendor/nailsapp', 'url' => site_url('vendor/nailsapp', page_is_secure()), 'regex' => '/^skin-shop-(.*)$/'); // App Skins $this->_skin_locations[] = array('path' => FCPATH . APPPATH . 'modules/shop/skins', 'url' => site_url(APPPATH . 'modules/shop/skins', page_is_secure())); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- // Define data structure $this->_table = NAILS_DB_PREFIX . 'admin_changelog'; $this->_table_prefix = 'acl'; // -------------------------------------------------------------------------- // Set defaults $this->_changes = array(); $this->_batch_save = TRUE; // -------------------------------------------------------------------------- // Add a hook for after the controller is done so we can process the changes // and save to the DB. $_hook = array(); $_hook['classref'] =& $this; $_hook['method'] = 'save'; $_hook['params'] = ''; if ($GLOBALS['EXT']->add_hook('post_system', $_hook) == FALSE) { $this->_batch_save = FALSE; log_message('error', 'Admin_changelog_model could not set the post_controller hook to save items in batches.'); } }
public function __construct() { parent::__construct(); $this->_table = NAILS_DB_PREFIX . 'shop_range'; $this->_table_prefix = 'sr'; }
public function __construct($config = array()) { parent::__construct(); // -------------------------------------------------------------------------- $_config_set_session = isset($config['set_session']) ? (bool) $config['set_session'] : TRUE; // -------------------------------------------------------------------------- $_base = $this->get_base_currency(); // -------------------------------------------------------------------------- // Shop's base currency (i.e what the products are listed in etc) if (!defined('SHOP_BASE_CURRENCY_SYMBOL')) { define('SHOP_BASE_CURRENCY_SYMBOL', $_base->symbol); } if (!defined('SHOP_BASE_CURRENCY_SYMBOL_POS')) { define('SHOP_BASE_CURRENCY_SYMBOL_POS', $_base->symbol_position); } if (!defined('SHOP_BASE_CURRENCY_PRECISION')) { define('SHOP_BASE_CURRENCY_PRECISION', $_base->decimal_precision); } if (!defined('SHOP_BASE_CURRENCY_CODE')) { define('SHOP_BASE_CURRENCY_CODE', $_base->code); } // Formatting constants if (!defined('SHOP_BASE_CURRENCY_THOUSANDS')) { define('SHOP_BASE_CURRENCY_THOUSANDS', $_base->thousands_seperator); } if (!defined('SHOP_BASE_CURRENCY_DECIMALS')) { define('SHOP_BASE_CURRENCY_DECIMALS', $_base->decimal_symbol); } // User's preferred currency if ($this->session->userdata('shop_currency')) { // Use the currency defined in the session $_currency_code = $this->session->userdata('shop_currency'); } elseif (active_user('shop_currency')) { // Use the currency defined in the user object $_currency_code = active_user('shop_currency'); if (!headers_sent()) { $this->session->set_userdata('shop_currency', $_currency_code); } } else { // Can we determine the user's location and set a currency based on that? // If not, fall back to base currency $this->load->library('geo_ip'); $_lookup = $this->geo_ip->country(); if (!empty($_lookup->status) && $_lookup->status == 200) { // We know the code, does it have a known currency? $_country_currency = $this->shop_currency_model->get_by_country($_lookup->country->iso); if ($_country_currency) { $_currency_code = $_country_currency->code; } else { // Fall back to default $_currency_code = $_base->code; } } else { $_currency_code = $_base->code; } // Save to session if (!headers_sent()) { $this->session->set_userdata('shop_currency', $_currency_code); } } // Fetch the user's render currency $_user_currency = $this->shop_currency_model->get_by_code($_currency_code); if (!$_user_currency) { // Bad currency code $_user_currency = $_base; if (!headers_sent()) { $this->session->unset_userdata('shop_currency', $_currency_code); } if ($this->user_model->is_logged_in()) { $this->user_model->update(active_user('id'), array('shop_currency' => NULL)); } } // Set the user constants if (!defined('SHOP_USER_CURRENCY_SYMBOL')) { define('SHOP_USER_CURRENCY_SYMBOL', $_user_currency->symbol); } if (!defined('SHOP_USER_CURRENCY_SYMBOL_POS')) { define('SHOP_USER_CURRENCY_SYMBOL_POS', $_user_currency->symbol_position); } if (!defined('SHOP_USER_CURRENCY_PRECISION')) { define('SHOP_USER_CURRENCY_PRECISION', $_user_currency->decimal_precision); } if (!defined('SHOP_USER_CURRENCY_CODE')) { define('SHOP_USER_CURRENCY_CODE', $_user_currency->code); } // Formatting constants if (!defined('SHOP_USER_CURRENCY_THOUSANDS')) { define('SHOP_USER_CURRENCY_THOUSANDS', $_user_currency->thousands_seperator); } if (!defined('SHOP_USER_CURRENCY_DECIMALS')) { define('SHOP_USER_CURRENCY_DECIMALS', $_user_currency->decimal_symbol); } }
public function __construct() { parent::__construct(); $this->config->load('datetime'); }
public function __construct() { parent::__construct(); $this->_table = NAILS_DB_PREFIX . 'shop_category'; $this->_table_prefix = 'sc'; }
/** * Model constructor * * @access public * @param none * @return void **/ public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_table = NAILS_DB_PREFIX . 'testimonial'; }
public function __construct() { parent::__construct(); $this->_table = NAILS_DB_PREFIX . 'shop_attribute'; $this->_table_prefix = 'sa'; }
public function __construct() { parent::__construct(); $this->config->load('currency'); }
/** * Model constructor * * @access public * @param none * @return void **/ public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->sess_var = 'shop_basket'; // -------------------------------------------------------------------------- $this->_items = $this->session->userdata($this->sess_var); if (!$this->_items) { // Check the active_user data in case it exists there $_saved_basket = @unserialize(active_user('shop_basket')); if ($_saved_basket) { $this->_items = $_saved_basket; } else { $this->_items = array(); } } // -------------------------------------------------------------------------- $this->_personal_details = $this->session->userdata($this->sess_var . '_pd'); if (!$this->_personal_details) { $this->_personal_details = new stdClass(); $this->_personal_details->first_name = ''; $this->_personal_details->last_name = ''; $this->_personal_details->email = ''; } // -------------------------------------------------------------------------- $this->_payment_gateway = (int) $this->session->userdata($this->sess_var . '_pg'); // -------------------------------------------------------------------------- $this->_shipping_method = $this->session->userdata($this->sess_var . '_sm'); // -------------------------------------------------------------------------- $this->_shipping_details = $this->session->userdata($this->sess_var . '_sd'); if (!$this->_shipping_details) { // Clear addressing as per: http://www.royalmail.com/personal/help-and-support/How-do-I-address-my-mail-correctly $this->_shipping_details = new stdClass(); $this->_shipping_details->addressee = ''; // Named addresse $this->_shipping_details->line_1 = ''; // Building number and street name $this->_shipping_details->line_2 = ''; // Locality name, if required $this->_shipping_details->town = ''; // Town $this->_shipping_details->postcode = ''; // Postcode $this->_shipping_details->state = ''; // State $this->_shipping_details->country = ''; // Country } // -------------------------------------------------------------------------- $this->_order_id = (int) $this->session->userdata($this->sess_var . '_oi'); // -------------------------------------------------------------------------- // Handle voucher $this->_voucher_code = $this->session->userdata($this->sess_var . '_vc'); // Check voucher is still valid if ($this->_voucher_code) { $this->load->model('shop/shop_voucher_model'); $_voucher = $this->shop_voucher_model->validate($this->_voucher_code); if (!$_voucher) { $this->_voucher_code = FALSE; $this->remove_voucher(); } else { // Apply the voucher object $this->_voucher_code = $_voucher; } } }
public function __construct() { parent::__construct(); $this->config->load('countries'); }