Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento: Getting Product Url's for Products within a Grouped Product
    primarykey
    data
    text
    <p>For a grouped product, I would like to display a link to the simple products it is composed of. For example, if I have a grouped product called Dining Set composed of plates, knives, forks, etc. I'd like each of the subproducts to have a link to that subproduct (click plates goes to the Simple Product for plates)</p> <pre><code>&lt;?php foreach ($_associatedProducts as $_item): ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo $this-&gt;htmlEscape($_item-&gt;getName()) ?&gt;&lt;/td&gt; &lt;td class="a-right"&gt; &lt;?php echo $this-&gt;getPriceHtml($_item, true) ?&gt; &lt;/td&gt; &lt;?php if ($_product-&gt;isSaleable()): ?&gt; &lt;td class="a-center"&gt; &lt;?php if ($_item-&gt;isSaleable()) : ?&gt; &lt;a href="&lt;?php $_item-&gt;getProductUrl() ?&gt;"&gt;View&lt;/a&gt; &lt;?php else: ?&gt; &lt;p class="availability"&gt;&lt;span class="out-of-stock"&gt;&lt;?php echo $this-&gt;__('Out of stock.') ?&gt;&lt;/span&gt;&lt;/p&gt; &lt;?php endif; ?&gt; &lt;/td&gt; &lt;?php endif; ?&gt; &lt;/tr&gt; &lt;?php endforeach; ?&gt; </code></pre> <p>This is a code snippet from the grouped.phtml file in </p> <pre><code>app/design/frontend/blank/default/template/catalog/product/view/type/grouped.phtml </code></pre> <p>In particular the line that has <code>$_item-&gt;getProductUrl()</code>, this does not work, and I don't know the code needed to get the url for this associated product item. If anyone could help here it would be much appreciated.</p> <p>Also, where on earth can I find the method's available (and how they're used) for Products or Categories or <code>$_item</code> and the like?</p>
    singulars
    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.
 

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