In the app/addons/my_addon/func.php I created a custom function and where I'm creating and XML
In order to fetch the products i use the following code:
$params = array( // 'status' => 'H', 'statuses' => array('A', 'H'), 'product_type' => 'P', 'type' => 'extended', // 'pid' => 4801 //Pick one product id for testing ); list($products, $search) = fn_get_products($params); $total_products = $search['total_items']; $additional_params = array( 'get_discounts' => true, 'get_features' => true, ); fn_gather_additional_products_data($products, $additional_params); print_r($products); exit();
It works fine and i get the products, but the problem is that it gets only active product and i want to get Hidden products as well, and that why i added 'statuses' => array('A', 'H') but it only get Active products
I even tryied to add only 'status' => 'H' in order to get only hidden products, but it doesn't work too, and i still don't get any products.