VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: doc_denis on February 10, 2017, 15:31:38 PM

Title: Wrong date last modified on details_order.php
Post by: doc_denis on February 10, 2017, 15:31:38 PM
hello,

The details_order.php file does not display the last change at the top of the view.
file :
components/com_virtuemart/views/orders/tmpl/details_order.php

I propose to replace:

    <tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_LAST_UPDATED'?></td>
<td align="left"><?php echo vmJsApi::date($this->orderdetails['details']['BT']->modified_on'LC4'true); ?></td>
    </tr>


By this code (to display the last modification):


    <tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_LAST_UPDATED'?></td>
<td align="left"><?php //echo vmJsApi::date($this->orderdetails['details']['BT']->modified_on, 'LC4', true); ?>
<?php
foreach($this->orderdetails['history'] as $_hist)
?>

<?php echo vmJsApi::date($_hist->created_on,'LC1',true); ?>
</td>
    </tr>


post on french forum :
http://www.virtuemart.fr/forum/commandes-et-clients-vm3/1233-erreur-dans-la-liste-virtuemart-des-commandes-en-front-end
Title: Re: Wrong date last modified on details_order.php
Post by: doc_denis on February 12, 2017, 23:30:50 PM
Hello,

in french forum, Studio42 sent this clean code:


$_hist = end ($this->orderdetails['history']);
echo vmJsApi::date($_hist->created_on,'LC4',true);


thank you @ Studio 42
Title: Re: Wrong date last modified on details_order.php
Post by: Milbo on February 13, 2017, 12:08:35 PM
better would be a patch.
Title: Re: Wrong date last modified on details_order.php
Post by: Studio 42 on February 13, 2017, 16:46:23 PM
Max,
it's a temp fix that can be applied in the template, i think that valerie already reported it to you?
I mean that the modified_on value is not parsed correctly from DB, so a patch using this is bad, it need to be solved in the view or perhaps in the model directly.
Title: Re: Wrong date last modified on details_order.php
Post by: Milbo on February 13, 2017, 19:42:05 PM
? svn patch? you can also do it with git, I told you often.