Post by carl2k218 » Fri Apr 13, 2018 3:20 am

Hello

I am wanting to set a custom link in the menu or change a category link into a direct hyperlink to a page, the only tutorials i found online linked to TPL files... since the new one doesn't have this I'm a bit stuck...

Newbie

Posts

Joined
Fri Apr 13, 2018 3:17 am

Post by paulfeakins » Fri Apr 13, 2018 4:54 pm

First you must understand the V and C from MVC:
C for Controller sets up the data.
V for View displays that data.

So you must adjust the data in the controller, in this case:
/catalog/controller/common/menu.php

You will see arrays called $categories and $children which contain arrays with "name" and "href".

If you don't understand enough about PHP to add elements to these arrays, then you should either pay a developer to do this for you, or make a copy of the file, read this https://www.w3schools.com/php/php_arrays.asp and try some things!

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: SelfSus, softmonke, systemmaker, tilly and 522 guests