protected function getDefaultCategoryId($product)
    {
        $defaultCategoryId = null;
        if ((bool) $product->getVirtualColumn('is_default_category')) {
            $defaultCategoryId = $product->getVirtualColumn('default_category_id');
        } else {
            $defaultCategoryId = $product->getDefaultCategoryId();
        }
        return $defaultCategoryId;
    }
protected function getDefaultCategoryId($product)
    {
        $defaultCategoryId = null;
        if ((bool) $product->getVirtualColumn('is_default_category')) {
            $defaultCategoryId = $product->getVirtualColumn('default_category_id');
        } else {
            $defaultCategoryId = $product->getDefaultCategoryId();
        }
        return $defaultCategoryId;
    }
protected function getDefaultCategoryId ( $ product ) { $ defaultCategoryId = null ; if ( ( bool ) $ product -> getVirtualColumn ( 'is_default_category' ) ) { $ defaultCategoryId = $ product -> getVirtualColumn ( 'default_category_id' ) ; } else { $ defaultCategoryId = $ product -> getDefaultCategoryId ( ) ; } return $ defaultCategoryId ; }
Get the default category id for a product

@param \Thelia\Model\Product $product
@return null|int
@throws \Propel\Runtime\Exception\PropelException
Get the default category id for a product