public static function getLocation() { if (null == Session::get('location')) { $app = \T4\Mvc\Application::getInstance(); Session::set('location', $app->extensions->sxgeo->getLocation($app->request->ip)); } return Session::get('location'); }
public function addToCart(Product $product) { if (!array_key_exists(self::$sessionProductsListVar, $_SESSION)) { $collection = new Collection(); } else { $collection = Session::get(self::$sessionProductsListVar); } $collection->append($product); Session::set(self::$sessionProductsListVar, $collection); }
public function generateImage($config = null) { $captcha = new \KCAPTCHA(); Session::set(self::KEYSTRING_KEY, $captcha->getKeyString()); die; }
public function addToCart(Product $product) { Session::set('product', $product->getPk()); }