Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Tks to <a href="http://www.magentocommerce.com/boards/viewthread/51638/" rel="nofollow">http://www.magentocommerce.com/boards/viewthread/51638/</a> I finally came to an answer. The following code works great in he view.html page:</p> <pre><code>&lt;div class="box base-mini mini-related-items"&gt; &lt;div class="head"&gt;&lt;h4&gt;Todos os produtos da coleção &lt;strong&gt;&lt;?php echo $this-&gt;getProduct()-&gt;getCategory()-&gt;getName() ?&gt; &lt;/strong&gt;&lt;/h4&gt;&lt;/div&gt; &lt;div class="content" style="float:left"&gt; &lt;ol&gt; &lt;?php $cat_id = Mage::getModel('catalog/layer')-&gt;getCurrentCategory()-&gt;getId(); // set current category id $category = Mage::getModel('catalog/category')-&gt;load($cat_id); $products = $category-&gt;getProductCollection()-&gt;addCategoryFilter($category)-&gt;addAttributeToSelect('*'); ?&gt; &lt;?php foreach ( $products as $_product ): ?&gt; &lt;li&lt;?php if($_product-&gt;isComposite() || !$_product-&gt;isSaleable()): ?&gt; class="super-products"&lt;?php endif; ?&gt; class="product-box"&gt; &lt;div class="product-images"&gt; &lt;a href="&lt;?php echo $_product-&gt;getProductUrl() ?&gt;"&gt;&lt;img src="&lt;?php echo $this-&gt;helper('catalog/image')-&gt;init($_product, 'thumbnail')-&gt;resize(50) ?&gt;" alt="&lt;?php echo $this-&gt;htmlEscape($_product-&gt;getName()) ?&gt;" width="50" height="50" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="product-details"&gt; &lt;a href="&lt;?php echo $_product-&gt;getProductUrl() ?&gt;"&gt;&lt;?php echo $this-&gt;htmlEscape($_product-&gt;getName()) ?&gt;&lt;/a&gt; &lt;!-- Price --&gt; &lt;?php echo $this-&gt;getPriceHtml($_product, true) ?&gt; &lt;/div&gt; &lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ol&gt;&lt;/div&gt;&lt;div style="clear:both"&gt;&lt;br /&gt;&lt;/div&gt; &lt;/div&gt;&lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload