Page 1 of 1

PHP Script To Read Products By Category

Posted: Thu Mar 09, 2017 11:31 am
by mikeross
Let's say I have another PHP application that I've coded for a customer, but want to show products out of the OpenCart install that's in the subdirectory /cart. Is there a way to show products by category? I mean, is it a process where I include an object library and then call object methods? Does one exist? Or, must I go direct to the MySQL database?

Note, I'm not looking for building a template. This is a separate PHP application entirely and I want to show products from the catalog in it.

Re: PHP Script To Read Products By Category

Posted: Sat Jun 03, 2017 5:03 pm
by chrisranjana.com
For starters you could look at the file catalog/controller/product/category.php lines 213 to 223.
You could learn more about how the products array gets populated.