You can tag page elements to be hidden from or shown to the customer based on the current wholesale login state. To do this, assign the class names pdShowforWholesale and pdHideForWholesale to the elements that you would like to show or hide.
<div class="pdHideForWholesale" style="display:block"> This div content will be hidden when a wholesale customer is logged-in, but shown to non-logged-in customers by default due to its style of: display:block </div>
<div class="pdShowForWholesale" style="display:none"> This div content will be shown to wholesale customers, but hidden from non-logged-in customers due to its default style which is display:none . </div>
Important: You must include a default style of display:none for elements that are intended to be shown for logged-in wholesale customers, but hidden from regular customers.
You can display user-specific prices for logged-in customers using a container that is marked-up as follows:
<span retailprice="229.95" baseprice="129.95" productid="btp-525" class="pdDynamicPrice pdDynamicPriceItem"></span>
This invokes a function called pdApplyPricingLogic() that inspects the DOM to find tagged elements that should be shown/hidden and calculates/populates the dynamic pricing displays.
This method will work with all static content pages.
First, you will still need to call pd-myaccount-pricing-init-2012 at the bottom of your page. This will load the necessary pdApplyPricingLogic() function and will call
the function upon the initial page load.
Next, you may need to modify your script to ensure the function pdApplyPricingLogic" has been loaded and then directly call pdApplyPricingLogic() after your function completes its rendering. This will re-apply the pricing display logic to your dynamically rendered DOM.