Пример #1
0
 function init()
 {
     $this->Cart = Shopping::restart('ShoppCart', $this->Cart);
     $this->Customer = Shopping::restart('ShoppCustomer', $this->Customer);
     $this->Billing = Shopping::restart('BillingAddress', $this->Billing);
     $this->Shipping = Shopping::restart('ShippingAddress', $this->Shipping);
     $this->Tax = Shopping::restart('ShoppTax', $this->Tax);
     $this->Shiprates = Shopping::restart('ShoppShiprates', $this->Shiprates);
     $this->Discounts = Shopping::restart('ShoppDiscounts', $this->Discounts);
     // Store order custom data and post processing data
     Shopping::restore('data', $this->data);
     Shopping::restore('sameaddress', $this->sameaddress);
     Shopping::restore('inprogress', $this->inprogress);
     Shopping::restore('purchase', $this->purchase);
     Shopping::restore('txnid', $this->txnid);
     Shopping::restore('orderstate', $this->state);
     $this->Payments = new ShoppPayments();
     $this->Promotions = new ShoppPromotions();
     $this->Checkout = new ShoppCheckout();
 }
Пример #2
0
 /**
  * Do not use. Deprecated.
  *
  * @deprecated ShoppingObject::__new
  * @see Shopping::restart
  *
  * @param string $class The name of an object class
  * @param Object $ref (optional) The reference to an object to be replaced
  * @return Object The object reference
  **/
 public static function &__new($class, &$ref = false)
 {
     return Shopping::restart($class, $ref);
 }