Post by brussell » Wed Dec 21, 2016 2:13 am

Hi,

Version: OC 2.2.0

The state/region dropdowns under the Payment and Shipping Address areas have been preselected with the state/region that has been defined under Settings > Local.

The problem with this is that some customers are forgetting to select their region/state and so an order will come through showing the wrong region/state.

Is there a way to change this so that the 'Please Select' option is default? This way, it will force the customer to select their state/region.

Thanks to anyone who can help with this

Brett

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by IP_CAM » Wed Dec 21, 2016 11:30 am

I am not really sure about your wishes, but check the image, for a possible fix.
It's untested, I don't know, how your Customers are exactly able to check out...
Ernie

Attachments

hide_zone_selected.jpg

set Address Zone Dropdown to default value - hide_zone_selected.jpg (83.73 KiB) Viewed 964 times


I'm rarely still active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'000+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by paulfeakins » Wed Dec 21, 2016 7:35 pm


For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by brussell » Wed Dec 21, 2016 11:15 pm

Thanks for helping guys. That solved the issue @IP_CAM, thank you :)

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by websiteworld » Mon Jan 30, 2017 8:31 am

For Opencart 2.3 comment out lines 324-326 of shipping_address.tpl

Code: Select all

//					if (json['zone'][i]['zone_id'] == '<?php echo $zone_id; ?>') {
//						html += ' selected="selected"';
//					}

User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am


Post by stavrosa » Wed May 08, 2019 5:16 pm

Thanks @IP_CAM

For Journal2 same lines on
catalog/view/theme/journal2/template/journal2/checkout/address_form.tpl

Newbie

Posts

Joined
Wed Sep 23, 2015 8:08 pm

Post by stavrosa » Thu Jun 06, 2019 8:15 pm

Do we have an update on this for OC3?

catalog/view/theme/journal3/template/journal3/checkout/address.twig
the twig code for journal3 goes like this:

Code: Select all

 
      <div class="form-group required address-zone">
        <label class="control-label" for="input-{{ type }}-zone">{{ entry_zone }}</label>
        <select v-model="order_data.{{ type }}_zone_id" v-on:change="save()" name="zone_id" id="input-{{ type }}-zone" class="form-control">
          <option v-if="{{ type }}_zones.length > 0" value="">{{ text_select }}</option>
          <option v-if="{{ type }}_zones.length == 0" value="">{{ text_none }}</option>
          <option v-for="zone in {{ type }}_zones" v-bind:value="zone.zone_id" v-html="zone.name"></option>
        </select>
        <span class="text-danger" v-if="error && error.{{ type }}_zone" v-html="error.{{ type }}_zone"></span>
       </div>
EDIT:
Solution: Just comment the last option, seems to be working fine (same on country too)

Code: Select all

<!--option v-for="zone in {{ type }}_zones" v-bind:value="zone.zone_id" v-html="zone.name"></option-->

Newbie

Posts

Joined
Wed Sep 23, 2015 8:08 pm
Who is online

Users browsing this forum: Bing [Bot] and 18 guests