News:

Looking for documentation? Take a look on our wiki

Main Menu

Total number of products on order

Started by 2cool, June 01, 2017, 14:49:19 PM

Previous topic - Next topic

K&K media production

#15
QuoteUse of undefined constant items - assumed 'items'

'items'

<?php 
  $totalNrOfOrderItems
0;
  foreach (
$this->orderDetails['items'] as $orderItem) {
    
$totalNrOfOrderItems $totalNrOfOrderItems $orderItem->product_quantity
  }
  echo 
vmText::_('VM_TOTAL_NUMBER_OF_ORDER_ITEMS') . $totalNrOfOrderItems
?>

Jörgen

Of course You are right.

I wonder why the code snippet showed [items] instead of ['items']. Could swear that I copied it from the code without editing. Bý the way, Your example shows [imems] instead of [items] ;)

Will also change my original post.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

2cool

Thanks for your help, got one last question:

I added this to nl-NL.override.ini:
VM_TOTAL_NUMBER_OF_ORDER_ITEMS="Totaal aantal artikelen: "

This doesn't work anymore?
shows: VM_TOTAL_NUMBER_OF_ORDER_ITEMS2 on invoice mails?

Regards,
Pas

K&K media production

you need it for frontend AND backend

2cool

Yes! works perfect real nice, thanks for your help.

Regards,

Pas