예제 #1
0
 public function onOrderPreUpdateEvent(ResourceEvent $event)
 {
     $order = $event->getResource();
     if ($order instanceof OrderInterface) {
         $this->removeTotals($order);
         $this->recalculateShippingTotal($order);
         $this->traverseOrder($order);
     }
 }
예제 #2
0
 public function onClientPostCreate(ResourceEvent $event)
 {
     $client = $event->getResource();
     if ($client instanceof ClientInterface) {
         $email = $client->getContactDetails()->getEmail();
         $title = $this->getTranslatorHelper()->trans('client.email.heading.register');
         $body = $this->getEmailBody($client);
         $shop = $client->getShop();
         $this->getMailerHelper()->sendEmail($email, $title, $body, $shop->getMailerConfiguration());
     }
 }
예제 #3
0
 /**
  * Sets resource settings fetched from fieldset corresponding to selected box type
  *
  * @param ResourceEvent $event
  */
 public function onLayoutBoxResourceSave(ResourceEvent $event)
 {
     $settings = $this->getBoxSettingsFromRequest($event->getRequest());
     $resource = $event->getResource();
     $resource->setSettings($settings);
 }
예제 #4
0
 public function onCartChangedEvent(ResourceEvent $event)
 {
     $this->cartVisitorTraverser->traverse($event->getResource());
 }