PD Wholesale Pricing - Tagging Instructions (Turbify Stores)

Show/Hide Element Tagging

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.

Here are examples of divs that will be hidden or shown:

<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.

Tagging for Dynamic Pricing

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>

  • The retailprice attribute should be populated with the Turbify Store price field.
  • The baseprice attribute should be populated with the Turbify Store sale-price field.
  • The productid attribute should be populated with the product's Turbify product id.

Invoking the PD Dynamic Pricing JavaScript

The dynamic pricing and show/hide functionality is invoked by executing a JavaScript at the bottom of the page. For a Turbify Store, you should do this by calling the following RTML template:

call: pd-myaccount-pricing-init-2012

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.

Using PD Dynamic Pricing with Dynamically Rendered Content

If your page uses JavaScript to dynamically populate or render page content, more work may be necessary to ensure that the PD dynamic pricing logic is applied successfully.

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.

1,000+ Merchants Served Since 2002
Connect
Receive our lastest offers, tips and updates in your email!
Want to learn more?
Schedule an informative online demo to give us a test drive.
2022 Practical Data, Inc. Privacy Policy Terms of Service