/**
  * {@inheritdoc}
  */
 public function getCustomOptions(\Magento\Catalog\Model\Product\Configuration\Item\ItemInterface $item)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getCustomOptions');
     if (!$pluginInfo) {
         return parent::getCustomOptions($item);
     } else {
         return $this->___callPlugins('getCustomOptions', func_get_args(), $pluginInfo);
     }
 }
Esempio n. 2
0
 /**
  * Reads attributes from the item
  *
  * @param $reqdAttributeNames
  * @param $item
  * @return array
  */
 protected function populateCustomOptions($item)
 {
     $option_values = [];
     $options = $this->productConfiguration->getCustomOptions($item);
     $value = '';
     foreach ($options as $customOption) {
         $value .= $customOption['value'];
     }
     if ($value != '') {
         $option_values[] = ['name' => 'shipperhq_custom_options', 'value' => $value];
         return $option_values;
     }
     return false;
 }
 /**
  * Retrieves product options list
  *
  * @param ItemInterface $item
  * @return array
  */
 public function getOptions(ItemInterface $item)
 {
     return array_merge($this->getBundleOptions($item), $this->productConfiguration->getCustomOptions($item));
 }