Example #1
0
 public function beforeSet()
 {
     // Проверяем, является ли это товар текущей корзины
     if ($this->object->get('order_id') != $this->getProperty('order_id')) {
         return 'Товар не относится к текущей корзине';
     }
     return parent::beforeSet();
 }
Example #2
0
 public function initialize()
 {
     $this->setDefaultProperties(array("order_product_id" => $this->getProperty('id')));
     return parent::initialize();
 }