News:

Looking for documentation? Take a look on our wiki

Main Menu

Add product summary to order history view

Started by cliquedm, September 02, 2016, 17:24:37 PM

Previous topic - Next topic

cliquedm

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

GJC Web Design

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";
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

cliquedm

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