How can I use getProducts from admin/model/catalog/product.php
Posted: Fri Apr 28, 2017 2:29 am
I would like to use that function but without creating a whole module.
I tried something, loading config.php and startup.php, but not sure how to continue form here:
Any suggetions would be highly appreciated, thanks!
I tried something, loading config.php and startup.php, but not sure how to continue form here:
Code: Select all
require_once("config.php");
// Startup
require_once(DIR_SYSTEM . 'startup.php');
// Registry
$registry = new Registry();
// Loader
$loader = new Loader($registry);
$registry->set('load', $loader);
// Config
$config = new Config();
$registry->set('config', $config);
// Database
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
$registry->set('db', $db);