Пример #1
0
 /**
  * Couple constructor.
  *
  * @param int    $qty
  * @param string $comment
  */
 public function __construct($qty, $comment = null)
 {
     parent::__construct();
     $this->item->sku = 'couple';
     $this->item->name = 'Festival Couple';
     $this->price = '32.50';
     $this->taxRate = 21;
     $this->qty = $qty;
     $this->comment = $comment;
 }
Пример #2
0
 /**
  * SingleBoxer constructor.
  *
  * @param int    $qty
  * @param string $comment
  */
 public function __construct($qty, $comment = null)
 {
     parent::__construct();
     $this->item->sku = 'single';
     $this->item->name = 'Single Festival Boxer';
     $this->price = '19.00';
     $this->taxRate = 21;
     $this->qty = $qty;
     $this->comment = $comment;
 }
Пример #3
0
 /**
  * TankTop constructor.
  *
  * @param int    $qty
  * @param string $comment
  */
 public function __construct($qty, $comment = null)
 {
     parent::__construct();
     $this->item->sku = 'tanktop';
     $this->item->name = 'Festival Tanktop';
     $this->price = '17.50';
     $this->taxRate = 21;
     $this->qty = $qty;
     $this->comment = $comment;
 }
Пример #4
0
 public function __construct($product = null, $quantity = 1)
 {
     // Case 1: Constructed by getting OrderItem from DB
     if (is_array($product)) {
         $this->ProductID = $this->_productID = $product['ProductID'];
         $this->ProductVersion = $this->_productVersion = $product['ProductVersion'];
     }
     // Case 2: Constructed in memory
     if (is_object($product)) {
         $this->ProductID = $this->_productID = $product->ID;
         $this->ProductVersion = $this->_productVersion = $product->Version;
     }
     parent::__construct($product, $quantity);
 }