How can I change the order of the address book entries? I need the postal code to appear after the city not before.
Actually I want it to go City, Region/State, Post Code, Country
I see the account_address.tpl file references these entries. Is this where to make the change? Will a change here affect other files like account_addresses.tpl and checkout_address.tpl?
Hello, this can be directly edited in the admin localization, please view this post for the solution http://forum.opencart.com/http://forum. ... 2723#p2723
Thank you again tchemis that was helpful. The address info is displaying correctly now.
However the input form has not changed. The format is still misplaced there. I would like it to be
firstname
lastname
company
address_1
address_2
city
region/state
postcode
country
It is awkward inputting the way it is.
However the input form has not changed. The format is still misplaced there. I would like it to be
firstname
lastname
company
address_1
address_2
city
region/state
postcode
country
It is awkward inputting the way it is.
Hello,
You will need to edit catalog\template\default\content\account_address.tpl
find:
And replace with:
This will work, however it is now more weird, because they have to select their country name below, so that there provinces/states appear correctly my suggestion would be to just move the Postal Code/Zipcode only under the city name like so
Find:
Replace with:
Hope this helps!
You will need to edit catalog\template\default\content\account_address.tpl
find:
Code: Select all
<tr>
<td><?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" /></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_city; ?></td>
<td><input type="text" name="city" value="<?php echo $city; ?>" />
<?php if ($error_city) { ?>
<span class="error"><?php echo $error_city; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $entry_country; ?></td>
<td><select name="country_id" onchange="$('#zone').load('index.php?controller=account_address&action=zone&country_id='+this.value+'&zone_id=<?php echo $zone_id; ?>');">
<?php foreach ($countries as $country) { ?>
<?php if ($country['country_id'] == $country_id) { ?>
<option value="<?php echo $country['country_id']; ?>" SELECTED><?php echo $country['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td><?php echo $entry_zone; ?></td>
<td id="zone"><select name="zone_id">
</select></td>
</tr>
Code: Select all
<tr>
<td><?php echo $entry_zone; ?></td>
<td id="zone"><select name="zone_id">
</select></td>
</tr>
<tr>
<td><?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_country; ?></td>
<td><select name="country_id" onchange="$('#zone').load('index.php?controller=account_address&action=zone&country_id='+this.value+'&zone_id=<?php echo $zone_id; ?>');">
<?php foreach ($countries as $country) { ?>
<?php if ($country['country_id'] == $country_id) { ?>
<option value="<?php echo $country['country_id']; ?>" SELECTED><?php echo $country['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
</td>
</tr>
Find:
Code: Select all
<tr>
<td><?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" /></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_city; ?></td>
<td><input type="text" name="city" value="<?php echo $city; ?>" />
<?php if ($error_city) { ?>
<span class="error"><?php echo $error_city; ?></span>
<?php } ?>
</td>
</tr>
Code: Select all
<tr>
<td><span class="required">*</span> <?php echo $entry_city; ?></td>
<td><input type="text" name="city" value="<?php echo $city; ?>" />
<?php if ($error_city) { ?>
<span class="error"><?php echo $error_city; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" /></td>
</tr>
I was able to change the order of the input, thx tchemis. I also made the post code a required field. I see now what you meant about the country being before the region so that the correct states/provinces etc show up in the drop down list. That still seems odd to me but I can't think of a way to change it without messing up the process unless the country came before the name or something.
Last edited by ebtech on Thu Nov 15, 2007 11:07 am, edited 1 time in total.
I've seen where the autopopulated state dropdown sits to the right of the country dropdown.
You may need to edit, or remove entirely, some of the countries like "South Georgia and the South Sandwich Islands" in order for it to fit nicely when the sizes change.
You may need to edit, or remove entirely, some of the countries like "South Georgia and the South Sandwich Islands" in order for it to fit nicely when the sizes change.
Who is online
Users browsing this forum: No registered users and 2 guests