Page 1 of 1

Add Reviews to Buy Product Dialog with NVelocity

Posted: Fri Sep 14, 2012 8:39 am
by jcw2m
I've tried a few different approaches without any success. Due to structure/layout requirements, I need to add reviews to the BuyProductDialog,ascx file. Adding the reference itself is fine. The challenge is how to do this while still using the #if statements normally found in the Show Product 1.htm file. Does anyone have any ideas for how I can still use conditional statements when referencing the reviews conlib as a user control? Thanks!!

From Show Product 1.htm:
#if($store.Settings.ProductReviewEnabled != "None")
#if($store.Settings.ProductReviewEnabled == "Registered")
#if($customer.IsAnonymous == false)
[[ConLib:ProductRatingImage]] <a href="#reviews">reviews</a>
#end
#end
#if($store.Settings.ProductReviewEnabled == "Anonymous")
#if($customer.IsAnonymous == true)
[[ConLib:ProductRatingImage]] <a href="#reviews">reviews</a>
#end
#end
#if($store.Settings.ProductReviewEnabled == "All")
[[ConLib:ProductRatingImage]] <a href="#reviews">reviews</a>
#end
#end

Re: Add Reviews to Buy Product Dialog with NVelocity

Posted: Mon Sep 17, 2012 6:50 am
by jmestep
I just did that on a site for a similar layout by putting the conditional code in the ProductRatingImage ConLib in the code behind. I actually had to move the ProductRatingImage into the ProductPrice Conlib because of the layout.