It is inevitable that if you spend enough time within the OpenCart framework you will end up writing some of your own customizations, especially if you plan on extending the default installation. There is nothing worse than making a ton of customizations and not remembering where they are later on. In PHP there are a couple of ways to comment your code so it will be easily seen and “marked” if you will, allowing you to find it later. This is especially helpful with files that have a thousand + lines of code. Sometimes, if you aren’t used to looking at PHP it can all start the look the same. For this article we will comment some custom code within the following file: catalog/controller/product/product.php which is a control file.
Today we will simulate adding a couple variables to be echoed on to the product.tpl page. The product.tpl is a VIEW file and is better known as Opencart’s Product Details Page. In Learn More