当SEO启用时,分页在opencart中不起作用


Pagination not working in opencart when SEO enabled

嗨,我正在为我的一个网站使用Opencart,但我意识到,当我打开SEO关键字时,分页不起作用。当SEO关闭时,它运行良好。

有人知道为什么会发生这种事吗。

我试图在opencart论坛上找到答案,但没有运气,而且我也找不到任何关于堆栈溢出的东西。。。

这是我的htaccess文件的代码。

Options +FollowSymlinks
# Prevent Directoy listing Options -Indexes
# Prevent Direct Access to files
<FilesMatch "'.(tpl|ini|log)">
     Order deny,allow
 Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*'.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

这里有一个链接到他的一个页面

http://pubstuff.co.za/Bar/Ashtrays

我可以在category.php页面上看到分页代码

$pagination = new Pagination();
        $pagination->total = $product_total;
        $pagination->page = $page;
        $pagination->limit = $limit;
        $pagination->text = $this->language->get('text_pagination');
        $pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');

它试图调用"链接"或url仍然作为正确项目的路径,但我不知道如何将其更改为调用新呈现的SEO友好url 的url

有人能帮忙吗。

在您提供的链接中,没有足够的产品导致分页。在产品数量至少超过25个的限制之前,您不会得到分页。

Onhttp://pubstuff.co.za/Gifts-and-novelties/Other-gifts情况是这样的——87个项目,然而,当我选择25的列表限制时,页面会自动重新加载100个产品限制,所以我无法确认这是错误的。正如上面shadyyx评论的那样,这对默认的SEO来说是可以的,所以可能是你的主题中的某些东西导致了错误。