Announcement

Collapse
No announcement yet.

Showing a message in Checkout only if shipping country is UK

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Showing a message in Checkout only if shipping country is UK

    Hi -

    I was wondering if anybody could see a way of doing this:-

    I would like a message to appear in the Checkout if, and only if, the shipping country that has been selected by the customer is the UK.

    So,

    IF shipping_country = UK THEN
    show the required message
    ELSE (anything other than UK)
    don't show the message
    END IF

    Can anybody see how that could be done with the available built-in variables & a BLOCK IF ?

    Many thanks, and very warm wishes for the festive season!

    pete

    #2
    Hi Pete, This is not possible due to the fact that Blockif works on static html pages, What you are after works in server side languages like PHP. Saying this, what you are asking could be possible using javascript, so it builds from a dynamic location dropdown list box, however you would need a javascript guru. So far I haven't seen this done in Actinic

    Kind Regards

    Comment


      #3
      Thanks Nadeem for the quick reply.

      I had a feeling this would not be straightforward.

      Alas, I am not a javascript expert - I can see how it might be done with javascript, in principle, but do not have the expertise myself.

      I will have to settle for my message permanently on display to all customers, even though it will only be relevant to UK customers, and word it accordingly.

      Thanks again!

      Comment


        #4
        Try this in the Order 01 Bulk Area:
        Code:
        <div id="countrymessage" style="display:none; visibility:hidden">
        United Kingdom specific message text here.
        </div>
        <script type="text/javascript">
        if ( 'United Kingdom' == '<Actinic:Variable Name="InvoiceCountry" />'.replace(/&#(\d+);/g, function(m,s){return String.fromCharCode(s - 0)}) )
        	{
        	document.getElementById('countrymessage').style.visibility = 'visible';
        	document.getElementById('countrymessage').style.display = 'block';
        	}
        </script>
        I put it just above the line
        Code:
        <actinic:variable name="CheckoutArea" value="Terms and Conditions Agreed" if="%3cactinic%3avariable%20name%3d%22TermsAgreementRequired%22%20%2f%3e" />
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X