Advertisement
johncarlson21

Untitled

Aug 30th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2.  
  3. public function execute(
  4.         \Magento\Framework\Event\Observer $observer
  5.     ) {
  6.         $item = $observer->getEvent()->getData( 'quote_item' );
  7.         //$item = $observer->getQuoteItem();
  8.         //$item = ( $item->getParentItem() ? $item->getParentItem() : $item );
  9.        
  10.         $this->_logger->info('in check options');
  11.         $this->_logger->info('item: '.$item->getItemId());
  12.        
  13.         $product = $item->getProduct();
  14.     ........... more code below, but fails at getItemId()
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement