I'm new to opencart, but am an experienced web developer. I am in the process of upgrading an old website, to a new website (1.5.4 to 184.108.40.206). We are almost done, but have come across an issue where our catalog\view\theme\journal2\category.tpl files are having trouble referencing any of the pre-made attributes / attribute groups... Previously, on the old website, the category pages showed attributes in the product listing (category.tpl), and we would like to do the same on the new website.
Problem: When I try to add those attribute variables into the code I get an error; "Notice: Undefined variable:" ... digging around the internet and forums, it is said that you need to add the code into the catalog\controller\product\category.php file.; 'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']), ...Upon adding that, nothing happened.
So I got to thinking, what happens if I created a simple variable on the category.php file; $variable= 'variable'; and then echo $variable, on the category.tpl file? "Notice: Undefined variable:"
Then I tried to echo a simple hello world; Hello World'; ?> within the catalog\controller\product\category.php file (nothing happened).
Next I decided to comment out the entire category.php file, and the page did not break...
I then confirmed that the page is indeed being referenced in some way by changing the page name category0.php, and I did get an error and a white screen (which is good that it is referenced).
I get the feeling that the page isn't referencing CORRECTLY or something. None of the variables I create are being referenced. I could be totally wrong on my prediction, but any thoughts? Is there anyway that I can get any simple variable to work? I can't even debug this any further.
-Thanks, Michael P.