{"id":1268,"date":"2014-12-23T12:38:52","date_gmt":"2014-12-23T12:38:52","guid":{"rendered":"http:\/\/www.bay20.com\/?p=1268"},"modified":"2025-05-12T12:56:49","modified_gmt":"2025-05-12T07:11:49","slug":"magento-so-setzen-sie-sitzungsvariablen-zuruck","status":"publish","type":"post","link":"https:\/\/www.bay20.com\/de\/magento-so-setzen-sie-sitzungsvariablen-zuruck\/","title":{"rendered":"Magento: Session-Variablen setzen, holen, l\u00f6schen"},"content":{"rendered":"<p>\u00dcblicherweise wird die Session in Magento vom Core-Session-Modul \u201acore\/session\u2018 verwaltet. Wir verwenden <strong>&#8222;set&lt;session name&gt;&#8220;<\/strong>, um eine Session-Variable zu setzen. Sehen Sie sich die Syntax und das Beispiel unten an:<\/p>\n<pre class=\"lang-php prettyprint prettyprinted\">Mage::getSingleton('core\/session')-&gt;set&lt;Session name&gt;('session variable'); \/\/ Syntax\n\n$name = 'John'; \u00a0\/\/ Example\nMage::getSingleton('core\/session')-&gt;setMyname($name);<\/pre>\n<p>Ebenso wird<strong> \u201eget&lt;session name&gt;\u201c<\/strong> verwendet, um Sitzungsvariablen zu erhalten. Sehen Sie sich die Syntax und das Beispiel unten an:<\/p>\n<pre class=\"lang-php prettyprint prettyprinted\">Mage::getSingleton('core\/session')-&gt;get&lt;Session name&gt;(); \u00a0\u00a0      \/\/ Syntax\nMage::getSingleton('core\/session')-&gt;getMyname(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ Example<\/pre>\n<p>Um die Sitzung aufzuheben, verwenden Sie <strong>&#8222;uns&lt;Sitzungsname&gt;&#8220;<\/strong>, siehe Syntax und Beispiel:<\/p>\n<pre class=\"lang-php prettyprint prettyprinted\">Mage::getSingleton('core\/session')-&gt;uns&lt;Session name&gt;(); \u00a0 \u00a0      \/\/ Syntax\nMage::getSingleton('core\/session')-&gt;unsMyname(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\/\/ Example<\/pre>\n\n\n<p><strong>Bitte kontaktieren Sie uns unter <strong><a href=\"mailto:manish@bay20.com\">manish@bay20.com<\/a><\/strong> oder rufen Sie uns unter <strong><a href=\"https:\/\/api.whatsapp.com\/send?phone=+918800519180&amp;text=Hi,%20I%20contacted%20you%20through%20your%20website.\" target=\"_blank\" rel=\"noreferrer noopener\">+91-8800519180<\/a><\/strong> an, wenn Sie Unterst\u00fctzung in Bezug auf Magento ben\u00f6tigen. Sie k\u00f6nnen auch die <strong><a href=\"https:\/\/www.bay20.com\/magento-development\/\">Magento<strong>-Entwicklungsseite<\/strong><\/a><\/strong> besuchen, um die von uns angebotenen Dienstleistungen zu \u00fcberpr\u00fcfen.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Commonly,session in Magento is handled by core session Module \u2018core\/session\u2019. We use \u201cset<session name>\u201d to set a session variable. Look at the syntax and example below:<\/p>\n","protected":false},"author":1,"featured_media":1501,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"class_list":["post-1268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/1268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/comments?post=1268"}],"version-history":[{"count":8,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/1268\/revisions"}],"predecessor-version":[{"id":16894,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/1268\/revisions\/16894"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media\/1501"}],"wp:attachment":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media?parent=1268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/categories?post=1268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/tags?post=1268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}