> For the complete documentation index, see [llms.txt](https://halosoft.gitbook.io/bc-beautica-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://halosoft.gitbook.io/bc-beautica-documentation/cart-page-dropdown-cart/calculate-free-shipping-message-function.md).

# Calculate Free Shipping Message Function

<figure><img src="/files/AHhP20BCIvPjEvDzfEFN" alt=""><figcaption></figcaption></figure>

Go to **Storefront** -> **My Themes** -> **Customize**. <mark style="color:red;">(If your store is a new store, you may need to go to</mark> <mark style="color:red;"></mark><mark style="color:red;">**Channel Manager -> Themes -> Edit Theme**</mark><mark style="color:red;">)</mark>

In the **Theme Editor** -> Go to **Other Settings / Calculate Free Shipping**

<figure><img src="/files/7fm5UltFfllqS5MCnp0g" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When you are happy with your changes, don't forget click **Save** and **Publish** to repackage the edited theme.
{% endhint %}

<figure><img src="/files/qfPYYE62L8Xr44C22i0x" alt=""><figcaption></figcaption></figure>

Go to **Marketing** -> **Promotions** -> click button **New automatic promotion**.

<figure><img src="/files/66PYEOa7IWHKsQzQ7PN2" alt=""><figcaption></figcaption></figure>

Fill in the content of **Promotion Details** such as this example below (you can change the price, countries,...)

<figure><img src="/files/N6LDDgF3vbOi5WkGuhO7" alt=""><figcaption></figcaption></figure>

Fill in the content of **Promotion Options** such as this example below

<figure><img src="/files/IVNwODSvS78MYZ8cdYsM" alt=""><figcaption></figcaption></figure>

This is sample code:

```html
 <span class="congratulation">Congratulations Banner Message <span class="country">All</span></span>
```

<figure><img src="/files/Y7qNoGZkbz4xk7tQLBhQ" alt=""><figcaption></figcaption></figure>

This is sample code:

<pre class="language-html"><code class="lang-html">&#x3C;span>Upsell Banner Message
<strong>    &#x3C;span class="condition_required">%%condition.required%%&#x3C;/span>
</strong>    &#x3C;span class="condition_matched">%%condition.matched%%&#x3C;/span>
    &#x3C;span class="condition_remaining">%%condition.remaining%%&#x3C;/span>
    &#x3C;span class="country">All&#x3C;/span>
&#x3C;/span>
</code></pre>

Code explanation:

```html
<span class="country">All</span>
```

Is the code of country you want to apply discount. Example:

```html
<span class="country"> US,UK,CA </span> is for United State, United Kingdom and Canada
```

```html
<span class="country"> VN </span> for Vietnam.
```

```html
If you want to apply discount for all of countries, you can setup All <span class="country">All</span>
```

{% hint style="info" %}
When you are happy with your changes, don't forget click **Save**.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://halosoft.gitbook.io/bc-beautica-documentation/cart-page-dropdown-cart/calculate-free-shipping-message-function.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
