> Add a Plandalf checkout, buy button or countdown to a Brilliant Directories site, then put each buyer on a BD membership plan.

Source: https://plandalf.com/docs/websites/brilliantdirectories

Websites and builders

# Brilliant Directories

Put the Plandalf script in your Brilliant Directories (BD) site's head code once, then a button or checkout in a widget on any page.

**Putting buyers on a membership plan**

A Plandalf purchase doesn't create a BD member by itself. To put buyers on a membership plan, move them between plans or cancel them after a refund, connect the Brilliant Directories app in Plandalf's automations. See [Brilliant Directories automations](https://plandalf.com/docs/automations/brilliantdirectories).

## Add the script

Copy the script from your checkout's **Share** screen so it holds your own address. On the Share screen, Brilliant Directories is under **Other platforms…**.

1.  ### Open Design Settings
    
    In your BD admin, go to **Settings » Design Settings** and open the **Custom CSS / HEAD** tab.
    
2.  ### Paste the script
    
    Paste it into **Additional HEAD Code** and click **Save Changes**. Every page on the site now loads it.
    

```html
<script async src="https://YOUR-ORG.plandalf.dev/js/plandalf-sdk.js"></script>
```

Save Changes saves every Design Settings tab at once, so fix any error BD shows under **Additional CSS** first. To load the script on one page only, paste it into that page's **HEAD** JavaScript tab in **Content » Web Page Builder** instead.

## Open a checkout from a button

1.  ### Create a widget
    
    Go to **Toolbox » Widget Manager** and click **New Widget**. Name it, for example "Plandalf checkout", paste the button into the **HTML** tab and click **Save**.
    
2.  ### Put it on a page
    
    Go to **Content » Web Page Builder**, edit the page, and type the widget's shortcode where the button goes: `[widget=Plandalf checkout]`. The name must match the widget's name exactly.
    

```html
<button data-plandalf-present="YOUR-CHECKOUT">Buy Now</button>
```

To copy a widget's shortcode, hover over its row in the Custom Widgets table and click the clipboard icon beside its name. A widget can also go in a sidebar from **Toolbox » Sidebar Manager**. More button options are in [Buy buttons](https://plandalf.com/docs/checkouts/buy-buttons).

## Show a checkout on the page

Put an inline checkout in a widget's **HTML** tab the same way, and add the widget's shortcode to the page:

```html
<div data-plandalf-mount="YOUR-CHECKOUT" style="min-height: 480px"></div>
```

## Show a deadline timer

In a widget, add an empty element with your deadline timer's slug. The script draws the live countdown inside it.

To charge the deadline timer's current price, add `data-plandalf-apply-promo` with the same slug to your buy button.

```html
<div data-plandalf-promo="YOUR-PROMO"></div>
<button data-plandalf-present="YOUR-CHECKOUT" data-plandalf-apply-promo="YOUR-PROMO">Buy Now</button>
```

See [Countdowns](https://plandalf.com/docs/promos/countdowns).

## Check it's working

1.  ### Open the published page
    
    Use a private window. In the browser console, type `plandalf`: you should see a function. `undefined` means the script isn't on the page.
    
2.  ### Click your button
    
    The checkout opens over the page.
    
3.  ### Make a test purchase
    
    Use **Open the test checkout** on the Share screen, or add your site's domain in Plandalf under **Settings → Advanced → Test domains**. See [Test mode](https://plandalf.com/docs/get-started/test-mode).
    

## If something's not right

-   The widget doesn't show: the shortcode must use the widget's exact name. Copy it from the Custom Widgets table in **Toolbox » Widget Manager**.
-   The button does nothing: check the script is in **Additional HEAD Code** and that you clicked **Save Changes**.

Something wrong or missing? Email [hello@plandalf.com](mailto:hello@plandalf.com).
