Ad

Seo Url Doens't Work With Homepage In OpenCart 3

- 1 answer

I've enabled the option (Use SEO URLs) in settings (Opencart 3). All links such as contact, about, etc are working, except the homepage!

I have added this to the SEO URL page:

  • Query: common/home
  • Keyword: home

But it still appears as: index.php?route=common/home

How can I fix that?

Ad

Answer

I hope it will help you as

Please make changes in catalog/controller/startup/seo_url.php

if `(($data['route'] == 'product/product' && $key == 'product_id') ||
    (($data['route'] == 'product/manufacturer/info' || 
    $data['route'] == 'product/product') && $key == 'manufacturer_id') || 
    ($data['route'] == 'information/information' && $key == 'information_id')) 
{

to

if (($data['route'] == 'product/product' && $key == 'product_id') || 
    (($data['route'] == 'product/manufacturer/info' || 
    $data['route'] == 'product/product') && $key == 'manufacturer_id') ||
    ($data['route'] == 'information/information' && $key == 'information_id') || 
    $data['route'] == 'common/home') 
{
Ad
source: stackoverflow.com
Ad