Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Если количество больше лимита (10000) а $n !==1 тогда остальные категории НЕ попадают в sitemap #255

Open
alexsavastru opened this issue Feb 12, 2018 · 0 comments

Comments

@alexsavastru
Copy link

if ($n == 1) {
// categories
$sql = "SELECT c.id,c.parent_id,c.left_key,c.url,c.full_url,c.create_datetime,c.edit_datetime
FROM shop_category c
LEFT JOIN shop_category_routes cr ON c.id = cr.category_id
WHERE c.status = 1 AND (cr.route IS NULL OR cr.route = '".$category_model->escape($route_url)."')
ORDER BY c.left_key";
$categories = $category_model->query($sql)->fetchAll('id');
$category_url = $this->routing->getUrl($this->app_id.'/frontend/category',
array('category_url' => '%CATEGORY_URL%'), true, $real_domain);
foreach ($categories as $c_id => $c) {
if ($c['parent_id'] && !isset($categories[$c['parent_id']])) {
unset($categories[$c_id]);
continue;
}
if (isset($route['url_type']) && $route['url_type'] == 1) {
$url = $c['url'];
} else {
$url = $c['full_url'];
}
$this->addUrl(str_replace('%CATEGORY_URL%', $url, $category_url),
$c['edit_datetime'] ? $c['edit_datetime'] : $c['create_datetime'], self::CHANGE_WEEKLY, 0.6);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant