<?php /** * Performance improvement for customer area. * Unset hooks if there is only one domain specified. Filter by domain does not make sense. */ if (count(cw_md_get_domains()) == 1) { cw_addons_unset_hooks(array('pre', 'cw_product_search', 'cw_md_product_search'), array('pre', 'cw_category_search', 'cw_md_category_search'), array('pre', 'cw_manufacturer_search', 'cw_md_manufacturer_search'), array('pre', 'cw_pages_search', 'cw_md_pages_search'), array('pre', 'cw_speed_bar_search', 'cw_md_speed_bar_search'), array('pre', 'cw_shipping_search', 'cw_md_shipping_search'), array('pre', 'cw_payment_search', 'cw_md_payment_search'), array('pre', 'cw_product_get', 'cw_md_product_search'), array('pre', 'cw_category_get', 'cw_md_category_search'), array('pre', 'cw_manufacturer_get', 'cw_md_manufacturer_search'), array('pre', 'cw_pages_get', 'cw_md_pages_search')); }
$smarty->assign('altskin', $data['skin']); $smarty->assign('domain_id', $domain_id); } if ($action == 'cleanup') { $data = cw_func_call('cw_md_domain_get', array('domain_id' => $domain_id)); $return = false; if ($data['skin'] && $data['skin'] != $app_config_file['web']['skin']) { $return = cw_md_cleanup_skin($app_dir . $app_config_file['web']['skin'], $app_dir . $data['skin'], '/'); } $smarty->assign('result', $return); $smarty->assign('altskin', $data['skin']); $smarty->assign('main', 'cleanup'); } if (empty($action)) { $smarty->assign('main', 'domains'); $domains = cw_md_get_domains(); if (is_array($domains)) { foreach ($domains as $key => $domain) { $domains[$key]['attributes'] = cw_func_call('cw_attributes_get', array('item_id' => $domain['domain_id'], 'item_type' => 'DM', 'language' => $edited_language)); if (is_array($domains[$key]['attributes'])) { foreach ($domains[$key]['attributes'] as $akey => $attr) { $domains[$key]['attributes'][$akey]['fieldname'] = "posted_data[" . $domain['domain_id'] . "][attribute]"; } } } } $smarty->assign('domains', $domains); } $location[] = array(cw_get_langvar_by_name('lbl_domains'), 'index.php?target=' . $target); $attributes = cw_func_call('cw_attributes_get', array('item_id' => 0, 'item_type' => 'DM', 'language' => $edited_language)); if (is_array($attributes)) {
<?php if (empty($addons['google_base'])) { return false; } set_time_limit(5 * 60); define('GB_XML_OUT', 0); // Use for debug purposes; $top_message =& cw_session_register('top_message'); if ($REQUEST_METHOD == 'POST' && $mode == 'gb_xml_create') { // cw_display_service_header(); cw_include('addons/google_base/gb_attributes_map.php'); cw_include('addons/google_base/create_gb_xml.php'); cw_header_location('index.php?target=google_base'); } if ($addons['multi_domains']) { $smarty->assign('all_domains', cw_md_get_domains()); } $smarty->assign('main', 'google_base');