snipt

Ctrl+h for KB shortcuts

PHP

Magento: debug

1
2
3
4
5
<?php 

// debug in magento

Zend_Debug::dump($_product->getData()); 
https://snipt.net/embed/33703ae8e5780b2f4d873fae5589eabd/
/raw/33703ae8e5780b2f4d873fae5589eabd/
33703ae8e5780b2f4d873fae5589eabd
php
PHP
5
2019-08-18T11:32:44
True
False
False
/api/public/snipt/16413/
magento-debug
<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><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="c1">// debug in magento</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="nx">Zend_Debug</span><span class="o">::</span><span class="na">dump</span><span class="p">(</span><span class="nv">$_product</span><span class="o">-&gt;</span><span class="na">getData</span><span class="p">());</span> </span></pre></div> </td></tr></table>
debug, 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-21T14:09:57
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