Author Topic: Checkout template position of customer info.  (Read 2797 times)

lol2x

  • Beginner
  • *
  • Posts: 15
Checkout template position of customer info.
« on: March 02, 2013, 12:02:13 pm »
Hi guys, is it possible to change the positioning of customer info in checkout page? I mean:


Regards

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10024
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Checkout template position of customer info.
« Reply #1 on: March 02, 2013, 13:28:00 pm »
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

Code: [Select]
[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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lol2x

  • Beginner
  • *
  • Posts: 15
Re: Checkout template position of customer info.
« Reply #2 on: March 02, 2013, 14:10:20 pm »
in which file i need to do that?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10024
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Checkout template position of customer info.
« Reply #3 on: March 02, 2013, 14:13:41 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lol2x

  • Beginner
  • *
  • Posts: 15
Re: Checkout template position of customer info.
« Reply #4 on: March 02, 2013, 14:53:57 pm »
but in this file i dont have any arrays to sort :/ what's wrong ?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10024
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Checkout template position of customer info.
« Reply #5 on: March 02, 2013, 14:55:51 pm »
what is this?

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

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lol2x

  • Beginner
  • *
  • Posts: 15
Re: Checkout template position of customer info.
« Reply #6 on: March 02, 2013, 15:41:28 pm »
yup there is
Code: [Select]
<?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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10024
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Checkout template position of customer info.
« Reply #7 on: March 02, 2013, 15:44:33 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation