News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Get current order item in plgVmDisplayInOrderFEVM3

Started by johnyDev, December 23, 2015, 11:04:56 AM

Previous topic - Next topic

johnyDev

How to get the current order item in

function plgVmDisplayInOrderFEVM3 (&$product, &$productCustom, &$html)

we used to have $item parameter in VM2 but now where is the order item ? 

I have posted the question in StackOverFlow also: http://stackoverflow.com/questions/34434023/get-order-item-line-in-virtuemart-3-inside-plgvmdisplayinorderfevm3

johnyDev


welrachid

Hi
Not sure if this works for you.
it works in one of my custom plugins.

   function plgVmDisplayInOrderBEVM3(&$item, &$productCustom, &$html) {
      $this->plgVmOnViewCartVM3($item,$productCustom,$html);
   }
   function plgVmOnViewCartVM3(&$product, &$productCustom, &$html) {
      if (empty($productCustom->custom_element) or $productCustom->custom_element != $this->_name) return false;
      if(empty($product->customProductData[$productCustom->virtuemart_custom_id][$productCustom->virtuemart_customfield_id])) return false;
      $myparams = array();
      foreach( $product->customProductData[$productCustom->virtuemart_custom_id] as $k =>$item ) {
         /*..........fill in the blanks.............*/
      }
   }

Best regards,
Wel