Magento-分页生成错误的URL [英] Magento - pagination generating wrong URL
问题描述
除网址外,我的分页效果很好. 第2页的链接为:example.com/products#%21p=2 什么时候应该是:example.com/products?p = 2
My pagination works fine except for the url. the link for page 2 is: example.com/products#%21p=2 when is should be:example.com/products?p=2
当我在地址栏中键入后者时,它可以正常工作.这是生成链接的代码:
when I type the latter in the address bar it works fine. Here is the code which is generating the link:
<li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
看起来像标准的Magento代码,所以我不确定为什么它不能正常工作. 先感谢您. 山姆
Looks like the standard Magento code so i'm not sure why it's not working correctly. Thank you in advance. Sam
推荐答案
如果您的情况像我的情况一样,我的Magento模板我的TemplateMonster主题将使用Vinagento的Vpager扩展名,而我已设法解决此问题:
If your case is like mine, my TemplateMonster theme for Magento uses Vinagento's Vpager extension, and I've managed to fix this like this:
编辑文件: /www/app/code/local/Vinagento/Vpager/Block/Page/Html
edit file: /www/app/code/local/Vinagento/Vpager/Block/Page/Html
替换第4行:
return str_replace('?', '#%21', parent::getPageUrl($page));
具有:
return str_replace('?', '?', parent::getPageUrl($page));
精美的动画gif不再显示,但用户可以更改页面!
The nice little animated gif won't show up anymore, but the users will be able to change pages!
好运,爱德华多
这篇关于Magento-分页生成错误的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!