Ejemplo n.º 1
0
 /**
  * @return Currency
  */
 public static function current()
 {
     $code = Data::load('currency', function () {
         /** @var User $user */
         $user = \Yii::$app->user->identity;
         return \Yii::$app->user->isGuest ? static::getDefault()->code : Country::findOne($user->country_id)->currency_code;
     });
     return static::get($code);
 }
Ejemplo n.º 2
0
 /**
  * Gets order address
  * @return static
  */
 public static function get()
 {
     return Data::load('order_address', function () {
         return new static();
     });
 }
Ejemplo n.º 3
0
 /**
  * Gets wish list
  * @return static
  */
 public static function get()
 {
     return Data::load('wish_list', function () {
         return new static();
     });
 }
Ejemplo n.º 4
0
Archivo: Cart.php Proyecto: vetoni/toko
 /**
  * Gets shopping cart
  * @return static
  */
 public static function get()
 {
     return Data::load('shopping_cart', function () {
         return new static();
     });
 }