Add a link / popup / icons to "Login to View Prices"

Add a Link to "Login to View Prices" #

Normally, the "Login to view prices" string (or whichever custom string you are using) is simply plain text.

If you would like to turn this into a link (for example, to send users to the "My Account" page for login or registration), you can do so by following these steps:

  • Step 1) Go to B2BKing-> Settings-> Language and Text.
  • Step 2) In the "Hide prices text" setting, enter the following:
<a href="https://your-custom-link.com">Login to view prices</a>

It should look like this:

  • Step 3) Save your settings, and you're done!

Make the "Login to View Prices" Link Open a Login Popup #

Let's look at a different example: making that link open a login popup when clicked.

B2BKing does not have its own popup feature, but you can use any popup plugin on the market and trigger the login popup using a click class. In this example, we will use the "FireBox" popup plugin.

Steps:

Step 1) In B2BKing -> Settings -> Language and Text, set the text to:

<a href="#" class="login_popup">Login to view prices</a>

Step 2) Install the FireBox popup plugin and configure a login popup.

Activate FireBox popup builder plugin

Go to FireBox -> Dashboard. At the top of the page, click New Popup.

Create a new popup with FireBox

Clicking the tab will open the FireBox popup template library. Search for login and select the Popup Login Module template.

Select a login form popup template

When configuring the popup, you can set ".login_popup" as a trigger that opens the popup when clicked:

If the above doesn't work, then use:

Step 3) You're done!

When you click on "Login to view prices," it now opens a popup:

An advantage of this approach is that it keeps the customer on the same page without redirecting them to the WooCommerce account dashboard page.

Add Icons to Plugin Texts #

Starting with B2BKing 4.7.0, it is possible to show icons next to any of the text strings in settings, such as "Login to view prices."

For example:

By default, four icons are supported:

They have the following shortcodes:

  • [lock]
  • [login]
  • [wholesale]
  • [business]

For example, you can add the lock icon to the text as follows:

On the frontend, it will display as:

Powered by BetterDocs