public function getProductCategory($nb_commerce_product_category)
    {
        $nb_category = false;
        $nb_category_id = nb_getMixedValue($nb_commerce_product_category, NABU_COMMERCE_PRODUCT_CATEGORY_FIELD_ID);
        if (is_numeric($nb_category_id)) {
            $nb_category = $this->nb_commerce_product_category_list->getItem($nb_category_id);
        }

        return $nb_category;
    }
public function getProductCategory($nb_commerce_product_category)
    {
        $nb_category = false;
        $nb_category_id = nb_getMixedValue($nb_commerce_product_category, NABU_COMMERCE_PRODUCT_CATEGORY_FIELD_ID);
        if (is_numeric($nb_category_id)) {
            $nb_category = $this->nb_commerce_product_category_list->getItem($nb_category_id);
        }

        return $nb_category;
    }
public function getProductCategory ( $ nb_commerce_product_category ) { $ nb_category = false ; $ nb_category_id = nb_getMixedValue ( $ nb_commerce_product_category , NABU_COMMERCE_PRODUCT_CATEGORY_FIELD_ID ) ; if ( is_numeric ( $ nb_category_id ) ) { $ nb_category = $ this -> nb_commerce_product_category_list -> getItem ( $ nb_category_id ) ; } return $ nb_category ; }
Gets a Product Category by Id.
@param mixed $nb_commerce_product_category A CNabuDataObject containing a field named nb_commerce_product_category_id
or a valid ID.
@return CNabuCommerceProductCategory|false Returns a valid instance if exists or false if not.
Gets a Product Category by Id .