function fn_seo_get_product_feature_variants_post(&$vars, &$params, &$lang_code) { if (!empty($vars)) { foreach ($vars as $k => $variant) { if (empty($variant['seo_name']) && !empty($variant['variant_id'])) { $vars[$k]['seo_name'] = fn_seo_get_name('e', $variant['variant_id'], '', null, $lang_code); } fn_seo_cache_name('e', $variant['variant_id'], $vars[$k], null, $lang_code); } } return true; }
function fn_seo_get_product_feature_variants_post(&$vars, &$params, &$lang_code) { if (!empty($vars)) { $feature_ids = is_array($params['feature_id']) ? $params['feature_id'] : array($params['feature_id']); $feature_ids = db_get_fields("SELECT feature_id FROM ?:product_features WHERE feature_id IN (?n) AND feature_type = ?s", $feature_ids, ProductFeatures::EXTENDED); if (!empty($feature_ids)) { foreach ($vars as $k => $variant) { if (!in_array($variant['feature_id'], $feature_ids)) { continue; } if (empty($variant['seo_name']) && !empty($variant['variant_id'])) { $vars[$k]['seo_name'] = fn_seo_get_name('e', $variant['variant_id'], '', null, $lang_code); } SeoCache::set('e', $variant['variant_id'], $vars[$k], null, $lang_code); } } } return true; }
function fn_seo_get_news_data_post(&$news, &$lang_code) { if (empty($news['seo_name']) && !empty($news['news_id'])) { $news['seo_name'] = fn_seo_get_name('n', $news['news_id'], '', null, $lang_code); } return true; }
function fn_news_and_emails_seo_url($seo_settings, $url, $parced_url, $link_parts, $parced_query, $lang_code = CART_LANGUAGE) { if ($parced_query['dispatch'] == 'news.view' && !empty($parced_query['news_id'])) { $link_parts['name'] = fn_seo_get_name('n', $parced_query['news_id'], '', $lang_code); $link_parts['extension'] = SEO_FILENAME_EXTENSION; fn_seo_parced_query_unset($parced_query, 'news_id'); } }