Hi there
Over on the v7 forum, someone asked how to hide the 'States/Provinces' list on the checkout unless someone selects the US or Canada.
I don't think it's possible in v7 (as the same code is used by both the invoice drop downs and the delivery drop downs and this would break the Javascript) but it is possible in v8.
And it goes a little something like this:
Over on the v7 forum, someone asked how to hide the 'States/Provinces' list on the checkout unless someone selects the US or Canada.
I don't think it's possible in v7 (as the same code is used by both the invoice drop downs and the delivery drop downs and this would break the Javascript) but it is possible in v8.
And it goes a little something like this:
- Go to 'Design | Library | Layouts' and expand the 'Checkout Area' group.
- Open the 'Delivery Location' layout.
- Locate this code:
Code:
<Actinic:LOCATION TYPE="DELIVERSELECTSTATE"> <actinic:variable name="DeliveryStateList" /> </Actinic:LOCATION>
- Replace it with this code:
Code:
<div id="showhidearea" style="visibility: hidden"> <Actinic:LOCATION TYPE="DELIVERSELECTSTATE"> <actinic:variable name="DeliveryStateList" /> </Actinic:LOCATION> </div>
- Now click 'OK' on this layout and go to the 'Delivery' country list group.
- Open the 'Delivery Country List' layout
- Click the orange 'Click here to edit list layout settings' link.
- Replace the entire contents of the 'Start Of List' field with the following:
Code:
<select id="lstDeliveryCountry" name="LocationDeliveryCountry" onchange="javascript:div = document.getElementById('showhidearea'); if (this.options[this.selectedIndex].value == 'US' || this.options[this.selectedIndex].value == 'CA') div.style.visibility = 'visible'; else div.style.visibility = 'hidden';"> <option value=""> <Actinic:Variable Name="SelectCountry" if="%3cactinic%3avariable%20name%3d%22InvoiceLocationIsUsed%22%20%2f%3e%20%3d%3d%20False"/> <Actinic:Variable Name="UseInvoiceLocation" if="%3cactinic%3avariable%20name%3d%22InvoiceLocationIsUsed%22%20%2f%3e"/>
- Click OK (twice) and then close the library and upload.
Comment