I've been asked to customize the Product Details page and a few others for a store we are developing. I can see @Model in the page code but can't figure out how to see what's in the Model so I can leverage it.
I need to know (1) if the current user is logged in, and (2) if the current user has a customer record, (3) what the UDFB2 field value for that customer is if the customer exists. Also I need some Store Config values, I have put some custom config information. I could probably work back to get the customer data through SQL if I knew the DNN Login ID (if the user was logged in) but it might already be in the Model and I just don't know the syntax to get to it.
The Product Detail cshtml looks to use RazorCart.ProductDetails.Models.DetailModel. I have the pipeline customization project and have browsed through the DLLs but can't find anything that looks to match to a Prduct Detail page model. Am I just not seeing it or is it not there? If not, is there anywhere that I can go look up what's in the Model on each page so I know what I have to work with?
I've been able to dig blindly a bit. I can use
@{
var vStatus = "(not found)";
if (Model.Product != null)
{
vStatus = "Prioduct exists!";
}
}
but hopefully there is a better way than this,
Model.Product on the Product Details page seems to correspond to RazorCart.Service.Data.ModelDataContext.Product. Is this correct or is it another object?
How can I, in the different cshtmls that might be customized, know what objects and data is in the Model for each page?
Thank you,
George Butler