The field accessibility will show access to the fields assuming they profile has access to the object.
Ensure the profile has edit or create access to the PriceBookEntryPriceBook object and at least read on the product since you are coming from the object pricebookentry in your class
Here is an example for you:
- Profile: PriceBook (Read)
- Profile: Product (Read)
Apex Class
public class productTestController{
public PriceBookEntry pbe {get;set;}
public Opportunity opp {get;set;}
public productTestController(){
pbe = New PriceBookEntry();
opp = New Opportunity();
}
}
Visualforce Page
<apex:page Controller="productTestController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputField value="{!Opp.AccountId}" label="Account"/>
<apex:inputField value="{!pbe.Product2Id}" label="Product"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Result
Now, Update the profile to provide create or edit (whichever you choose) access to the Price Book object
Result