News:

Support the VirtueMart project and become a member

Main Menu

Checkout template position of customer info.

Started by lol2x, March 02, 2013, 12:02:13 PM

Previous topic - Next topic

lol2x

Hi guys, is it possible to change the positioning of customer info in checkout page? I mean:


Regards

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lol2x


GJC Web Design

I would over-ride it but its

components/com_virtuemart/views/cart/tmpl/default_pricelist.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lol2x

but in this file i dont have any arrays to sort :/ what's wrong ?

GJC Web Design

what is this?

$this->cart->BTaddress['fields']

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lol2x

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?

GJC Web Design

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..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation