Пример #1
0
 public function initialize()
 {
     if (!$this->getProperty('order_id')) {
         return "Не указан ID заказа";
     }
     if (!($resource_id = (int) $this->getProperty('resource_id'))) {
         return "Не указан ID товара";
     }
     // else
     if ($resource = $this->modx->getObject('modResource', $resource_id)) {
         $this->setProperty('product_id', $resource->Product->id);
     }
     return parent::initialize();
 }
Пример #2
0
 public function initialize()
 {
     $this->setProperties(array('order_id' => $this->modx->basket->getActiveOrderID()));
     return parent::initialize();
 }