duanmangxie7131 2016-04-20 11:41
浏览 53
已采纳

分页不适用于SEO URls opencart 2.1.x.

Hi am facing an issue with pagination on Opencart when SEO URLs in setting is enabled.

I am using oepncart v2.1.x. below option is used for SEO enter image description here

And to make URLs SEO i make entry for product SEO URL while adding product like as below enter image description here

But with this pagination is not working at all. I am getting URL directly as

http://example.com/dfgfd-dfgfdg

and when i disable SEO option then i get URL as

http://example.com/index.php?route=product/category&path=61_71&page=1

It is woking when SEO is disabled. Any ideas please?

I have installed extenstion super_seo.xml by orestius to make other URLs SEO like registration and login URLs.

  • 写回答

1条回答 默认 最新

  • duandaotuo5542 2016-04-21 05:11
    关注

    I am posting this as answer as it freaked me to hell from last 2-3 days. I have figured out a code and can be made as below as a change:

    Only tested on OC 2.1.x

    1. find catalog/controller/common/seo_url.php
    2. Use code mentioned here Here {if link does not work in future, feel free to mail me for same}
    3. open index.php in root folder and make entry

      $controller->addPreAction(new Action('common/seo_url'));
      
    4. Go to your DB and find table url_alias and make entry in table as in below image

    enter image description here

    By following above 4 steps everything works like charm and Pagination works perfectly now even with SEO URLs.

    Eg. Url will look like as below:

    http://example.com/index.php?route=account/logout
    will become http://example.com/logout
    

    and Pagination will be

    http://example.com/example-collection?page=2
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 我想找人帮我写Python 的股票分析代码,有意请加mathtao
  • ¥20 Vite 打包的 Vue3 组件库,图标无法显示
  • ¥15 php 同步电商平台多个店铺增量订单和订单状态
  • ¥15 关于logstash转发日志时发生的部分内容丢失问题
  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现