public function getProduct($nb_commerce_product)
    {
        $nb_product = false;
        $nb_product_id = nb_getMixedValue($nb_commerce_product, NABU_COMMERCE_PRODUCT_FIELD_ID);
        if (is_numeric($nb_product_id)) {
            $nb_product = $this->nb_commerce_product_list->getItem($nb_product_id);
        }

        return $nb_product;
    }
public function getProduct($nb_commerce_product)
    {
        $nb_product = false;
        $nb_product_id = nb_getMixedValue($nb_commerce_product, NABU_COMMERCE_PRODUCT_FIELD_ID);
        if (is_numeric($nb_product_id)) {
            $nb_product = $this->nb_commerce_product_list->getItem($nb_product_id);
        }

        return $nb_product;
    }
public function getProduct ( $ nb_commerce_product ) { $ nb_product = false ; $ nb_product_id = nb_getMixedValue ( $ nb_commerce_product , NABU_COMMERCE_PRODUCT_FIELD_ID ) ; if ( is_numeric ( $ nb_product_id ) ) { $ nb_product = $ this -> nb_commerce_product_list -> getItem ( $ nb_product_id ) ; } return $ nb_product ; }
Gets a Product by Id.
@param mixed $nb_commerce_product A CNabuDataObject containing a field named nb_commerce_product_id or a valid ID.
@return CNabuCommerceProduct|false Returns a valid instance if exists or false if not.
Gets a Product by Id .