Post by itdes » Fri Jun 06, 2014 4:28 pm

Hello,

Is there a way to define a couple of array constants in OpenCart, that I could use throughout the view template files and inside the controllers? Now I'm defining the same array constants in a couple of files and every time I have to change some value, I have to search and change them in all files that I use them, it could be much more easier and error free if I could just make those constants available to all OpenCart files.

Thank you.

New member

Posts

Joined
Tue Apr 29, 2014 5:27 pm

Post by rph » Sat Jun 07, 2014 2:38 am

I would recommend adding it to config so you can call it with $this->config->get('whatever_key'). Otherwise you can define a constant in /system/startup.php.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: No registered users and 10 guests