VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: cliquedm on September 02, 2016, 17:24:37 PM

Title: Add product summary to order history view
Post by: cliquedm on September 02, 2016, 17:24:37 PM
If anyone could point me in the right direction I'd greatly appreciate it,

Basically I'm trying to add product name and custom field in the order history view.

Looking in the views\orders\tmpl\details_items.php i can see it's shown with

<?php echo $item->order_item_name; ?>

coming from the orderdetails array but I can't find where this array is coming from so I can bring it into

views\orders\tmpl\list.php

I've checked the view.html and it doesn't appear to be coming from there, I'm not that good at MVC structure in Joomla!

Can anyone help, I've tried everything I can at this stage!!

Thanks

Joomla 3.6.2 and Virtuemart 3.0.16
Title: Re: Add product summary to order history view
Post by: GJC Web Design on September 02, 2016, 19:47:13 PM
echo out the $item .. might already be there

will always come from the VM admin models

print 'Debug Line '.__LINE__.' $item <pre>'; print_r ($item); print "</pre><br />\n";
Title: Re: Add product summary to order history view
Post by: cliquedm on September 03, 2016, 12:42:46 PM
Quote from: GJC Web Design on September 02, 2016, 19:47:13 PM
echo out the $item .. might already be there

will always come from the VM admin models

print 'Debug Line '.__LINE__.' $item <pre>'; print_r ($item); print "</pre><br />\n";

I'm not understanding this, function is in the model right?
View is calling variables from the function and
tmpl displays or 'echo' these variables depending on information.

I have noticed in the 'view' that the details view is done after
if ($layoutName == 'details') {

here it calls the model function(getMyOrderDetails which is in orders model)

$orderDetails = $orderModel ->getMyOrderDetails();

I've tried to replicate this for the list view, but it doesn't recognise the indexes in this statement
$orderbt = $orderDetails['details']['BT'];

does anyone know where these indexes are coming from, or even what information should be contained in the 'details' or 'BT' indexes??

Thanks