Ejemplo n.º 1
0
 protected function __construct(discount $discount, umiObject $ruleObject, $discountName)
 {
     parent::__construct($ruleObject);
     $this->name = $discountName;
     $this->discount = $discount;
     $this->init();
 }
Ejemplo n.º 2
0
 public function __construct(iUmiObject $object)
 {
     $permissions = permissionsCollection::getInstance();
     $userId = $permissions->getUserId();
     $guestId = permissionsCollection::getGuestId();
     $this->isAuth = $userId == $guestId ? false : $userId;
     parent::__construct($object);
 }
Ejemplo n.º 3
0
 /**
  * Конструктор скидки
  * @param umiObject $object объект данных скидки
  */
 protected function __construct(umiObject $object)
 {
     parent::__construct($object);
     if ($modificatorId = $object->getValue('discount_modificator_id')) {
         $this->modificator = discountModificator::get($modificatorId, $this);
     }
     if ($rules = $object->getValue('discount_rules_id')) {
         foreach ($rules as $ruleId) {
             $this->rules[] = discountRule::get($ruleId, $this);
         }
     }
 }
Ejemplo n.º 4
0
 public function __construct(iUmiObject $object, order $order = null)
 {
     parent::__construct($object);
     $this->order = $order;
 }
Ejemplo n.º 5
0
		public function __construct(iUmiObject $object, $network_name) {
			parent::__construct($object);
			$this->network_name = $network_name;
		}
Ejemplo n.º 6
0
 /**
  * Получить заказ по объекту заказа
  * @param Integer $object объект заказа
  */
 protected function __construct(umiObject $object)
 {
     parent::__construct($object);
     $domains = domainsCollection::getInstance();
     $this->totalAmount = (int) $object->total_amount;
     $this->originalPrice = (double) $object->total_original_price;
     $this->actualPrice = (double) $object->total_price;
     $this->domain = $domains->getDomain($domains->getDomainId($object->domain_id));
     $this->discount = orderDiscount::get($object->order_discount_id);
     $this->readItems();
 }
Ejemplo n.º 7
0
 /**
  * Конструктор класса. Косвенно вызывается через orderItem::get() и orderItem::create()
  * @param umiObject $object объект наименования (для работы с ним мы наследуем umiObjectProxy)
  */
 protected function __construct(umiObject $object)
 {
     parent::__construct($object);
     $discount = $this->getDiscount();
     $this->price = (double) $object->item_price;
     $this->totalOriginalPrice = (double) $object->item_total_original_price;
     $this->totalActualPrice = (double) $object->item_total_price;
     $this->amount = (int) $object->item_amount;
     $this->discount = itemDiscount::get($object->item_discount_id);
     $this->itemElement = $object->item_link;
 }