Hi guys, is it possible to change the positioning of customer info in checkout page? I mean:
(http://i.imgur.com/qtFRIJV.png)
Regards
The customer info is returned as an array from the user model and looped thru to display in the order that it is.
You would need to sort the array somehow or manually echo out static fields from the array
[title] => Array
(
[name] => title
[value] => Mr
[title] => Title
[type] => select
[required] => 0
[hidden] =>
[formcode] =>
[description] =>
)
[first_name] => Array
(
[name] => first_name
[value] => Test
[title] => First Name
[type] => text
[required] => 1
[hidden] =>
[formcode] =>
[description] =>
)
[middle_name] => Array
(
[name] => middle_name
[value] =>
[title] => Middle Name
[type] => text
[required] => 0
[hidden] =>
[formcode] =>
[description] =>
)
etc etc
in which file i need to do that?
I would over-ride it but its
components/com_virtuemart/views/cart/tmpl/default_pricelist.php
but in this file i dont have any arrays to sort :/ what's wrong ?
what is this?
$this->cart->BTaddress['fields']
yup there is
<?php
foreach ($this->cart->BTaddress['fields'] as $item) {
if (!empty($item['value'])) {
if ($item['name'] === 'agreed') {
$item['value'] = ($item['value'] === 0) ? JText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_NO') : JText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_YES');
}
?><!-- span class="titles"><?php echo $item['title'] ?></span -->
<span class="values vm2<?php echo '-' . $item['name'] ?>"><?php echo $this->escape ($item['value']) ?></span>
<?php if ($item['name'] != 'title' and $item['name'] != 'first_name' and $item['name'] != 'middle_name' and $item['name'] != 'zip') { ?>
<br class="clear"/>
<?php
}
}
} ?>
so where should i place the code you gave me?
I didn't give you any code - I suggested how you would go about solving your question - you need to do a bit of research yourself...
its now a basic php array manipulation - google is your friend..