snipt

Ctrl+h for KB shortcuts

Text only

Magento Cache

Magento keeps its cache in /var/cache located inside the Magento installation directory. To clear the cache, simply delete everything from the /var/cache directory and then reload your website in your browser.To clear all sessions, you can also delete everything from the /var/session folder within your Magento installation directory.
https://snipt.net/embed/016804ec57d4a44e4161c7a60d40e22f/
/raw/016804ec57d4a44e4161c7a60d40e22f/
016804ec57d4a44e4161c7a60d40e22f
text
Text only
1
2019-08-17T00:40:28
True
False
False
/api/public/snipt/14518/
magento-cache
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Magento keeps its cache in /var/cache located inside the Magento installation directory. To clear the cache, simply delete everything from the /var/cache directory and then reload your website in your browser.To clear all sessions, you can also delete everything from the /var/session folder within your Magento installation directory. </span></pre></div> </td></tr></table>
magento

HTML+PHP

Magento skin url

1
2
3
4
5
6
<!-- this is inside of .phtml files -->
<img src="<?php echo $this->getSkinUrl('images/breadcrumbs_arrow.gif'); ?>" alt="arrow"/>


<!-- this is in cms block -->
<img class="featured-ratings" src="{{skin url='images/ratings.jpg'}}" alt="" />
https://snipt.net/embed/04d9826f00a0e70bac5e875b0912f483/
/raw/04d9826f00a0e70bac5e875b0912f483/
04d9826f00a0e70bac5e875b0912f483
html+php
HTML+PHP
6
2019-08-12T09:34:01
True
False
False
/api/public/snipt/13268/
magento-skin-url
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c">&lt;!-- this is inside of .phtml files --&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nv">$this</span><span class="o">-&gt;</span><span class="na">getSkinUrl</span><span class="p">(</span><span class="s1">&#39;images/breadcrumbs_arrow.gif&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="s">&quot;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&quot;arrow&quot;</span><span class="p">/&gt;</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="c">&lt;!-- this is in cms block --&gt;</span> </span><span id="L-6"><a name="L-6"></a><span class="p">&lt;</span><span class="nt">img</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;featured-ratings&quot;</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;{{skin url=&#39;images/ratings.jpg&#39;}}&quot;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&quot;&quot;</span> <span class="p">/&gt;</span> </span></pre></div> </td></tr></table>
magento, url

PHP

back to category

1
2
3
4
5
<?php if ($_category = $_product->getCategory()): ?>
<div class="product-back">
    <a href="<?php echo $_category->getUrl(); ?>" onclick="history.back(); return false;" class="form-button-alt" ><?php echo $this->__('Back') ?></a>
</div>
<?php endif;?>
https://snipt.net/embed/0f54745b52df3cc1ecd9838072a6433d/
/raw/0f54745b52df3cc1ecd9838072a6433d/
0f54745b52df3cc1ecd9838072a6433d
php
PHP
6
2019-08-14T13:00:46
True
False
False
/api/public/snipt/7188/
back-to-category
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nv">$_category</span> <span class="o">=</span> <span class="nv">$_product</span><span class="o">-&gt;</span><span class="na">getCategory</span><span class="p">())</span><span class="o">:</span> <span class="cp">?&gt;</span><span class="x"></span> </span><span id="L-2"><a name="L-2"></a><span class="x">&lt;div class=&quot;product-back&quot;&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="x"> &lt;a href=&quot;</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nv">$_category</span><span class="o">-&gt;</span><span class="na">getUrl</span><span class="p">();</span> <span class="cp">?&gt;</span><span class="x">&quot; onclick=&quot;history.back(); return false;&quot; class=&quot;form-button-alt&quot; &gt;</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nv">$this</span><span class="o">-&gt;</span><span class="na">__</span><span class="p">(</span><span class="s1">&#39;Back&#39;</span><span class="p">)</span> <span class="cp">?&gt;</span><span class="x">&lt;/a&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="x">&lt;/div&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="cp">&lt;?php</span> <span class="k">endif</span><span class="p">;</span><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
magento, templates