Example #1
0
 /**
  * save product data
  * @param $observer
  * @return $this
  */
 public function saveProductData(EventObserver $observer)
 {
     $post = $this->context->getRequest()->getPost('articles', -1);
     if ($post != '-1') {
         $post = $this->jsHelper->decodeGridSerializedInput($post);
         $product = $this->coreRegistry->registry('product');
         $this->articleResource->saveArticleProductRelation($product, $post);
     }
     return $this;
 }