static public function getProductsForCommerce($nb_commerce)
    {
        $nb_commerce_id = nb_getMixedValue($nb_commerce, NABU_COMMERCE_FIELD_ID);
        if (is_numeric($nb_commerce_id)) {
            $retval = CNabuCommerceProduct::buildObjectListFromSQL(
                'nb_commerce_product_id',
                'SELECT *
                   FROM nb_commerce_product
                  WHERE nb_commerce_id=%commerce_id$d',
                array(
                    'commerce_id' => $nb_commerce_id
                )
            );
            if ($nb_commerce instanceof CNabuCommerce) {
                $retval->setCommerce($nb_commerce);
            }
        } else {
            $retval = new CNabuCommerceProductCategoryList($nb_commerce instanceof CNabuCommerce ? $nb_commerce : null);
        }

        return $retval;
    }
static public function getProductsForCommerce($nb_commerce)
    {
        $nb_commerce_id = nb_getMixedValue($nb_commerce, NABU_COMMERCE_FIELD_ID);
        if (is_numeric($nb_commerce_id)) {
            $retval = CNabuCommerceProduct::buildObjectListFromSQL(
                'nb_commerce_product_id',
                'SELECT *
                   FROM nb_commerce_product
                  WHERE nb_commerce_id=%commerce_id$d',
                array(
                    'commerce_id' => $nb_commerce_id
                )
            );
            if ($nb_commerce instanceof CNabuCommerce) {
                $retval->setCommerce($nb_commerce);
            }
        } else {
            $retval = new CNabuCommerceProductCategoryList($nb_commerce instanceof CNabuCommerce ? $nb_commerce : null);
        }

        return $retval;
    }
static public function getProductsForCommerce ( $ nb_commerce ) { $ nb_commerce_id = nb_getMixedValue ( $ nb_commerce , NABU_COMMERCE_FIELD_ID ) ; if ( is_numeric ( $ nb_commerce_id ) ) { $ retval = CNabuCommerceProduct :: buildObjectListFromSQL ( 'nb_commerce_product_id' , 'SELECT *
                   FROM nb_commerce_product
                  WHERE nb_commerce_id=%commerce_id$d' , array ( 'commerce_id' => $ nb_commerce_id ) ) ; if ( $ nb_commerce instanceof CNabuCommerce ) { $ retval -> setCommerce ( $ nb_commerce ) ; } } else { $ retval = new CNabuCommerceProductCategoryList ( $ nb_commerce instanceof CNabuCommerce ? $ nb_commerce : null ) ; } return $ retval ; }
Get all Products of a Commerce.
@param mixed $nb_commerce
Get all Products of a Commerce .