Streaming live at 10am (PST)

Hide pricing for users outside of Australia

I’m trying to hide pricing on a collection page (not ecommerce enabled) for users outside of Australia. For example, if the user is anywhere else other than Australia (ie. US, JP, etc) then a piece of text should show saying “Price upon application”, but if the user is in Australia the price should draw from the CMS as normal ie “AU$X,XXX”.

I’ve setup classes and an HTML embed like so:

<div class="elsewhere">
  <h4 class="price-text">Price upon application</h4>
<div class="AU">
  <h4 class="price-text">AU{{wf {&quot;path&quot;:&quot;price&quot;,&quot;type&quot;:&quot;PlainText&quot;\} }}</h4>

.elsewhere, .AU {
  display: none;

And in the body element I’ve got this javascript running

<script type="text/javascript" src="">  

In principle it works in this jsfiddle but for the life of me I can’t get it to actually work in Webflow and with the ‘everywhere else’ methodology that’s required. Any help would be much appreciated :smile:

Here is my site Read-Only: Langfords
(how to share your site Read-Only link)