View Single Post
  #2  
Old 09-26-2021, 01:35 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default Re: Change order of address fields

Hi, a quick glance at the codes suggest that the output comes from


../../../skins/customer/checkout/steps/shipping/parts/address.shipping.twig


which looks like
Code:
{## # Checkout shipping address form #} {% form '\\XLite\\View\\Form\\Checkout\\UpdateProfile' with {className: 'addr ess shipping-address'} %} <ul class="form shipping-address-form"> {% for fieldName, fieldData in this.getAddressSchemaFields() %} <li class="item-{{ fieldName }} {{ fieldData.additionalClass }} clearfi x"> {{ this.displayCommentedData(this.getFieldCommentedData(fieldData)) } } {{ fieldData.widget.display() }} {{ widget_list('checkout.shipping.address.' ~ fieldName, address=this .getAddressInfo(), fieldName=fieldName, fieldData=fieldData) }} </li> {% endfor %} {{ widget_list('checkout.shipping.address', address=this.getAddressInfo() ) }} </ul> {% endform %}


Unfortunately I have been unable to figure out where the widget list checkout.shipping.address is defined. But with a little luck, you an maybe get away just by making sure the array this.getAddressSchemaFields() (which is defined in the view class View/Checkout/AAddressBlock.php) isn't sorted in the theme that outputs address fields in a wrong order.
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote