ukbaz Posted March 11, 2013 Share Posted March 11, 2013 Hi Am trying to work out a means of displaying a conditional message to a customer that will work when a customers selects a certain county in the one page checkout - I.e Customer selects Austarlia as country and the cart displays 'This country selection may lead to extra shipping delays'. Anyone done this or know how to? Link to comment Share on other sites More sharing options...
guest* Posted March 11, 2013 Share Posted March 11, 2013 For which Prestashop-Version ? Link to comment Share on other sites More sharing options...
ukbaz Posted March 11, 2013 Author Share Posted March 11, 2013 Hi - am using version 1.4.9 Link to comment Share on other sites More sharing options...
ukbaz Posted March 12, 2013 Author Share Posted March 12, 2013 tried adding this in address.tpl as test undrer country drop-down: {if $country->id_country == '24'} {l s='This order may be transferred to our Australian distributor} {else}{/if} page blanked :-( what am I missing here? Link to comment Share on other sites More sharing options...
ukbaz Posted March 14, 2013 Author Share Posted March 14, 2013 Resolved using Javascript in template files 1 Link to comment Share on other sites More sharing options...
mouse1 Posted November 17, 2014 Share Posted November 17, 2014 Hi ukbaz, could you possibly post your javascript solution? Thank you. Link to comment Share on other sites More sharing options...
ukbaz Posted November 18, 2014 Author Share Posted November 18, 2014 Paste following code in /your-theme/order-opc-new-account.tpl or corresponding page if you don't use OPC <p class="required select"><label for="id_country">{l s='Country'} <sup>*</sup></label><select name="id_country" id="id_country" onchange="showhide(this)"><option value="">-</option>{foreach from=$countries item=v}<option value="{$v.id_country}" {if (isset($guestInformations) AND $guestInformations.id_country == $v.id_country) OR (!isset($guestInformations) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'htmlall':'UTF-8'}</option>{/foreach}</select><!-- Added Pass to distributor code --><div align="center"><div class="answer21 answers" style="width:auto;height:30px;display:none"><div id="value21a"><strong><font color="#df242b" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Thank you for your order. This will be passed to our local distributor in the United States - Thermoworks Inc for them to process.</font></strong></div></div></div><div align="center"><div class="answer24 answers" style="width:auto;height:30px;display:none"><div id="value24a"><strong><font color="#df242b" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Thank you for your order. This will be passed to our local distributor in Australia - Ross Brown Sales for them to process.</font></strong></div></div></div><script type="text/javascript">{literal}function showhide(id) {var mySel = $(id).val()$('.answers').hide()$('.answer'+mySel).show()}{/literal}</script><!-- END Added Pass to distributor code --></p> 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now