New filter products for sale
This commit is contained in:
parent
d523f91a29
commit
daa34b85fe
@ -850,7 +850,7 @@ class Categorie extends CommonObject
|
|||||||
* @return array|int -1 if KO, array of instance of object if OK
|
* @return array|int -1 if KO, array of instance of object if OK
|
||||||
* @see containsObject()
|
* @see containsObject()
|
||||||
*/
|
*/
|
||||||
public function getObjectsInCateg($type, $onlyids = 0, $limit = 0, $offset = 0, $sortfield = '', $sortorder = 'ASC')
|
public function getObjectsInCateg($type, $onlyids = 0, $limit = 0, $offset = 0, $sortfield = '', $sortorder = 'ASC', $filter = array(), $filtermode = 'AND')
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ if ($action == 'getProducts') {
|
|||||||
if ($tosell != '') {
|
if ($tosell != '') {
|
||||||
$filter = array('customsql' => 'o.tosell = '.((int) $tosell));
|
$filter = array('customsql' => 'o.tosell = '.((int) $tosell));
|
||||||
}
|
}
|
||||||
$prods = $object->getObjectsInCateg("product", 0, $limit, $offset, getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD'), 'ASC');
|
$prods = $object->getObjectsInCateg("product", 0, $limit, $offset, getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD'), 'ASC', $filter);
|
||||||
// Removed properties we don't need
|
// Removed properties we don't need
|
||||||
$res = array();
|
$res = array();
|
||||||
if (is_array($prods) && count($prods) > 0) {
|
if (is_array($prods) && count($prods) > 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user