define('APPAREL_BRAND_WARN_GB', 'Item in apparel group should have brand and can\'t appear in google base'); define('SHOW_STATS_GB', 'Show Statistics and Errors report when generating a feed'); define('HINT_GB', 'Google Merchant Center has different required fields per country:<br />- Select "USA", "UK, DE, FR" or "Japan" depending on where you are going to promote your products.<br />- Select "All countries" if you sell products to different countries, for example USA and Europe (this value includes requirements from all countries) or generate separate feeds under two different names.<br />- Select "Other Countries" if you sell products to other not-specified countries (this value excludes all other countries requirements).<br />'); //end // include admin messages $root_folder_path = "../"; include_once $root_folder_path . "messages/" . $language_code . "/admin_messages.php"; // Admin Site URL settings $admin_folder = get_admin_dir(); $site_url = get_setting_value($settings, "site_url", ""); $secure_url = get_setting_value($settings, "secure_url", ""); $admin_site_url = $site_url . $admin_folder; $admin_secure_url = $secure_url . $admin_folder; // check sites number $sitelist = false; if (comp_vers(va_version(), "3.3.3") == 1) { $sql = " SELECT COUNT(*) FROM " . $table_prefix . "sites"; $sites_number = get_db_value($sql); if ($sites_number > 1) { $sitelist = true; } } // SSL settings $ssl_admin_tickets = get_setting_value($settings, "ssl_admin_tickets", 0); $ssl_admin_ticket = get_setting_value($settings, "ssl_admin_ticket", 0); $ssl_admin_helpdesk = get_setting_value($settings, "ssl_admin_helpdesk", 0); $secure_admin_order_create = get_setting_value($settings, "secure_admin_order_create", 0); if ($ssl_admin_tickets && strlen($secure_url)) { $tickets_site_url = $admin_secure_url; } else { $tickets_site_url = $admin_site_url;
function get_cache($hour = 24, $daily = 0, $cache_type = "0", $cache_name = "0", $cache_parameter = "0") { global $db, $table_prefix; $current_version = va_version(); if (compare_versions($current_version, "3.6.32") == 2) { return array(0); } $sql = " SELECT * FROM " . $table_prefix . "caches WHERE cache_type = " . $db->tosql($cache_type, TEXT); $sql .= " AND cache_name = " . $db->tosql($cache_name, TEXT); $sql .= " AND cache_parameter = " . $db->tosql($cache_parameter, TEXT); $db->query($sql); if ($db->next_record()) { $date = $db->f("cache_date"); if (!$daily) { if (strtotime($date) + $hour * 60 * 60 > strtotime(date("Y-m-d H:i:s"))) { return $db->f("cache_data"); } else { return array(1); } } else { if (strtotime(date("Y-m-d") . " 00:00:00") < strtotime($date) + 24 * 60 * 60) { return $db->f("cache_data"); } else { return array(1); } } } return array(0); }