1. Home
  2. Docs
  3. Doc of MSRP (RRP) Pricing...
  4. Shortcodes
  5. Shortcodes

Shortcodes

MSRP (RRP) Pricing for WooCommerce – Shortcodes Guide

The plugin allows you to display Manufacturer’s Suggested Retail Prices (MSRP) on your WooCommerce store, helping you highlight competitive pricing and increase sales. The shortcodes are categorized into Free and Pro versions, allowing for flexibility based on your store’s needs.


Free Version Shortcodes

  1. [alg_wc_msrp_product]
    • Description: Displays the MSRP for a specific product. This shortcode can be used to show the MSRP on product pages, archives, or even in custom locations within your WooCommerce store.
    • Parameters:
      • product_id (optional): Specify the product ID to display the MSRP for a particular product. If not set, it uses the current product.
      • format (optional): Format the display text, e.g., adding “MSRP: ” before the price.
    • Example Usage: [alg_wc_msrp_product product_id=”123″]
    • Use Case: Display the MSRP of a product directly on its product page or on the shop archive pages.
  2. [alg_wc_msrp_savings]
    • Description: Displays the savings amount or percentage compared to the regular price. This shortcode can be customized to show either the absolute savings amount or the percentage saved.
    • Parameters:
      • product_id (optional): Specify the product ID for which to calculate savings.
      • format (optional): Customize the display format, e.g., “You Save: %savings%”.
      • type (optional): Choose between amount or percentage to display the savings.
    • Example Usage: [alg_wc_msrp_savings product_id=”123″ type=”percentage”]
    • Use Case: Show customers how much they are saving on a product by comparing the regular price to the MSRP.
  3. [alg_wc_msrp_if]
    • Description: Conditionally displays content based on whether an MSRP is set for the product. This is useful for showing custom messages or formatting only when an MSRP exists.
    • Parameters:
      • has_msrp: Content to display if the product has an MSRP.
      • no_msrp: Content to display if the product does not have an MSRP.
    • Example Usage: [alg_wc_msrp_if has_msrp=”This product has an MSRP.” no_msrp=”MSRP not available.”]
    • Use Case: Customize the user experience by showing or hiding certain information based on the presence of an MSRP.
  4. [alg_wc_msrp_is_higher]
    • Description: Displays content conditionally based on whether the MSRP is higher than the regular price. This is useful for highlighting savings only when they exist.
    • Parameters:
      • higher_msg: Message to display if the MSRP is higher.
      • not_higher_msg: Message to display if the MSRP is not higher.
    • Example Usage: [alg_wc_msrp_is_higher higher_msg=”Discounted price!” not_higher_msg=”Standard price.”]
    • Use Case: Show custom messages to emphasize discounts when the product price is below the MSRP.

Pro Version Shortcodes

  1. [alg_wc_msrp_by_country]
    • Description: Displays the MSRP based on the customer’s country. This shortcode uses geolocation to adjust the MSRP display according to the visitor’s location.
    • Parameters:
      • country: Specify the country code (e.g., US, UK).
      • format: Customize the display format.
    • Example Usage: [alg_wc_msrp_by_country country=”US” format=”MSRP: %price%”]
    • Use Case: Provide a personalized shopping experience by displaying localized MSRP based on the customer’s country.
  2. [alg_wc_msrp_by_currency]
    • Description: Displays the MSRP based on the selected currency. This shortcode works well with currency switcher plugins to ensure accurate pricing across different currencies.
    • Parameters:
      • currency: Specify the currency code (e.g., USD, EUR).
      • format: Customize the display format.
    • Example Usage: [alg_wc_msrp_by_currency currency=”USD” format=”MSRP: %price%”]
    • Use Case: Show the correct MSRP based on the currency selected by the customer, enhancing the global shopping experience.
  3. [alg_wc_msrp_total_savings]
    • Description: Displays the total savings across all products in the cart. This shortcode is ideal for showing customers how much they are saving overall when they proceed to checkout.
    • Parameters:
      • format: Customize the display format, e.g., “Total Savings: %total_savings%”.
    • Example Usage: [alg_wc_msrp_total_savings format=”You saved: %total_savings%”]
    • Use Case: Highlight the total savings to customers in the cart or checkout page, encouraging them to complete their purchase.
  4. [alg_wc_msrp_user_role]
    • Description: Displays the MSRP only to specific user roles. This shortcode allows you to target certain customer segments with MSRP information.
    • Parameters:
      • user_role: Specify the user role (e.g., customer, wholesale_customer).
      • format: Customize the display format.
    • Example Usage: [alg_wc_msrp_user_role user_role=”wholesale_customer” format=”Wholesale MSRP: %price%”]
    • Use Case: Show MSRP exclusively to wholesale customers or other specific user roles, tailoring the shopping experience.

These shortcodes provide powerful tools for displaying and customizing MSRP in your WooCommerce store, allowing you to emphasize savings, cater to different customer segments, and enhance the overall shopping experience. The Pro version extends these capabilities with advanced features like country-based and currency-based MSRPs, making it a versatile solution for global and localized eCommerce.