/*
*	ViArt Google Base Export
*	RSS 2.0 Formatted (Example http://base.google.com/base/products2.xml)
*/
@set_time_limit(900);
include_once "./admin_config.php";
include_once $root_folder_path . "includes/common.php";
include_once $root_folder_path . "includes/record.php";
include_once $root_folder_path . "includes/shopping_cart.php";
include_once $root_folder_path . "messages/" . $language_code . "/cart_messages.php";
include_once "./admin_common.php";
check_admin_security("import_export");
check_admin_security("products_export_google_base");
$startTime = microtime(true);
// settings
$tax_rates = get_tax_rates(true);
$country_id = $settings["country_id"];
$tax_percent = isset($tax_rates[0]) ? $tax_rates[0] : 0;
$tax_region = get_db_value("SELECT country_name FROM " . $table_prefix . "countries WHERE country_id=" . $db->tosql($country_id, INTEGER, true, false));
$tax_prices_type = get_setting_value($settings, "tax_prices_type");
$google_base_ftp_login = get_setting_value($settings, "google_base_ftp_login");
$google_base_ftp_password = get_setting_value($settings, "google_base_ftp_password");
$google_base_filename = get_setting_value($settings, "google_base_filename");
$google_base_title = get_setting_value($settings, "google_base_title");
$google_base_description = get_setting_value($settings, "google_base_description");
$google_base_encoding = get_setting_value($settings, "google_base_encoding", "UTF-8");
$google_base_save_path = get_setting_value($settings, "google_base_save_path", get_setting_value($settings, "tmp_dir", "../images/"));
$google_base_export_type = get_setting_value($settings, "google_base_export_type", 0);
//
$google_base_country = get_setting_value($settings, "google_base_country", 4);
$show_stats = get_setting_value($settings, "google_base_show_stats", 1);
Example #2
0
include_once "./includes/sorter.php";
include_once "./includes/navigator.php";
include_once "./includes/items_properties.php";
include_once "./includes/products_functions.php";
include_once "./includes/shopping_cart.php";
include_once "./includes/filter_functions.php";
include_once "./includes/previews_functions.php";
$display_products = get_setting_value($settings, "display_products", 0);
if ($display_products == 1) {
    // user need to be logged in before viewing products
    check_user_session();
}
$cms_page_code = "products_list";
$script_name = "products.php";
$current_page = get_custom_friendly_url("products.php");
$tax_rates = get_tax_rates();
$category_id = get_param("category_id");
$search_category_id = get_param("search_category_id");
if (strlen($search_category_id)) {
    $category_id = $search_category_id;
} elseif (!strlen($category_id)) {
    $category_id = 0;
}
if ($category_id) {
    if (VA_Categories::check_exists($category_id)) {
        if (!VA_Categories::check_permissions($category_id, VIEW_CATEGORIES_ITEMS_PERM)) {
            $site_url = get_setting_value($settings, "site_url", "");
            $secure_url = get_setting_value($settings, "secure_url", "");
            $secure_user_login = get_setting_value($settings, "secure_user_login", 0);
            if ($secure_user_login) {
                $user_login_url = $secure_url . get_custom_friendly_url("user_login.php");
Example #3
0
                }
            } else {
                $sc_errors .= "Your VAT Number is invalid. Please check it and try again.<br>";
            }
        }
    }
}
/////////////////////TODO
// get taxes rates
$tax_available = false;
$tax_percent_sum = 0;
$tax_names = "";
$tax_column_names = "";
$taxes_total = 0;
$default_tax_rates = get_tax_rates(true);
$tax_rates = get_tax_rates(true, $country_id, $state_id, $postal_code);
if (sizeof($tax_rates) > 0) {
    $tax_available = true;
    foreach ($tax_rates as $tax_id => $tax_info) {
        $show_type = $tax_info["show_type"];
        $tax_type = $tax_info["tax_type"];
        if ($tax_type == 1) {
            // sum only general tax
            $tax_percent_sum += $tax_info["tax_percent"];
        }
        if ($show_type & 1) {
            if ($tax_column_names) {
                $tax_column_names .= " & ";
            }
            $tax_column_names .= get_translation($tax_info["tax_name"]);
        }