/** * @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); }
/** * Gets order address * @return static */ public static function get() { return Data::load('order_address', function () { return new static(); }); }
/** * Gets wish list * @return static */ public static function get() { return Data::load('wish_list', function () { return new static(); }); }
/** * Gets shopping cart * @return static */ public static function get() { return Data::load('shopping_cart', function () { return new static(); }); }