Currently the checkout process at Steps 2 (Billing) and 3 (Delivery) does not include the customer's postcode in the address as displayed.
How can I add this to the address information displayed please.
Open Cart version 3.0.3.2
Thanks, John
How can I add this to the address information displayed please.
Open Cart version 3.0.3.2
Thanks, John
If you're using the default OpenCart checkout, try this edit:
Code: Select all
IN:
/catalog/view/theme/default/template/checkout/payment_address.twig
and
/catalog/view/theme/default/template/checkout/shipping_address.twig
REPLACE BOTH INSTANCES OF:
{{ address.zone }}, {{ address.country }}</option>
WITH:
{{ address.zone }}, {{ address.postcode }}, {{ address.country }}</option>
I have followed the advice from Jonathan, thank you for this, but for some reason it doesn't produce the results although logic says it should.
In both lines in both payment_address.twg and shipping_address.twg the field names now read:
{{ address.firstname }} {{ address.lastname }}, {{ address.address_1 }}, {{ address.address_2 }}, {{ address.city }}, {{ address.zone }}, {{ address.postcode }}, {{ address.country }}
However, the system only shows firstname, lastname, address_1, city, country to the person checking out. (there is probably nothing to display in zone)
Is there somewhere else that needs tweaking or changing to implement the change?
Thanks, John
In both lines in both payment_address.twg and shipping_address.twg the field names now read:
{{ address.firstname }} {{ address.lastname }}, {{ address.address_1 }}, {{ address.address_2 }}, {{ address.city }}, {{ address.zone }}, {{ address.postcode }}, {{ address.country }}
However, the system only shows firstname, lastname, address_1, city, country to the person checking out. (there is probably nothing to display in zone)
Is there somewhere else that needs tweaking or changing to implement the change?
Thanks, John
You are not telling us the whole story here. In a standard OC 3.0.3.2 the post code is already included the the checkout/payment_address.twig and checkout/shipping_address.twig, as follows:
You have most likely got a 3rd party modification, or a con-compliant 3rd party theme, causing this issue.
Code: Select all
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-postcode">{{ entry_postcode }}</label>
<div class="col-sm-10">
<input type="text" name="postcode" value="" placeholder="{{ entry_postcode }}" id="input-payment-postcode" class="form-control" />
</div>
</div>
Code: Select all
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-shipping-postcode">{{ entry_postcode }}</label>
<div class="col-sm-10">
<input type="text" name="postcode" value="{{ postcode }}" placeholder="{{ entry_postcode }}" id="input-shipping-postcode" class="form-control" />
</div>
</div>
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Thank you to both Johnathan and JNeuhoff for responding and helping.
I have now refreshed both the ocMod and the template caches and this has solved the problem. All the required address information now appears.
Just to confirm, I am using the default theme that comes with the system and not one from any other source. Although I do have a small number of modifications installed (all obtained via the Marketplace) these do not interfere with showing the addresses at checkout.
The form-group codes suggested would seem to relate to entry of the address by the customer. However, the relevant fields had already been filled in but wouldn't show during the checkout process.
Thank you both, John
I have now refreshed both the ocMod and the template caches and this has solved the problem. All the required address information now appears.
Just to confirm, I am using the default theme that comes with the system and not one from any other source. Although I do have a small number of modifications installed (all obtained via the Marketplace) these do not interfere with showing the addresses at checkout.
The form-group codes suggested would seem to relate to entry of the address by the customer. However, the relevant fields had already been filled in but wouldn't show during the checkout process.
Thank you both, John
wychegnome meant that the postcode doesn't show up in the address selector for saved addresses. So adding a new address shows it, but if you're selecting a saved address, in the default checkout it won't show the postcode for the saved address.
This is a known problem as Jonathan points out. It also varies by country which fields and in what order they should be shown. Usually for Dutch shops, address_2 should be added. For example, for Belgian shops, firstname and lastname are often reversed.
Perhaps a nice addition for the future is to automatically use the set address format in country settings for this selector.
Perhaps a nice addition for the future is to automatically use the set address format in country settings for this selector.
Excellent! Now please add [SOLVED] to the start of this topic title.wychegnome wrote: ↑Tue Apr 02, 2024 6:45 pmI have now refreshed both the ocMod and the template caches and this has solved the problem. All the required address information now appears.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Legendary Member
Who is online
Users browsing this forum: No registered users and 15 guests