public function deleteProduct(ProductEvent $event)
 {
     OpenSearchServerSearchHelper::deleteProduct($event->getProduct());
 }
 public function __construct(Product $product = null, $template_id, $currency_id)
 {
     parent::__construct($product);
     $this->template_id = $template_id;
     $this->currency_id = $currency_id;
 }
Example #3
0
 /**
  * @param  ProductEvent $event
  * @return null
  */
 protected function getObjectFromEvent($event)
 {
     return $event->hasProduct() ? $event->getProduct() : null;
 }
 public function __construct(Product $product, $category_id)
 {
     parent::__construct($product);
     $this->category_id = $category_id;
 }
 public function __construct(Product $product, $currency_id, $combinations)
 {
     parent::__construct($product);
     $this->setCombinations($combinations);
     $this->setCurrencyId($currency_id);
 }
 public function __construct(Product $product, $content_id)
 {
     parent::__construct($product);
     $this->content_id = $content_id;
 }
 public function __construct(Product $product, $accessory_id)
 {
     parent::__construct($product);
     $this->accessory_id = $accessory_id;
 }
 /**
  * @param ProductEvent $event
  * @throws \Exception
  * @throws \Propel\Runtime\Exception\PropelException
  */
 public function beforeRemoveDigressivePrices(ProductEvent $event)
 {
     $productId = $event->getProduct()->getId();
     DigressivePriceQuery::create()->filterByProductId($productId)->delete();
 }